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 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 provided TypeDescriptor using assigned AliasAnnotationGenerator.
      Specified by:
      generate in interface SchemaElementGenerator<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 is null, or the given alias generator generates a null alias.
    • setAliasGenerator

      public void setAliasGenerator(@Nullable AliasAnnotationGenerator aliasGenerator)
      Sets the nullable AliasAnnotationGenerator. If the alias generator is not injected or is null, the generate(TypeDescriptor) method will return Optional.empty().
      Parameters:
      aliasGenerator - alias generator used by the generate method.