Class WeakObjectWrapper
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.WeakObjectWrapper
-
public class WeakObjectWrapper extends java.lang.ObjectINTENRAL:Purpose: This class is used for caching objects based on Object Identity instead of a Primary Key. This class acts as the Primary Key, and wraps the domain object itself in a weak reference. hashCode and equals methods are implemented to insure identity is maintained.
- Since:
- 10g
- Author:
- mmacivor
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ref.WeakReferencereference
-
Constructor Summary
Constructors Constructor Description WeakObjectWrapper(java.lang.Object domainObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object wrapper)java.lang.ObjectgetDomainObject()inthashCode()voidsetDomainObject(java.lang.Object object)
-
-
-
Method Detail
-
getDomainObject
public java.lang.Object getDomainObject()
-
setDomainObject
public void setDomainObject(java.lang.Object object)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object wrapper)
- Overrides:
equalsin classjava.lang.Object
-
-