Class AbstractAssociationGenerator

java.lang.Object
de.hybris.platform.odata2services.odata.schema.association.AbstractAssociationGenerator
All Implemented Interfaces:
AssociationGenerator, SchemaElementGenerator<org.apache.olingo.odata2.api.edm.provider.Association,TypeAttributeDescriptor>
Direct Known Subclasses:
CollectionAssociationGenerator, OneToOneAssociationGenerator

public abstract class AbstractAssociationGenerator extends Object implements AssociationGenerator
  • Constructor Details

    • AbstractAssociationGenerator

      public AbstractAssociationGenerator()
  • Method Details

    • generate

      public org.apache.olingo.odata2.api.edm.provider.Association generate(TypeAttributeDescriptor attrDescriptor)
      Description copied from interface: AssociationGenerator
      Generates an association for the referenced TypeAttributeDescriptor
      Specified by:
      generate in interface AssociationGenerator
      Specified by:
      generate in interface SchemaElementGenerator<org.apache.olingo.odata2.api.edm.provider.Association,TypeAttributeDescriptor>
      Parameters:
      attrDescriptor - the integration object attribute descriptor
      Returns:
      the association
    • getTargetType

      protected String getTargetType(TypeAttributeDescriptor descriptor)
      Generates an association target type.
      Parameters:
      descriptor - an attribute descriptor to generate the target type from.
      Returns:
      type code of the TypeDescriptor referenced by the attribute descriptor (type of the attribute values).
      See Also:
    • getSourceCardinality

      protected org.apache.olingo.odata2.api.edm.EdmMultiplicity getSourceCardinality(TypeAttributeDescriptor descriptor)
      Determines cardinality of the source type presented in the specified attribute descriptor. Normally the source type is the item type containing the attribute.
      Parameters:
      descriptor - descriptor to derive the cardinality from
      Returns:
      multiplicity
    • getTargetCardinality

      protected org.apache.olingo.odata2.api.edm.EdmMultiplicity getTargetCardinality(TypeAttributeDescriptor descriptor)
      Determines cardinality of the target type presented in the specified attribute descriptor. Normally the target type is the item type returned by the attribute.
      Parameters:
      descriptor - descriptor to derive the cardinality from
      Returns:
      multiplicity
    • falseIfNull

      protected static boolean falseIfNull(Object attribute)