Пример #1
0
 @Override
 public void accept(final Transaction transaction) {
   if (transaction.isOpen()) transaction.commit();
 }
Пример #2
0
 @Override
 public void accept(final Transaction transaction) {
   if (!transaction.isOpen()) throw Exceptions.transactionMustBeOpenToReadWrite();
 }
Пример #3
0
 @Override
 public void accept(final Transaction transaction) {
   if (transaction.isOpen()) throw Exceptions.openTransactionsOnClose();
 }
Пример #4
0
 @Override
 public void accept(final Transaction transaction) {
   if (!transaction.isOpen()) transaction.open();
 }
Пример #5
0
 @Override
 public void accept(final Transaction transaction) {
   if (transaction.isOpen()) transaction.rollback();
 }