Class OneToOneAssociationGenerator
- java.lang.Object
-
- de.hybris.platform.odata2services.odata.schema.association.AbstractAssociationGenerator
-
- de.hybris.platform.odata2services.odata.schema.association.OneToOneAssociationGenerator
-
- All Implemented Interfaces:
AssociationGenerator,SchemaElementGenerator<org.apache.olingo.odata2.api.edm.provider.Association,IntegrationObjectItemAttributeModel>
public class OneToOneAssociationGenerator extends AbstractAssociationGenerator
-
-
Constructor Summary
Constructors Constructor Description OneToOneAssociationGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.olingo.odata2.api.edm.provider.Associationgenerate(IntegrationObjectItemAttributeModel attribute)Generates an association for the referenced IntegrationObjectItemAttributeModelprotected org.apache.olingo.odata2.api.edm.EdmMultiplicitygetTargetCardinality(TypeAttributeDescriptor descriptor)Determines cardinality of the target type presented in the specified attribute descriptor.booleanisApplicable(IntegrationObjectItemAttributeModel attribute)Determines if this association generator is applicable for the given attributebooleanisApplicable(TypeAttributeDescriptor attribute)Determines if this association generator is applicable for the given attribute descriptor-
Methods inherited from class de.hybris.platform.odata2services.odata.schema.association.AbstractAssociationGenerator
asDescriptor, checkIsApplicablePrecondition, falseIfNull, generate, getAssociationName, getAssociationName, getSourceCardinality, getSourceRole, getSourceRole, getTargetRole, getTargetRole, getTargetType, getTargetType
-
-
-
-
Method Detail
-
isApplicable
public boolean isApplicable(IntegrationObjectItemAttributeModel attribute)
Description copied from interface:AssociationGeneratorDetermines if this association generator is applicable for the given attribute- Parameters:
attribute- the attribute we are verifying- Returns:
- true if applicable, otherwise false
-
isApplicable
public boolean isApplicable(TypeAttributeDescriptor attribute)
Description copied from interface:AssociationGeneratorDetermines if this association generator is applicable for the given attribute descriptor- Parameters:
attribute- the attribute descriptor we are verifying- Returns:
- true if applicable, otherwise false
-
generate
public org.apache.olingo.odata2.api.edm.provider.Association generate(IntegrationObjectItemAttributeModel attribute)
Description copied from interface:AssociationGeneratorGenerates an association for the referenced IntegrationObjectItemAttributeModel- Parameters:
attribute- the integration object attribute- Returns:
- the association
-
getTargetCardinality
protected org.apache.olingo.odata2.api.edm.EdmMultiplicity getTargetCardinality(TypeAttributeDescriptor descriptor)
Description copied from class:AbstractAssociationGeneratorDetermines cardinality of the target type presented in the specified attribute descriptor. Normally the target type is the item type returned by the attribute.- Overrides:
getTargetCardinalityin classAbstractAssociationGenerator- Parameters:
descriptor- descriptor to derive the cardinality from- Returns:
- multiplicity
-
-