Class IntegrationKeyPropertyElementGenerator
java.lang.Object
de.hybris.platform.odata2services.odata.schema.property.IntegrationKeyPropertyElementGenerator
- All Implemented Interfaces:
SchemaElementGenerator<Optional<org.apache.olingo.odata2.api.edm.provider.Property>,TypeDescriptor>
public class IntegrationKeyPropertyElementGenerator
extends Object
implements SchemaElementGenerator<Optional<org.apache.olingo.odata2.api.edm.provider.Property>,TypeDescriptor>
A generator for generating an
Optional<org.apache.olingo.odata2.api.edm.provider.Property> schema element from a TypeDescriptor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.apache.olingo.odata2.api.edm.provider.Property>generate(TypeDescriptor descriptor) Generates the schema element for the providedTypeDescriptorusing assignedAliasAnnotationGenerator.voidsetAliasGenerator(AliasAnnotationGenerator aliasGenerator) Sets the nullableAliasAnnotationGenerator.
-
Constructor Details
-
IntegrationKeyPropertyElementGenerator
public IntegrationKeyPropertyElementGenerator()
-
-
Method Details
-
generate
public Optional<org.apache.olingo.odata2.api.edm.provider.Property> generate(TypeDescriptor descriptor) Generates the schema element for the providedTypeDescriptorusing assignedAliasAnnotationGenerator.- Specified by:
generatein interfaceSchemaElementGenerator<Optional<org.apache.olingo.odata2.api.edm.provider.Property>,TypeDescriptor> - Parameters:
descriptor- the type descriptor for which schema element needs to be generated.- Returns:
- Optional property generated from the descriptor using the given alias generator. Returns
Optional.empty(), if alias generator or descriptor isnull, or the given alias generator generates anullalias.
-
setAliasGenerator
Sets the nullableAliasAnnotationGenerator. If the alias generator is not injected or isnull, thegenerate(TypeDescriptor)method will returnOptional.empty().- Parameters:
aliasGenerator- alias generator used by the generate method.
-