ojb.broker
Class PersistentObject

java.lang.Object
ojb.broker.PersistentObject
- All Implemented Interfaces:
- Persistent
- public class PersistentObject
- extends java.lang.Object
- implements Persistent
The PersistenceBroker allows to make objects of arbitrary classes persistent.
They don't have to be derived from PersistentObject.
But when Business-objects are not to be derived from a special class it may be a
good idea to use PersistentObject as the base class.
Persistent Objects manages the persistence brokers functionalities with
convenient wrapper methods
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_TheBroker
private static PersistenceBroker _TheBroker
- The PersistenceBroker
PersistentObject
public PersistentObject()
store
public void store()
- Make an object persistent. generates and execute either UPDATE or INSERT
Statement.
- Specified by:
store in interface Persistent
delete
public void delete()
- generates and executes a DELETE Statement that remove the objects
representation from the underlying database.
- Specified by:
delete in interface Persistent
getBroker
private static PersistenceBroker getBroker()
- return reference to PersistenceBroker
getObjectByIdentity
public static PersistentObject getObjectByIdentity(Identity oid)
- The Object Factory for persistent objects. the Vector pkValues must contain
Values for all Primary key fields of the Objects underlying database table