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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanfalseIfNull(Object attribute) org.apache.olingo.odata2.api.edm.provider.Associationgenerate(TypeAttributeDescriptor attrDescriptor) Generates an association for the referenced TypeAttributeDescriptorprotected org.apache.olingo.odata2.api.edm.EdmMultiplicitygetSourceCardinality(TypeAttributeDescriptor descriptor) Determines cardinality of the source type presented in the specified attribute descriptor.protected org.apache.olingo.odata2.api.edm.EdmMultiplicitygetTargetCardinality(TypeAttributeDescriptor descriptor) Determines cardinality of the target type presented in the specified attribute descriptor.protected StringgetTargetType(TypeAttributeDescriptor descriptor) Generates an association target type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.odata2services.odata.schema.association.AssociationGenerator
isApplicable
-
Constructor Details
-
AbstractAssociationGenerator
public AbstractAssociationGenerator()
-
-
Method Details
-
generate
public org.apache.olingo.odata2.api.edm.provider.Association generate(TypeAttributeDescriptor attrDescriptor) Description copied from interface:AssociationGeneratorGenerates an association for the referenced TypeAttributeDescriptor- Specified by:
generatein interfaceAssociationGenerator- Specified by:
generatein interfaceSchemaElementGenerator<org.apache.olingo.odata2.api.edm.provider.Association,TypeAttributeDescriptor> - Parameters:
attrDescriptor- the integration object attribute descriptor- Returns:
- the association
-
getTargetType
Generates an association target type.- Parameters:
descriptor- an attribute descriptor to generate the target type from.- Returns:
- type code of the
TypeDescriptorreferenced 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
-