Class BaseIdentity

java.lang.Object
net.solarnetwork.central.domain.BaseIdentity
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Long>, net.solarnetwork.domain.Identity<Long>
Direct Known Subclasses:
BaseEntity, SimpleNodeGroupInformation, SimpleNodeInformation

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

    • BaseIdentity

      public BaseIdentity()
  • 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 BaseEntity objects have the same getId() value.
      Overrides:
      equals in class Object
    • compareTo

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

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

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