org.exolab.core.database.recman
Class PMDHandle

java.lang.Object
  extended by org.exolab.core.foundation.PersistentObject
      extended by org.exolab.core.database.recman.PMDHandle
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, HandleIfc, PersistentCapableIfc

public class PMDHandle
extends PersistentObject
implements HandleIfc, java.io.Externalizable

This handle references an object in the PageManaged database. Resolving this object implies fetching by id.

Version:
$Revision: 1.3 $ $Date: 2001/06/12 07:11:35 $
Author:
Jim Alateras
See Also:
Serialized Form

Constructor Summary
PMDHandle()
          Default constructor.
PMDHandle(PersistentCapableIfc object)
          Construct an instance of this class given the specified persistent object.
 
Method Summary
 void clearCache()
          Clear the cahced object so that a call to resolve will actually refetch the object from the datanase
 boolean equals(java.lang.Object object)
          Return true if the object id's are the same and false otherwise
 void readExternal(java.io.ObjectInput stream)
           
 java.lang.Object resolve()
          Resolve this handle and return a reference to the object or null if it cannot be resolved.
 void writeExternal(java.io.ObjectOutput stream)
           
 
Methods inherited from class org.exolab.core.foundation.PersistentObject
clone, getId, getMinimumObjectSize, getObjectId, getObjectVersion, getVersion, setId, setMinimumObjectSize, setObjectId, setObjectVersion, setVersion
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exolab.core.foundation.PersistentCapableIfc
getMinimumObjectSize, getObjectId, getObjectVersion, setMinimumObjectSize
 

Constructor Detail

PMDHandle

public PMDHandle()
Default constructor. No real use except for serialization


PMDHandle

public PMDHandle(PersistentCapableIfc object)
          throws FailedToCreateHandleException
Construct an instance of this class given the specified persistent object. An object consists of the object identifier

Parameters:
object - persistent object
Throws:
FailedToCreateHandleException
Method Detail

resolve

public java.lang.Object resolve()
Resolve this handle and return a reference to the object or null if it cannot be resolved.

Specified by:
resolve in interface HandleIfc
Returns:
PersistentCapableIfc resolved object

clearCache

public void clearCache()
Clear the cahced object so that a call to resolve will actually refetch the object from the datanase


equals

public boolean equals(java.lang.Object object)
Return true if the object id's are the same and false otherwise

Overrides:
equals in class PersistentObject
Parameters:
object - object to compare against
Returns:
boolean

writeExternal

public void writeExternal(java.io.ObjectOutput stream)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class PersistentObject
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput stream)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class PersistentObject
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 1999-2012 The Exolab Group. All Rights Reserved.