Package org.iplass.mtp.transaction
Class NoTransaction
java.lang.Object
org.iplass.mtp.transaction.NoTransaction
- All Implemented Interfaces:
Transaction
トランザクションがない状態を表すTransactionです。
-
Field Summary
Fields inherited from interface org.iplass.mtp.transaction.Transaction
NO_TRANSACTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransactionListener(TransactionListener listener) このトランザクションのcommit、rollbackを監視するリスナーを登録します。voidcommit()トランザクションをコミットします。booleangetAttribute(Object key) このトランザクションコンテキストに紐づけられている特定の属性を取得します。 同一トランザクション内でsetAttribute()したものがあれば、その値が取得できます。トランザクションの状態を取得します。inthashCode()booleanこのトランザクションがReadOnlyとしてマークされているかどうかを取得します。booleanこのトランザクションがsetRollbackOnlyされているかどうかを取得します。removeAttribute(Object key) このトランザクションコンテキストに紐づけられている特定の属性を削除します。voidrollback()トランザクションをロールバックします。voidsetAttribute(Object key, Object value) このトランザクションのコンテキストに特定の属性を紐づけます。voidこのトランザクションをロールバックするものとしてマークします。 setRollbackOnlyされたトランザクションは最終的にはロールバックされます。Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.iplass.mtp.transaction.Transaction
afterCommit, afterRollback
-
Constructor Details
-
NoTransaction
NoTransaction()
-
-
Method Details
-
commit
public void commit()Description copied from interface:Transactionトランザクションをコミットします。- Specified by:
commitin interfaceTransaction
-
rollback
public void rollback()Description copied from interface:Transactionトランザクションをロールバックします。- Specified by:
rollbackin interfaceTransaction
-
setRollbackOnly
public void setRollbackOnly()Description copied from interface:Transactionこのトランザクションをロールバックするものとしてマークします。 setRollbackOnlyされたトランザクションは最終的にはロールバックされます。- Specified by:
setRollbackOnlyin interfaceTransaction
-
isRollbackOnly
public boolean isRollbackOnly()Description copied from interface:TransactionこのトランザクションがsetRollbackOnlyされているかどうかを取得します。- Specified by:
isRollbackOnlyin interfaceTransaction- Returns:
- setRollbackOnlyの場合true
-
isReadOnly
public boolean isReadOnly()Description copied from interface:TransactionこのトランザクションがReadOnlyとしてマークされているかどうかを取得します。- Specified by:
isReadOnlyin interfaceTransaction- Returns:
-
getStatus
Description copied from interface:Transactionトランザクションの状態を取得します。- Specified by:
getStatusin interfaceTransaction- Returns:
-
setAttribute
Description copied from interface:Transactionこのトランザクションのコンテキストに特定の属性を紐づけます。- Specified by:
setAttributein interfaceTransaction- Parameters:
key- 属性のキーvalue- 属性の値
-
getAttribute
Description copied from interface:Transactionこのトランザクションコンテキストに紐づけられている特定の属性を取得します。 同一トランザクション内でsetAttribute()したものがあれば、その値が取得できます。- Specified by:
getAttributein interfaceTransaction- Parameters:
key- 属性のキー- Returns:
- 属性の値
-
removeAttribute
Description copied from interface:Transactionこのトランザクションコンテキストに紐づけられている特定の属性を削除します。- Specified by:
removeAttributein interfaceTransaction- Parameters:
key- 属性のキー- Returns:
- 削除された値
-
addTransactionListener
Description copied from interface:Transactionこのトランザクションのcommit、rollbackを監視するリスナーを登録します。- Specified by:
addTransactionListenerin interfaceTransaction- Parameters:
listener-
-
equals
-
hashCode
public int hashCode()
-