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.
-
clone()
- Clones the persistence-capable object.
-
deepFetch(Object)
-
Deprecated.
-
destroy()
-
Deprecated.
-
dirty(Object)
-
Deprecated.
-
fetch(Object)
-
Deprecated.
-
isDestroyed()
-
Deprecated.
-
postInitializeContents()
- Called by ObjectStore immediately after calling the initializeContents()
method.
-
preClearContents()
- Called by ObjectStore immediately before calling the clearContents()
method.
-
preDestroyPersistent()
- Hook for ObjectStore.destroy(object).
-
preFlushContents()
- Called by ObjectStore immediately before calling the flushContents()
method.
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.
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.
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.
fetch
public static void fetch(Object object)
- Note: fetch() is deprecated.
- See Also:
- fetch
deepFetch
public static void deepFetch(Object object)
- Note: deepFetch() is deprecated.
- See Also:
- deepFetch
dirty
public static void dirty(Object object)
- Note: dirty() is deprecated.
- See Also:
- dirty
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
destroy
public void destroy()
- Note: destroy() is deprecated.
Use ObjectStore.destroy()
in place of this deprecated method.
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.
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.