Package org.datanucleus.cache
Class CacheUniqueKey
- java.lang.Object
-
- org.datanucleus.cache.CacheUniqueKey
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CacheUniqueKey>
public class CacheUniqueKey extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<CacheUniqueKey>
Key representing a unique key for a persistable object. This is used to cache a CachedPC against a key other than its primary key.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) inthashCodeprivate static longserialVersionUID(package private) java.lang.StringtoString
-
Constructor Summary
Constructors Constructor Description CacheUniqueKey(java.lang.String className, java.lang.String[] fieldNames, java.lang.Object[] fieldValues)Constructor for a unique cache key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(CacheUniqueKey o)booleanequals(java.lang.Object other)booleanequals(CacheUniqueKey other)inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
toString
java.lang.String toString
-
hashCode
int hashCode
-
-
Constructor Detail
-
CacheUniqueKey
public CacheUniqueKey(java.lang.String className, java.lang.String[] fieldNames, java.lang.Object[] fieldValues)Constructor for a unique cache key.- Parameters:
className- Name of the class of the persistable objectfieldNames- Names of the fields used to form the unique keyfieldValues- Values of the fields used to form the unique key
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(CacheUniqueKey o)
- Specified by:
compareToin interfacejava.lang.Comparable<CacheUniqueKey>
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(CacheUniqueKey other)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-