|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Purpose: Add login and configuration API to that of Session. This interface is to be used during the creation and login of the session only. The Session interface should be used after login for normal reading/writing.
| Method Summary |
| Type | Method |
|---|---|
void |
addDescriptor(Descriptor descriptor)
PUBLIC: Add the descriptor to the session. |
void |
addDescriptors(Project project)
PUBLIC: Add the descriptors to the session from the Project. |
void |
addDescriptors(java.util.Vector descriptors)
PUBLIC: Add the descriptors to the session. |
void |
beginTransaction()
PUBLIC: Begin a transaction on the database. |
void |
commitTransaction()
PUBLIC: Commit the active database transaction. |
void |
deleteAllObjects(java.util.Collection domainObjects)
PUBLIC: delete all of the objects and all of their privately owned parts in the database. |
void |
deleteAllObjects(java.util.Vector domainObjects)
PUBLIC: delete all of the objects and all of their privately owned parts in the database. |
java.lang.Object |
deleteObject(java.lang.Object domainObject)
PUBLIC: Delete the object and all of its privately owned parts from the database. |
java.lang.Object |
insertObject(java.lang.Object domainObject)
PUBLIC: Insert the object and all of its privately owned parts into the database. |
boolean |
isInTransaction()
PUBLIC: Return if the session is currently in the progress of a database transaction. |
void |
login()
PUBLIC: Connect to the database using the predefined login. |
void |
login(Login login)
PUBLIC: Connect to the database using the given login. |
void |
login(java.lang.String userName,
java.lang.String password)
PUBLIC: Connect to the database using the given user name and password. |
void |
logout()
PUBLIC: Disconnect from the database. |
java.lang.Object |
refreshAndLockObject(java.lang.Object object)
PUBLIC: Refresh the attributes of the object and of all of its private parts from the database. |
java.lang.Object |
refreshAndLockObject(java.lang.Object object,
short lockMode)
PUBLIC: Refresh the attributes of the object and of all of its private parts from the database. |
void |
rollbackTransaction()
PUBLIC: Rollback the active database transaction. |
void |
setExternalTransactionController(ExternalTransactionController etc)
PUBLIC: Used for JTS integration. |
void |
setLogin(DatabaseLogin login)
PUBLIC: Set the login. |
java.lang.Object |
updateObject(java.lang.Object domainObject)
PUBLIC: Update the object and all of its privately owned parts in the database. |
void |
writeAllObjects(java.util.Collection domainObjects)
PUBLIC: Write all of the objects and all of their privately owned parts in the database. |
void |
writeAllObjects(java.util.Vector domainObjects)
PUBLIC: Write all of the objects and all of their privately owned parts in the database. |
java.lang.Object |
writeObject(java.lang.Object domainObject)
PUBLIC: Write the object and all of its privately owned parts in the database. |
| Method Detail |
public void addDescriptor(Descriptor descriptor)
addDescriptors(Vector),
addDescriptors(Project)public void addDescriptors(java.util.Vector descriptors)
public void addDescriptors(Project project)
public void beginTransaction()
throws DatabaseException
DatabaseException - if the database connection is lost or the begin is rejected.isInTransaction()
public void commitTransaction()
throws DatabaseException
DatabaseException - most databases validate changes as they are done,
normally errors do not occur on commit unless the disk fails or the connection is lost.ConcurrencyException - if this session is not within a transaction.public void deleteAllObjects(java.util.Collection domainObjects)
DatabaseException - if an error occurs on the database,
these include constraint violations, security violations and general database erros.OptimisticLockException - if the object's descriptor is using optimistic locking
and
the object has been updated or deleted by another user since it was last read.public void deleteAllObjects(java.util.Vector domainObjects)
DatabaseException - if an error occurs on the database,
these include constraint violations, security violations and general database erros.OptimisticLockException - if the object's descriptor is using optimistic locking
and
the object has been updated or deleted by another user since it was last read.
public java.lang.Object deleteObject(java.lang.Object domainObject)
throws DatabaseException,
OptimisticLockException
DeleteObjectQuery
public java.lang.Object insertObject(java.lang.Object domainObject)
throws DatabaseException
InsertObjectQuery,
writeObject(Object)public boolean isInTransaction()
public void login()
throws DatabaseException
login(Login)
public void login(java.lang.String userName,
java.lang.String password)
throws DatabaseException
public void login(Login login)
throws DatabaseException
public void logout()
throws DatabaseException
TopLinkException - if a transaction is active, you must rollback any active transaction before logout.DatabaseException
- the database will also raise an error if their is an active transaction,
or a general error occurs.public java.lang.Object refreshAndLockObject(java.lang.Object object)
#refreshAndLockObject(Object, lockMode)
public java.lang.Object refreshAndLockObject(java.lang.Object object,
short lockMode)
Lock Modes: ObjectLevelReadQuery.NO_LOCK, LOCK, LOCK_NOWAIT
public void rollbackTransaction()
throws DatabaseException
DatabaseException - if the database connection is lost or the rollback fails.ConcurrencyException
- if this session is not within a transaction.public void setExternalTransactionController(ExternalTransactionController etc)
setExternalTransactionController in interface SessionJTSExternalTransactionControllerpublic void setLogin(DatabaseLogin login)
public java.lang.Object updateObject(java.lang.Object domainObject)
throws DatabaseException,
OptimisticLockException
UpdateObjectQuery,
writeObject(Object)public void writeAllObjects(java.util.Collection domainObjects)
DatabaseException - if an error occurs on the database,
these include constraint violations, security violations and general database erros.OptimisticLockException - if the object's descriptor is using optimistic locking
and
the object has been updated or deleted by another user since it was last read.public void writeAllObjects(java.util.Vector domainObjects)
DatabaseException - if an error occurs on the database,
these include constraint violations, security violations and general database erros.OptimisticLockException - if the object's descriptor is using optimistic locking
and
the object has been updated or deleted by another user since it was last read.
public java.lang.Object writeObject(java.lang.Object domainObject)
throws DatabaseException,
OptimisticLockException
WriteObjectQuery,
insertObject(Object),
updateObject(Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||