Class ID

  • All Implemented Interfaces:
    Serializable, org.svenson.DynamicProperties
    Direct Known Subclasses:
    GId

    public class ID
    extends org.svenson.AbstractDynamicProperties
    See Also:
    Serialized Form
    • Method Detail

      • getType

        public String getType()
      • setType

        public void setType​(String type)
      • getValue

        public String getValue()
      • setValue

        public void setValue​(String value)
      • getName

        @JSONProperty(ignore=true)
        public String getName()
      • setName

        public void setName​(String name)
      • hashCode

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

        public boolean equalsIgnoreClass​(Object o)
        This method compares if two ids have the same content (type, value) even if they have different classes. This method is useful for the identity service.
        Parameters:
        o - the ID to compare with this instance
        Returns:
        true if both ID have the same contents (type, value) regardless of the class, false otherwise
      • asString

        public static String asString​(ID id)