|
Arch4J 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.arch4j.persistence.castor.CastorPersistenceManager
Implements the PersistenceManager interface for the Castor O/R mapping tool.
| Constructor Summary | |
CastorPersistenceManager(String logicalName)
Creates a new instance of CastorPersistenceManager |
|
| Method Summary | |
void |
beginTransaction()
Begin a transaction. |
void |
close()
Close the connection. |
void |
commit()
Commit the transaction. |
void |
create(Object anObject)
Create object or objects. |
void |
create(Object anObject,
boolean isDeepCreate)
Create object or objects. |
void |
finalize()
|
Collection |
getObjects(ObjectQuery aQuery)
Get all objects for the given query object. |
Collection |
getObjects(String aQueryString)
Get all objects for the given query string. |
ObjectQuery |
getQuery(String anOQLQueryString)
Gets the query object for a given query. |
boolean |
isPersistent(Object anObject)
Is this object recognized by the current transaction. |
Object |
load(Class type,
Object identity)
Load the specified instance. |
void |
remove(Object anObject)
Remove the Object. |
void |
rollback()
Rollback the transaction. |
void |
setDefaultDeepOrShallow(boolean isDeep)
Specifies if upcoming transactions will perform deep or shallow updates and creates. |
void |
update(Object anObject)
Update existing object or objects. |
void |
update(Object anObject,
boolean isDeepUpdate)
Update existing object or objects. |
boolean |
validateTransaction()
Validate that a transaction is started. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CastorPersistenceManager(String logicalName)
| Method Detail |
public void update(Object anObject,
boolean isDeepUpdate)
throws PersistenceException
update in interface PersistenceManagerisDeepUpdate - If true then navigate the object graph and mark the root and all
children to be updated. Otherwise, update only the root object.
PersistenceException - if this method is called on an already open transaction. Deep/shallow can only
be specified in Castor before the transaction begins.
public void create(Object anObject,
boolean isDeepCreate)
throws PersistenceException
create in interface PersistenceManagerisDeepCreate - If true then navigate the object graph and mark the root and all
children to be created. Otherwise, create only the root object.
PersistenceException - if this method is called on an already open transaction. Deep/shallow can only
be specified in Castor before the transaction begins.
public void setDefaultDeepOrShallow(boolean isDeep)
throws PersistenceException
setDefaultDeepOrShallow in interface PersistenceManagerPersistenceException
public void update(Object anObject)
throws PersistenceException
update in interface PersistenceManagerPersistenceException
public void create(Object anObject)
throws PersistenceException
create in interface PersistenceManagerPersistenceException
public boolean isPersistent(Object anObject)
throws PersistenceException
isPersistent in interface PersistenceManagerPersistenceException
public Object load(Class type,
Object identity)
throws PersistenceException
load in interface PersistenceManagertype - the class type to populate and returnidentity - the primary key used to identify the instance (note that complex
primary keys will be supported in a future release)
PersistenceException
public void beginTransaction()
throws PersistenceException
beginTransaction in interface PersistenceManagerPersistenceException
public void commit()
throws PersistenceException
commit in interface PersistenceManagerPersistenceException
public void rollback()
throws PersistenceException
rollback in interface PersistenceManagerPersistenceException
public void remove(Object anObject)
throws PersistenceException
remove in interface PersistenceManagerPersistenceException
public Collection getObjects(String aQueryString)
throws PersistenceException
getObjects in interface PersistenceManagerPersistenceException
public Collection getObjects(ObjectQuery aQuery)
throws PersistenceException
getObjects in interface PersistenceManageraQuery - The query object to use for the query.
PersistenceException
public ObjectQuery getQuery(String anOQLQueryString)
throws PersistenceException
getQuery in interface PersistenceManagerPersistenceException
public boolean validateTransaction()
throws PersistenceException
validateTransaction in interface PersistenceManagerPersistenceException
public void finalize()
throws Throwable
finalize in class ObjectThrowable
public void close()
throws PersistenceException
close in interface PersistenceManagerPersistenceException
|
Arch4J 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||