Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ojb.broker
Class PersistentObject  view PersistentObject download PersistentObject.java

java.lang.Object
  extended byojb.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


Field Summary
private static PersistenceBroker _TheBroker
          The PersistenceBroker
 
Constructor Summary
PersistentObject()
           
 
Method Summary
 void delete()
          generates and executes a DELETE Statement that remove the objects representation from the underlying database.
private static PersistenceBroker getBroker()
          return reference to PersistenceBroker
static PersistentObject getObjectByIdentity(Identity oid)
          The Object Factory for persistent objects.
 void store()
          Make an object persistent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_TheBroker

private static PersistenceBroker _TheBroker
The PersistenceBroker

Constructor Detail

PersistentObject

public PersistentObject()
Method Detail

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