@Component(value="cuba_Transactions") public class TransactionsImpl extends java.lang.Object implements Transactions
Modifier and Type | Field and Description |
---|---|
protected BeanLocator |
beanLocator |
protected PersistenceImpl |
persistence |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
NAME
Constructor and Description |
---|
TransactionsImpl() |
Modifier and Type | Method and Description |
---|---|
Transaction |
create()
Creates a new transaction in the main data store.
|
Transaction |
create(java.lang.String storeName)
Creates a new transaction.
If there is an active transaction, it will be suspended. |
Transaction |
create(java.lang.String storeName,
TransactionParams params)
Creates a new transaction.
If there is an active transaction, it will be suspended. |
Transaction |
create(TransactionParams params)
Creates a new transaction in the main data store.
|
Transaction |
get()
Creates a new transaction in the main data store if there is no one at the moment.
|
Transaction |
get(java.lang.String storeName)
Creates a new transaction if there is no one at the moment.
|
protected org.springframework.transaction.PlatformTransactionManager |
getTransactionManager(java.lang.String store) |
@Inject @Named(value="transactionManager") protected org.springframework.transaction.PlatformTransactionManager transactionManager
@Inject protected PersistenceImpl persistence
@Inject protected BeanLocator beanLocator
public Transaction create(TransactionParams params)
Transactions
create
in interface Transactions
Transactions.create(String, TransactionParams)
public Transaction create(java.lang.String storeName, TransactionParams params)
Transactions
create
in interface Transactions
storeName
- data store nameparams
- new transaction parameterspublic Transaction create()
Transactions
create
in interface Transactions
Transactions.create(String)
public Transaction create(java.lang.String storeName)
Transactions
create
in interface Transactions
storeName
- data store namepublic Transaction get()
Transactions
get
in interface Transactions
Transactions.get(String)
public Transaction get(java.lang.String storeName)
Transactions
If a transaction exists, joins the current transaction. In this case:
Transaction.commit()
does not affect current transaction.Transaction.end()
is called without previous Transaction.commit()
, current
transaction is marked as rollback-only, so any attempt to commit the surrounding Transaction
will
throw an exception.get
in interface Transactions
storeName
- data store nameprotected org.springframework.transaction.PlatformTransactionManager getTransactionManager(java.lang.String store)