Class Attribute

java.lang.Object
com.sas.lsaf.core.Attribute
All Implemented Interfaces:
Serializable

public class Attribute extends Object implements Serializable
Representation of an attribute on an object. It contains an id and value. The id refers to the id to an AttributeDefinition which is defined for an objectType. See TypeService.getTypeById(String) to get the AttributeDefinitions for an object type.
Since:
1.1
See Also:
  • Constructor Details

    • Attribute

      public Attribute()
      Zero-arg constructor.
    • Attribute

      public Attribute(String id, Serializable value)
      Constructs an Attribute object which associates the given attribute id with the given value.
      Parameters:
      id - the id of the attribute. Cannot be null.
      value - the value of this attribute. Can be null.
  • Method Details

    • setId

      public void setId(String id)
      Set the id of this attribute.
      Parameters:
      id - A String containing the id to give to this attribute.
    • getId

      public String getId()
      Returns the id of this attribute. The id refers to the id to an AttributeDefinition which is defined for an objectType. See TypeService.getTypeById(String) to get the AttributeDefinitions for an object type.
      Returns:
      the id of the attribute.
    • setValue

      public void setValue(Serializable value)
      Set the value of this attribute.
      Parameters:
      value - The serializable value to give to this attribute.
    • getValue

      public Serializable getValue()
      Returns the serializable value of this attribute.
      Returns:
      the value of the attribute.
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object