Class AttributeReference

java.lang.Object
com.aquima.interactions.metamodel.AbstractReference
com.aquima.interactions.metamodel.AttributeReference
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TypedAttributeReference

public class AttributeReference extends AbstractReference
Simple class that holds a reference to an attribute. An attribute reference consists of an entityName and an attributeName. The object may either be constructed by providing the names separately or by providing a string containing both separated by a dot.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • AttributeReference

      public AttributeReference(String fullname)
      Constructs a reference from a full attribute name. The name passed to this method should consist of an entity name, followed by a dot and an attribute name. This constructor will validate the name, and throw an InitialisationException when the passed name is not valid.
      Parameters:
      fullname - String containing the entity and attribute name separated by a dot.
    • AttributeReference

      public AttributeReference(String entityName, String attributeName)
      Constructs a reference from an entity and attribute name. Both the entity and attribute name are required parameters.
      Parameters:
      entityName - The name of the entity for the reference.
      attributeName - The name of the attribute for the reference
  • Method Details

    • isValidAttributeReference

      public static boolean isValidAttributeReference(String fullname)
      Validates if the supplied string is a valid attribute reference notation.
      Parameters:
      fullname - string to validate.
      Returns:
      return true when valid, otherwise false.
    • getEntityName

      public String getEntityName()
      This method returns the entity name of the reference.
      Returns:
      the entity name of the reference.
    • getAttributeName

      public String getAttributeName()
      This method returns the attribute name of the reference.
      Returns:
      the attribute name of the reference.
    • getFullname

      public String getFullname()
      This method return the entity and attribute name of the reference, separated by a dot.
      Returns:
      the entity and attribute name of the reference, separated by a dot.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object