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<java.util.List<org.apache.olingo.odata2.api.edm.provider.EntityType>,IntegrationObjectItemModel>
public class ComposedEntityTypeGenerator extends SingleEntityTypeGenerator
-
-
Constructor Summary
Constructors Constructor Description ComposedEntityTypeGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.olingo.odata2.api.edm.provider.EntityTypegenerateEntityType(IntegrationObjectItemModel item)Generates 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 java.lang.StringgenerateEntityTypeName(IntegrationObjectItemModel item)Generates name for the entity type being generated.protected booleanisApplicable(IntegrationObjectItemModel item)Determines whether this generator is applicable to the specified item and can generate at least a single EDMX entity type.voidsetRegistry(NavigationPropertyListGeneratorRegistry registry)-
Methods inherited from class de.hybris.platform.odata2services.odata.schema.entity.SingleEntityTypeGenerator
generate, generateKey, getKeyGenerator, getPropertiesGenerator, setKeyGenerator, setPropertiesGenerator
-
-
-
-
Method Detail
-
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
protected boolean isApplicable(IntegrationObjectItemModel item)
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
protected java.lang.String generateEntityTypeName(IntegrationObjectItemModel item)
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.
-
setRegistry
public void setRegistry(NavigationPropertyListGeneratorRegistry registry)
-
-