|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
IDataTransaction handles transactions for IDataService API. IDataTransaction differ somewhat from traditional transactions in the fact that none off the operations are actually performed until the commit method is called. Before that the operations is simple stored in ordered queue. IDataTransaction can be used as a reusable batch queue of operations that can be called and recalled at any convinance. The classes that implements the interface may NOT lock any system resources.
Nested Class Summary | |
static interface |
IDataTransaction.IProgressListener
Listener interface for the Job class. |
static class |
IDataTransaction.Job
Instances of this class is returned from the commitAsynchroniesly
method. |
static class |
IDataTransaction.ProgressAdapter
|
static class |
IDataTransaction.ProgressEvent
Event classed used by IProgressListener. |
Method Summary | |
void |
abortTransaction()
Tries to abort the currently executing transaction. |
void |
addCreate(IEntityDescriptor entityDescriptor)
|
void |
addDelete(IEntity entity)
|
void |
addLoad(Qualifier identitQualifier,
IEntity resultEntity)
|
void |
addLoadSelection(DataQuery dataQuery,
ISelection resultSelection)
|
void |
addLoadSelection(IEntityDescriptor entityDescriptor,
Qualifier qualifier,
IEntityRelationPath relationPath,
ISelection resultSelection)
|
void |
addLoadSelection(IEntityDescriptor entityDescriptor,
Qualifier qualifier,
ISelection resultSelection)
|
void |
addRefresh(IEntity entity)
|
void |
addRelation(IEntityRelation relation)
|
void |
addStore(IEntity entity)
|
void |
commit()
Commit performs all the stored operations in the transaction. |
IDataTransaction.Job |
commitAsynchroniesly(java.lang.Object lock)
This method creates a Job that when executed will perform the same actions as the commit method. |
int |
getID()
Returns a unique id for this data transaction. |
boolean |
isEmpty()
Help methods that returns true if the transaction is empty, wich means that no operations has been added to it and that commit neads no be called. |
boolean |
isMutating()
Help methods that returns true if one or more store or delete methods has been added to the transaction. |
Method Detail |
public void commit() throws DataServiceException
DataServiceException
public IDataTransaction.Job commitAsynchroniesly(java.lang.Object lock) throws DataServiceException
commit
method.
lock
- when the commit finishes all threads that waits on this object
will be notified. This parameter may be null
.
DataServiceException
public void abortTransaction() throws DataServiceException
DataServiceException
public int getID()
public void addLoad(Qualifier identitQualifier, IEntity resultEntity)
public void addLoadSelection(IEntityDescriptor entityDescriptor, Qualifier qualifier, ISelection resultSelection)
public void addLoadSelection(IEntityDescriptor entityDescriptor, Qualifier qualifier, IEntityRelationPath relationPath, ISelection resultSelection)
public void addLoadSelection(DataQuery dataQuery, ISelection resultSelection)
public void addStore(IEntity entity)
public void addDelete(IEntity entity)
public void addRefresh(IEntity entity)
public void addCreate(IEntityDescriptor entityDescriptor)
public void addRelation(IEntityRelation relation)
public boolean isEmpty()
public boolean isMutating()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |