| |
|
| java.lang.Object org.jboss.ejb.CacheKey
All known Subclasses: org.jboss.ejb.ListCacheKey,
CacheKey | public class CacheKey implements Externalizable(Code) | | CacheKey is an encapsulation of both the PrimaryKey and a
cache specific key.
This implementation is a safe implementation in the sense that it
doesn't rely on the user supplied hashcode and equals. It is also
fast since the hashCode operation is pre-calculated.
See Also: org.jboss.ejb.plugins.NoPassivationInstanceCache.java See Also: org.jboss.ejb.plugins.EntityInstanceCache See Also: org.jboss.ejb.plugins.EntityProxy author: Marc Fleury author: Bill Burke author: Scott Stark version: $Revision: 57209 $ |
hashCode | protected int hashCode(Code) | | The Marshalled Object's hashcode
|
id | protected Object id(Code) | | The database primaryKey.
This primaryKey is used by:
org.jboss.ejb.plugins.EntityInstanceCache.setKey() - to set the EntityEnterpriseContext id
org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke():
- implementing Entity.toString() --> cacheKey.getId().toString()
- implementing Entity.hashCode() --> cacheKey.getId().hashCode()
- etc...
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.EntityProxy.getId()
|
serialVersionUID | final static long serialVersionUID(Code) | | |
CacheKey | public CacheKey()(Code) | | |
equals | public boolean equals(Object object)(Code) | | This method uses the id implementation of equals if the mo is
null since this indicates that the id class did implement equals.
If mo is not null, then the MarshalledObject equals is used to
compare keys based on their serialized form. Relying on the
serialized form does not always work.
|
hashCode | public int hashCode()(Code) | | these should be overwritten by extending Cache key
since they define what the cache does in the first place
|
|
|
|