com.odi
Class Persistent

java.lang.Object
  extended bycom.odi.Persistent
All Implemented Interfaces:
IPersistent, IPersistentHooks
Direct Known Subclasses:
HashPersistent, UnregisteredType

Deprecated. 

public abstract class Persistent
extends Object
implements IPersistent, IPersistentHooks

In previous releases, to be persistence-capable, a class had to extend Persistent or HashPersistent. In this release, to be persistence-capable, a class or its superclass must implement the IPersistent interface.

A class whose instances can be stored in a database is considered to be a persistence-capable class.

Normally, to define a persistence-capable class, you run the Class File Postprocessor to annotate your class so that it implements IPersistent. In rare situations, you can explicitly define your class to implement IPersistent and the methods it defines. See IPersistent for more details on the interface and the methods it requires.


Method Summary
protected  Object clone()
          Deprecated. Clones the persistence-capable object.
static void deepFetch(Object object)
          Deprecated.  
 void destroy()
          Deprecated. Use ObjectStore.destroy() in place of this deprecated method.
static void dirty(Object object)
          Deprecated.  
static void fetch(Object object)
          Deprecated.  
 boolean isDestroyed()
          Deprecated. Use ObjectStore.isDestroyed() in place of this deprecated method.
 void postInitializeContents()
          Deprecated. Called by PSE/PSE Pro immediately after calling the initializeContents() method.
 void preClearContents()
          Deprecated. Called by PSE/PSE Pro immediately before calling the clearContents() method.
 void preDestroyPersistent()
          Deprecated. Hook for ObjectStore.destroy(object).
 void preFlushContents()
          Deprecated. Called by PSE/PSE Pro immediately before calling the flushContents() method.
 

Method Detail

postInitializeContents

public void postInitializeContents()
Deprecated. 
Called by PSE/PSE Pro immediately after calling the initializeContents() method. Implement this method when you want to customize behavior.

This method must not call any methods of the class and must not start or end a transaction. For more information, see Implementing Customized Methods and Hook Methods in Chapter 9 of the API User Guide.

Specified by:
postInitializeContents in interface IPersistentHooks

preFlushContents

public void preFlushContents()
Deprecated. 
Called by PSE/PSE Pro immediately before calling the flushContents() method. Implement this method when you want to customize behavior.

This method must not call any methods of the class and must not start or end a transaction. For more information, see Implementing Customized Methods and Hook Methods in Chapter 9 of the API User Guide.

Specified by:
preFlushContents in interface IPersistentHooks

preClearContents

public void preClearContents()
Deprecated. 
Called by PSE/PSE Pro immediately before calling the clearContents() method. Implement this method when you want to customize behavior, typically to clear transient-only fields to permit the objects to be garbage collected.

This method must not call any methods of the class and must not start or end a transaction. For more information, see Implementing Customized Methods and Hook Methods in Chapter 9 of the API User Guide.

Specified by:
preClearContents in interface IPersistentHooks

fetch

public static void fetch(Object object)
Deprecated.  

See Also:
ObjectStore.fetch(java.lang.Object)

deepFetch

public static void deepFetch(Object object)
Deprecated.  

See Also:
ObjectStore.deepFetch(java.lang.Object)

dirty

public static void dirty(Object object)
Deprecated.  

See Also:
ObjectStore.dirty(java.lang.Object)

clone

protected Object clone()
                throws CloneNotSupportedException
Deprecated. 
Clones the persistence-capable object. The object itself must have been fetched, since it is meaningless to clone an object when it has no contents. The clone is always initially transient, but it can become persistent by the usual persistence mechanisms.

Returns:
The cloned object.
Throws:
CloneNotSupportedException - If the subclass of Persistent does not implement the Cloneable interface.

destroy

public void destroy()
Deprecated. Use ObjectStore.destroy() in place of this deprecated method.


preDestroyPersistent

public void preDestroyPersistent()
Deprecated. 
Hook for ObjectStore.destroy(object). If ObjectStore.destroy(object) is called on an object, this method is called before the object argument is actually destroyed. A user class may override this method in order to destroy any internal persistent data structures that it references. For example, if a user "Btree" class has internal persistent types representing the leaves of the tree which are not visible via its API, the Btree.preDestroyPersistent method may be defined to remove those leaves from the database. Btree.preDestroyPersistent should not call ObjectStore.destroy(this).

The default implementation of this method does nothing.

Specified by:
preDestroyPersistent in interface IPersistentHooks

isDestroyed

public boolean isDestroyed()
Deprecated. Use ObjectStore.isDestroyed() in place of this deprecated method.



Copyright 2005 Progress Software Corporation. All rights reserved.