|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.engines.jdbcengine.Engine
An implementation of the IPersistenceEngine interface. This uses the JDBC API for persistence.
| Constructor Summary | |
Engine()
Creates new Engine. |
|
| Method Summary | |
void |
acquireLock(IPersistent object)
This will acquire a lock on the database row corrsponding to the input persistent object. |
void |
add(IPersistent object)
Adds an object to the persistent store. |
void |
close()
Frees up the connection to the database. |
void |
commit()
Objects that have been added, objects that have been deleted, and objects that have been updated, will all be persisted via an invocation of this method. |
void |
delete(IPersistent object)
Deletes an object from the persistent store. |
Class |
getActualPersistentClass(Object persistentObject)
This is a helper method to determine the actual class which was used to create an IPersistent instance. |
IPersistent |
newPersistentInstance(Class persistentClass)
Generates an appropriate instance for the input persistentClass. |
Collection |
query(Criteria criteria)
Queries the underlying persistent store based on the search profile passed in the Criteria object. |
void |
rollback()
Rollbacks all the additions, deletions, updations. |
void |
update(IPersistent object)
Updates an object from the persistent store. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Engine()
throws DataSourceCreationException
DataSourceCreationException - if the connection could not be acquired.| Method Detail |
public IPersistent newPersistentInstance(Class persistentClass)
newPersistentInstance in interface IPersistenceEnginepersistentClass - The actual persistentClass which can represent a 'Class' or an 'Interface'
public Class getActualPersistentClass(Object persistentObject)
getActualPersistentClass in interface IPersistenceEnginepersistentObject - The object which implements the IPersistent instance.
public void add(IPersistent object)
throws AddFailedException
commit.
add in interface IPersistenceEngineobject - The object to persist.
AddFailedException - if any error occurs during the process.
public void update(IPersistent object)
throws UpdateFailedException
commit.
update in interface IPersistenceEngineobject - The object to update.
UpdateFailedException - if any error occurs during the process.
public void delete(IPersistent object)
throws DeleteFailedException
commit.
delete in interface IPersistenceEngineobject - The object to delete from persistent storage.
DeleteFailedException - if any error occurs during the process.
public Collection query(Criteria criteria)
throws QueryFailedException,
PostLoadFailedException
query in interface IPersistenceEnginecriteria - search profile for the query.
QueryFailedException - if any error occurs during the process.
PostLoadFailedException - if any error occurs during the invocation of the PostLoad trigger on the persistent object.
public void commit()
throws AddFailedException,
UpdateFailedException,
DeleteFailedException,
CommitFailedException
commit in interface IPersistenceEngineAddFailedException - if any error occurs during the addition of objects to the persistent store.
UpdateFailedException - if any error occurs while updating the objects of the persistent store.
DeleteFailedException - if any error occurs while deleting the objects of the persistent store.
CommitFailedException - if any error occurs during the commit.
public void rollback()
throws RollbackFailedException
rollback in interface IPersistenceEngineRollbackFailedException - if any error occurs during the process.public void close()
close in interface IPersistenceEngine
public void acquireLock(IPersistent object)
throws AlreadyLockedObjectException
acquireLock in interface IPersistenceEngineobject - The persistent object to be locked.
AlreadyLockedObjectException - if the database row has been locked by another process.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||