Class WeakObjectWrapper


  • public class WeakObjectWrapper
    extends java.lang.Object
    INTENRAL:

    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.WeakReference reference  
    • Constructor Summary

      Constructors 
      Constructor Description
      WeakObjectWrapper​(java.lang.Object domainObject)  
    • Field Detail

      • reference

        protected java.lang.ref.WeakReference reference
    • Constructor Detail

      • WeakObjectWrapper

        public WeakObjectWrapper​(java.lang.Object domainObject)
    • Method Detail

      • getDomainObject

        public java.lang.Object getDomainObject()
      • setDomainObject

        public void setDomainObject​(java.lang.Object object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object wrapper)
        Overrides:
        equals in class java.lang.Object