Class COM.odi.Persistent

java.lang.Object
   |
   +----COM.odi.Persistent

public class Persistent
extends Object
implements IPersistent
Note: Persistent is deprecated.

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 Index

 o clone()
Clones the persistence-capable object.
 o deepFetch(Object)
Deprecated.
 o destroy()
Deprecated.
 o dirty(Object)
Deprecated.
 o fetch(Object)
Deprecated.
 o isDestroyed()
Deprecated.
 o postInitializeContents()
Called by ObjectStore immediately after calling the initializeContents() method.
 o preClearContents()
Called by ObjectStore immediately before calling the clearContents() method.
 o preDestroyPersistent()
Hook for ObjectStore.destroy(object).
 o preFlushContents()
Called by ObjectStore immediately before calling the flushContents() method.

Methods

 o postInitializeContents
  public void postInitializeContents()
Called by ObjectStore 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.

 o preFlushContents
  public void preFlushContents()
Called by ObjectStore 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.

 o preClearContents
  public void preClearContents()
Called by ObjectStore 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.

 o fetch
  public static void fetch(Object object)
Note: fetch() is deprecated.

See Also:
fetch
 o deepFetch
  public static void deepFetch(Object object)
Note: deepFetch() is deprecated.

See Also:
deepFetch
 o dirty
  public static void dirty(Object object)
Note: dirty() is deprecated.

See Also:
dirty
 o clone
  protected Object clone() throws CloneNotSupportedException
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.
Overrides:
clone in class Object
 o destroy
  public void destroy()
Note: destroy() is deprecated. Use ObjectStore.destroy() in place of this deprecated method.

 o preDestroyPersistent
  public void preDestroyPersistent()
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.

 o isDestroyed
  public boolean isDestroyed()
Note: isDestroyed() is deprecated. Use ObjectStore.isDestroyed() in place of this deprecated method.


Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.