Class Attribute

  • All Implemented Interfaces:
    java.io.Serializable

    public class Attribute
    extends java.lang.Object
    implements java.io.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:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Attribute()
      Zero-arg constructor.
      Attribute​(java.lang.String id, java.io.Serializable value)
      Constructs an Attribute object which associates the given attribute id with the given value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getId()
      Returns the id of this attribute.
      java.io.Serializable getValue()
      Returns the serializable value of this attribute.
      int hashCode()  
      void setId​(java.lang.String id)
      Set the id of this attribute.
      void setValue​(java.io.Serializable value)
      Set the value of this attribute.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Attribute

        public Attribute()
        Zero-arg constructor.
      • Attribute

        public Attribute​(java.lang.String id,
                         java.io.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 Detail

      • setId

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

        public java.lang.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​(java.io.Serializable value)
        Set the value of this attribute.
        Parameters:
        value - The serializable value to give to this attribute.
      • getValue

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object