Class ComposedEntityTypeGenerator
java.lang.Object
de.hybris.platform.odata2services.odata.schema.entity.SingleEntityTypeGenerator
de.hybris.platform.odata2services.odata.schema.entity.ComposedEntityTypeGenerator
- All Implemented Interfaces:
EntityTypeGenerator,SchemaElementGenerator<List<org.apache.olingo.odata2.api.edm.provider.EntityType>,IntegrationObjectItemModel>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.olingo.odata2.api.edm.provider.EntityTypeGenerates a single entity type for the specified item delegating the entity parts creation to:SingleEntityTypeGenerator.generateEntityTypeName(IntegrationObjectItemModel)for the entity type name generationSingleEntityTypeGenerator.propertiesGeneratorfor the entity type properties generationSingleEntityTypeGenerator.keyGeneratorfor the entity type key generation.protected StringGenerates name for the entity type being generated.protected DescriptorFactoryprotected NavigationPropertyListGeneratorRegistryprotected booleanDetermines whether this generator is applicable to the specified item and can generate at least a single EDMX entity type.voidsetDescriptorFactory(DescriptorFactory descriptorFactory) voidMethods inherited from class de.hybris.platform.odata2services.odata.schema.entity.SingleEntityTypeGenerator
generate, generateKey, getKeyGenerator, getPropertiesGenerator, setKeyGenerator, setPropertiesGenerator
-
Constructor Details
-
ComposedEntityTypeGenerator
public ComposedEntityTypeGenerator()
-
-
Method Details
-
generateEntityType
protected org.apache.olingo.odata2.api.edm.provider.EntityType generateEntityType(IntegrationObjectItemModel item) Description copied from class:SingleEntityTypeGeneratorGenerates a single entity type for the specified item delegating the entity parts creation to:SingleEntityTypeGenerator.generateEntityTypeName(IntegrationObjectItemModel) for the entity type name generation
SingleEntityTypeGenerator.propertiesGenerator for the entity type properties generation
SingleEntityTypeGenerator.keyGenerator for the entity type key generation. If the key is not generated, i.e.
!Optional<Key>.isPresent(), anIllegalStateExceptionis thrown.- Overrides:
generateEntityTypein classSingleEntityTypeGenerator- Parameters:
item- an item to generate the EDMX entity type for.- Returns:
- the generated entity type.
Subclasses make sure never returnnullfrom this method. If item cannot be generated, thenSingleEntityTypeGenerator.isApplicable(IntegrationObjectItemModel)should returnfalseinstead.
-
isApplicable
Description copied from class:SingleEntityTypeGeneratorDetermines whether this generator is applicable to the specified item and can generate at least a single EDMX entity type.- Specified by:
isApplicablein classSingleEntityTypeGenerator- Parameters:
item- an item, based on which the decision has to be made.- Returns:
true, if at least one entity type can be generated for the given item;false, otherwise.
-
generateEntityTypeName
Description copied from class:SingleEntityTypeGeneratorGenerates name for the entity type being generated.- Specified by:
generateEntityTypeNamein classSingleEntityTypeGenerator- Parameters:
item- item, for which entity type is being generated.- Returns:
- a valid EDMX entity type name.
-
getRegistry
-
getDescriptorFactory
-
setDescriptorFactory
-