Class PrimitiveReferenceHandler

    • Constructor Detail

      • PrimitiveReferenceHandler

        public PrimitiveReferenceHandler()
    • Method Detail

      • getPrimitiveReferences

        public List<Property> getPrimitiveReferences​(Entity entity)
        entity - the Entity for which to get the primitive reference properties
        list of properties of the entity which are primitive references isPrimitiveReference(Property)).
      • isPrimitiveReference

        public boolean isPrimitiveReference​(Property property)
        Code which handles so-called primitive references, These are references which are modeled as primitive types and which do not have a foreign key constraint defined in the database. The reference is defined using 2 columns: one holding the id, the other holding the table
        property - the property to check if it is a primitive reference
        true if this property is a primitive reference, false otherwise
      • hasObjectPrimitiveReference

        public boolean hasObjectPrimitiveReference​(BaseOBObject obObject)
        Returns true if the passed object has so-called primitive references ( isPrimitiveReference(Property)).
        obObject - the object having a primitive reference property (or not)
        true if this entity holds a primitive reference
      • getPrimitiveReferencedEntity

        public Entity getPrimitiveReferencedEntity​(BaseOBObject obObject,
                                                   Property property)
        In case of a primitive reference (isPrimitiveReference(Property)) then this method returns the Entity to which the property value refers. This method may only be called if the primitive reference is unequal to null.
        obObject - the object refering to an instance of an Entity
        property - the primitive reference property
        the Entity to which the property value refers, can not be null
        OBException - if no Entity can be found