org.cruxframework.crux.core.client.db
Class WSQLTransaction
java.lang.Object
org.cruxframework.crux.core.client.db.DBObject
org.cruxframework.crux.core.client.db.Transaction
org.cruxframework.crux.core.client.db.WSQLTransaction
- All Implemented Interfaces:
- SQLDatabase.SQLCallback, SQLDatabase.SQLTransactionCallback, SQLDatabase.SQLTransactionErrorCallback
public class WSQLTransaction
- extends Transaction
- implements SQLDatabase.SQLTransactionCallback, SQLDatabase.SQLTransactionErrorCallback, SQLDatabase.SQLCallback
A transaction on Crux Database, To create transactions, use one of Database's getTransaction() method.
- Author:
- Thiago da Rosa de Bustamante
| Fields inherited from class org.cruxframework.crux.core.client.db.DBObject |
logger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
db
protected final WSQLAbstractDatabase db
WSQLTransaction
protected WSQLTransaction(WSQLAbstractDatabase db,
String[] storeNames,
Transaction.Mode mode)
onTransaction
public void onTransaction(SQLTransaction tx)
- Specified by:
onTransaction in interface SQLDatabase.SQLTransactionCallback
onError
public void onError(SQLError error)
- Specified by:
onError in interface SQLDatabase.SQLTransactionErrorCallback
onError
public void onError(String errorMessage)
onSuccess
public void onSuccess()
- Specified by:
onSuccess in interface SQLDatabase.SQLCallback
getObjectStore
public <K,V> ObjectStore<K,V> getObjectStore(String storeName)
- Retrieve an ObjectStore manipulated by the current transaction.
- Specified by:
getObjectStore in class Transaction
- Type Parameters:
K - V - - Parameters:
storeName -
- Returns:
abort
public void abort()
- Abort current transaction and rollback operations.
- Specified by:
abort in class Transaction
abort
public void abort(boolean fireEvent)
- Abort current transaction and rollback operations.
- Parameters:
fireEvent -
getFileStore
public FileStore getFileStore()
- Retrieve a specialized object store for files handling.
- Specified by:
getFileStore in class Transaction
- Returns:
addRequest
public void addRequest(WSQLTransaction.RequestOperation operation,
Transaction.Mode[] supportedMode)
Copyright © 2014. All rights reserved.