This method provides an interface for working with transactions.

Using Transactions

In order to operate on the transaction within your application, you need to import it into your application.

import com.orientechnologies.orient.core.tx.OTransaction;


MethodReturn TypeDescription
amountOfNestedTxs()intReturns the number of transactions attached to this instance
begin()voidInitiates the transaction
close()voidCloses the transaction
commit()voidCommits the transaction
getDatabase()ODatabaseDocumentRetrieves the database
getEntryCount()intRetrieves the number of entries in the transaction
getInvolvedIndexes()List<String>Retrieves indexes used in the transaction
getIsolationLevel()OTransaction.ISOLATION_LEVELRetrieves the transaction Isolation Level
getNewRecordEntriesByClass()List<ORecordOperation>Retrieves a list of record operations by OClass from the transaction
getNewRecordEntriesByCluster()List<ORecordOperation>Retrieves a list of record operation by OCluster from the transaction
getRecordEntry()ORecordOperationRetrieves a record operation from the transaction
getRecordOperations()Iterable<? extends ORecordOperation>Retrieves record operations from the transaction
getStatus()OTransaction.TXSTATUSRetrieves the transaction status
hasRecordCreation()booleanIndicates whether any records were created in the transaction
rollback()voidReverts changes from the transaction
setIsolationLevel()OTransactionSets the transaction Isolation Level