Class InstanceReferrer

All Implemented Interfaces:
IConvertable, IPrimitiveValue, ISingleValue, IValue, Serializable, Comparable<Object>

public class InstanceReferrer extends ValueReference
This class is used to identify the relation between an attribute referring an instance. To be able to correctly identify this relation, a reference to the entity attribute is required (hence the inheritance of ValueReference) and the id of the instance that is being referred (the getReferredInstanceId method).
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • InstanceReferrer

      public InstanceReferrer(EntityValue instance, String attribute, GUID referredId)
      Constructs an instance referrer with an entity value identifying the instance that contains the attribute referring the instance identified by the referrer id.
      Parameters:
      instance - Id of the instance containing the referring attribute.
      attribute - Name of the attribute referring the instance
      referredId - Id of the instance that is being referred.
  • Method Details

    • getReferredInstanceId

      public GUID getReferredInstanceId()
      This method returns the instance id of the entity instance that this object is referring to. The instance id of the instance containing the reference can be acquired by using the getInstanceId method.
      Returns:
      Instance id (long) of the entity instance that this reference is referring to.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ValueReference
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ValueReference