Class AbstractAssociationGenerator

    • Constructor Detail

      • AbstractAssociationGenerator

        public AbstractAssociationGenerator()
    • Method Detail

      • 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
        Parameters:
        attrDescriptor - the integration object attribute descriptor
        Returns:
        the association
      • checkIsApplicablePrecondition

        @Deprecated(since="1905.08-CEP",
                    forRemoval=true)
        protected void checkIsApplicablePrecondition​(IntegrationObjectItemAttributeModel attributeDefinitionModel)
        Deprecated, for removal: This API element is subject to removal in a future version.
        no alternative method. The DefaultTypeAttributeDescriptor.create validates the appropriate precondition. A IntegrationObjectItemAttributeModel cannot possibly exist with a null attribute descriptor.
        Runs safety checks on the specified attribute definition model, to make sure it can be analyzed by the AssociationGenerator.isApplicable(IntegrationObjectItemAttributeModel) method. Specifically it checks the the model is not null and contains an AttributeDescriptorModel.
        Parameters:
        attributeDefinitionModel - a model to analyze
      • getAssociationName

        public java.lang.String getAssociationName​(TypeAttributeDescriptor descriptor)
        Generates association name based on the the provided attribute descriptor.
        Specified by:
        getAssociationName in interface AssociationGenerator
        Parameters:
        descriptor - a descriptor to generate the association name for.
        Returns:
        name of the descriptor in "FK_<item_type>_<attribute_type>" format, where item_type is the type containing the attribute descriptor and attribute_type is the type of the attribute values or, in other words, type referenced by the attribute.
      • asDescriptor

        @Deprecated(since="1905.08-CEP",
                    forRemoval=true)
        protected TypeAttributeDescriptor asDescriptor​(IntegrationObjectItemAttributeModel attributeDefinitionModel)
        Deprecated, for removal: This API element is subject to removal in a future version.
        no alternative method.
        Converts attribute model to an attribute descriptor.
        Parameters:
        attributeDefinitionModel - a model to convert.
        Returns:
        attribute descriptor for the specified attribute model.
      • 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​(java.lang.Object attribute)