Package net.solarnetwork.central.domain
Class BaseObjectIdentity<PK extends Comparable<PK> & Serializable>
java.lang.Object
net.solarnetwork.central.domain.BaseObjectIdentity<PK>
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<PK>,net.solarnetwork.domain.Identity<PK>
- Direct Known Subclasses:
BaseObjectEntity
public class BaseObjectIdentity<PK extends Comparable<PK> & Serializable>
extends Object
implements Cloneable, Serializable, net.solarnetwork.domain.Identity<PK>
Base implementation of
Identity using a
Comparable, Serializable primary key.- Since:
- 1.34
- See Also:
-
Constructor Details
-
BaseObjectIdentity
public BaseObjectIdentity()
-
-
Method Details
-
clone
-
hashCode
public int hashCode() -
equals
Test if two BaseObjectIdentity objects have the samegetId()value. -
compareTo
Compare based on the primary key, with null values ordered before non-null values.- Specified by:
compareToin interfaceComparable<PK extends Comparable<PK> & Serializable>
-
getId
Get the primary key.- Specified by:
getIdin interfacenet.solarnetwork.domain.Identity<PK extends Comparable<PK> & Serializable>- Returns:
- the id
-
setId
Set the primary key.- Parameters:
id- the id to set
-