Class SingleEntityTypeGenerator

    • Constructor Detail

      • SingleEntityTypeGenerator

        public SingleEntityTypeGenerator()
    • Method Detail

      • isApplicable

        protected abstract boolean isApplicable​(IntegrationObjectItemModel item)
        Determines whether this generator is applicable to the specified item and can generate at least a single EDMX entity type.
        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.
      • generateEntityType

        protected org.apache.olingo.odata2.api.edm.provider.EntityType generateEntityType​(IntegrationObjectItemModel item)
        Generates a single entity type for the specified item delegating the entity parts creation to:
        Parameters:
        item - an item to generate the EDMX entity type for.
        Returns:
        the generated entity type.
        Subclasses make sure never return null from this method. If item cannot be generated, then isApplicable(IntegrationObjectItemModel) should return false instead.
      • generateKey

        protected org.apache.olingo.odata2.api.edm.provider.Key generateKey​(java.lang.String name,
                                                                            java.util.List<org.apache.olingo.odata2.api.edm.provider.Property> properties)
      • generateEntityTypeName

        protected abstract java.lang.String generateEntityTypeName​(IntegrationObjectItemModel item)
        Generates name for the entity type being generated.
        Parameters:
        item - item, for which entity type is being generated.
        Returns:
        a valid EDMX entity type name.
      • setKeyGenerator

        public void setKeyGenerator​(KeyGenerator generator)
      • getKeyGenerator

        protected KeyGenerator getKeyGenerator()