1 21 package oracle.toplink.essentials.internal.identitymaps; 23 24 import java.lang.ref.*; 25 import java.util.Vector ; 26 27 37 public class WeakCacheKey extends CacheKey { 38 39 40 protected WeakReference reference; 41 42 48 public WeakCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { 49 super(primaryKey, object, writeLockValue, readTime); 50 } 51 52 public Object getObject() { 53 return getReference().get(); 54 } 55 56 public WeakReference getReference() { 57 return reference; 58 } 59 60 public void setObject(Object object) { 61 setReference(new WeakReference(object)); 62 } 63 64 protected void setReference(WeakReference reference) { 65 this.reference = reference; 66 } 67 } 68 | Popular Tags |