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) int
hashCode
private static long
serialVersionUID
(package private) java.lang.String
toString
-
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 int
compareTo(CacheUniqueKey o)
boolean
equals(java.lang.Object other)
boolean
equals(CacheUniqueKey other)
int
hashCode()
java.lang.String
toString()
-
-
-
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:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(CacheUniqueKey o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<CacheUniqueKey>
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
equals
public boolean equals(CacheUniqueKey other)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-