Class BaseStringIdentity

java.lang.Object
net.solarnetwork.central.domain.BaseStringIdentity
All Implemented Interfaces:
Serializable, Cloneable, Comparable<String>, net.solarnetwork.domain.Identity<String>
Direct Known Subclasses:
BaseStringEntity

public abstract class BaseStringIdentity extends Object implements Cloneable, Serializable, net.solarnetwork.domain.Identity<String>
Base implementation of a String-based Identity.
See Also:
  • Constructor Details

    • BaseStringIdentity

      public BaseStringIdentity()
  • Method Details

    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • hashCode

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

      public boolean equals(Object obj)
      Test if two BaseStringEntity objects have the same getId() value.
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(String o)
      Compare based on the primary key, with null values ordered before non-null values.
      Specified by:
      compareTo in interface Comparable<String>
    • getId

      public String getId()
      Specified by:
      getId in interface net.solarnetwork.domain.Identity<String>
      Returns:
      the id
    • setId

      public void setId(String id)
      Parameters:
      id - the id to set