com.objectwave.persist
Interface Persistence

All Superinterfaces:
java.io.Serializable, TransactionalObjectIF
All Known Subinterfaces:
RDBPersistence
All Known Implementing Classes:
DomainObject, DomainObject, InvertEmployeePersistenceBase, InvertPersonPersistenceBase, PersistenceBase, RDBPersistentAdapter

public interface Persistence
extends TransactionalObjectIF, java.io.Serializable

A persistent object can either implement all of the necessary support for persistence, or have an adapter who does it. If an adapter performs the actions, most likely all of the methods in this interface will be delegated to the adapter.

Version:
1.5
Author:
Dave Hoag
See Also:
com.objectwave.transactionalSupport.TransactionalObject

Method Summary
 void delete()
           
 Persistence getAdapter()
          Gets the Adapter attribute of the Persistence object
 java.lang.String getBrokerName()
          Broker names allow an application to have multiple brokers.
 java.lang.Object getPrimaryKeyField()
          Gets the PrimaryKeyField attribute of the Persistence object
 java.lang.Object[] getPrimaryKeyFields()
          Gets the PrimaryKeyFields attribute of the Persistence object
 void insert()
          Force this object to be a part of the changedObjects list.
 boolean isRetrievedFromDatabase()
          Gets the RetrievedFromDatabase attribute of the Persistence object
 boolean lock(boolean wait)
          Support explicit locking and unlocking.
 void save()
           
 void setBrokerName(java.lang.String str)
          Sets the BrokerName attribute of the Persistence object
 void setPrimaryKeyField(java.lang.Object val)
          Sets the PrimaryKeyField attribute of the Persistence object
 void setRetrievedFromDatabase(boolean b)
          Sets the RetrievedFromDatabase attribute of the Persistence object
 void unlock()
          Support explicit locking and unlocking.
 boolean usesAdapter()
           
 
Methods inherited from interface com.objectwave.transactionalSupport.TransactionalObjectIF
getObjectEditor, isDirty, isTransient, setAsTransient, setObjectEditor, update
 

Method Detail

delete

public void delete()
            throws QueryException
Throws:
QueryException

getAdapter

public Persistence getAdapter()
Gets the Adapter attribute of the Persistence object

Returns:
The Adapter value

getBrokerName

public java.lang.String getBrokerName()
Broker names allow an application to have multiple brokers. Every PersistentObject can be associated with only one broker.

Returns:
The BrokerName value

setBrokerName

public void setBrokerName(java.lang.String str)
Sets the BrokerName attribute of the Persistence object

Parameters:
str - The new BrokerName value

getPrimaryKeyField

public java.lang.Object getPrimaryKeyField()
Gets the PrimaryKeyField attribute of the Persistence object

Returns:
The PrimaryKeyField value

getPrimaryKeyFields

public java.lang.Object[] getPrimaryKeyFields()
Gets the PrimaryKeyFields attribute of the Persistence object

Returns:
The PrimaryKeyFields value

insert

public void insert()
            throws QueryException
Force this object to be a part of the changedObjects list.

Throws:
QueryException

isRetrievedFromDatabase

public boolean isRetrievedFromDatabase()
Gets the RetrievedFromDatabase attribute of the Persistence object

Returns:
The RetrievedFromDatabase value

lock

public boolean lock(boolean wait)
Support explicit locking and unlocking.

Parameters:
wait - true if the caller wants the suspend the thread until the object can be locked.
Returns:
true if and only if the object was successfully locked.

save

public void save()
          throws QueryException
Throws:
QueryException

setPrimaryKeyField

public void setPrimaryKeyField(java.lang.Object val)
Sets the PrimaryKeyField attribute of the Persistence object

Parameters:
val - The new PrimaryKeyField value

setRetrievedFromDatabase

public void setRetrievedFromDatabase(boolean b)
Sets the RetrievedFromDatabase attribute of the Persistence object

Parameters:
b - The new RetrievedFromDatabase value

unlock

public void unlock()
Support explicit locking and unlocking.


usesAdapter

public boolean usesAdapter()
Returns: