org.apache.openjpa.writebehind
Class SimpleWriteBehindCacheKey

java.lang.Object
  extended by org.apache.openjpa.writebehind.SimpleWriteBehindCacheKey
All Implemented Interfaces:
WriteBehindCacheKey

public class SimpleWriteBehindCacheKey
extends Object
implements WriteBehindCacheKey

Simple key implementation (concatenates entity classname with primary key value).


Field Summary
 String _className
           
 Object _pk
           
 
Constructor Summary
SimpleWriteBehindCacheKey(String className, Object pk)
           
 
Method Summary
 boolean equals(Object obj)
          Return true if the supplied object is equal to this instance.
 String getClassName()
           
 Object getPk()
           
 int hashCode()
          Answers an integer hash for this key.
 void setClassName(String className)
           
 void setPk(Object pk)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_className

public String _className

_pk

public Object _pk
Constructor Detail

SimpleWriteBehindCacheKey

public SimpleWriteBehindCacheKey(String className,
                                 Object pk)
Method Detail

getPk

public Object getPk()

setPk

public void setPk(Object pk)

getClassName

public String getClassName()

setClassName

public void setClassName(String className)

hashCode

public int hashCode()
Description copied from interface: WriteBehindCacheKey
Answers an integer hash for this key.

Specified by:
hashCode in interface WriteBehindCacheKey
Overrides:
hashCode in class Object
Returns:
integer hashcode

equals

public boolean equals(Object obj)
Description copied from interface: WriteBehindCacheKey
Return true if the supplied object is equal to this instance.

Specified by:
equals in interface WriteBehindCacheKey
Overrides:
equals in class Object
Parameters:
obj - object to compare
Returns:
True if they are equal, otherwise false.


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.