Examples of Tx


Examples of hirondelle.web4j.database.Tx

   <P>(This method uses a transaction.)
  */
  void delete(SafeText aUserName) throws DAOException {
    SqlId[] sqlIds = {ROLES_DELETE, USER_DELETE};
    Object[] params = {aUserName, aUserName};
    Tx deleteUserAndRoles = new TxSimple(sqlIds, params);
    deleteUserAndRoles.executeTx();
  }
View Full Code Here

Examples of hirondelle.web4j.database.Tx

  
   <P>This implementation will treat all edits to user roles as '<tt>DELETE-ALL</tt>, then
   <tt>ADD-ALL</tt>' operations.
  */
  boolean change(UserRole aUserRole) throws DAOException {
    Tx update = new UpdateTransaction(aUserRole);
    return Util.isSuccess(update.executeTx());
  }
View Full Code Here

Examples of hirondelle.web4j.database.Tx

   Update an existing {@link Prediction}.
   <P>The outcome date is set only when the outcome itself has changed from its previous value.
   @return <tt>true</tt> only if the edit is executed successfullly.
   */
  boolean change(Prediction aPrediction, Id aPredictionListId, DateTime aToday) throws DAOException, DuplicateException {
    Tx changeTx = new Change(aPrediction, aPredictionListId, aToday);
    return Util.isSuccess(changeTx.executeTx());
  }
View Full Code Here

Examples of hirondelle.web4j.database.Tx

   @param aLoginName current user's login name
   @param aUserId underlying database id corresponding to the login name
   @param aLists all prediction lists owned by the user
   */
  int delete(SafeText aLoginName, Id aUserId, List<PredictionList> aLists) throws DAOException{
    Tx deleteAll = new DeleteAllTx(aLoginName, aUserId, aLists);
    return deleteAll.executeTx();
  }
View Full Code Here

Examples of org.activemq.store.journal.JournalTransactionStore.Tx

                          case TxCommand.XA_PREPARE:
                              transactionStore.replayPrepare(command.getTransactionId());
                              break;
                          case TxCommand.XA_COMMIT:
                          case TxCommand.LOCAL_COMMIT:
                              Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
                              // Replay the committed operations.
                              if( tx!=null) {
                                  tx.getOperations();
                                  for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
                                      TxOperation op = (TxOperation) iter.next();
                                      if( op.operationType == TxOperation.ADD_OPERATION_TYPE ) {
                                          op.store.replayAddMessage((ActiveMQMessage) op.data);
                                      }
                                      if( op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
View Full Code Here

Examples of org.activemq.store.journal.JournalTransactionStore.Tx

                          case TxCommand.XA_PREPARE:
                              transactionStore.replayPrepare(command.getTransactionId());
                              break;
                          case TxCommand.XA_COMMIT:
                          case TxCommand.LOCAL_COMMIT:
                              Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
                              // Replay the committed operations.
                              tx.getOperations();
                              for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
                                  TxOperation op = (TxOperation) iter.next();
                                  if( op.operationType == TxOperation.ADD_OPERATION_TYPE ) {
                                      op.store.replayAddMessage((ActiveMQMessage) op.data);
                                  }
                                  if( op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
View Full Code Here

Examples of org.activemq.store.journal.JournalTransactionStore.Tx

                          case TxCommand.XA_PREPARE:
                              transactionStore.replayPrepare(command.getTransactionId());
                              break;
                          case TxCommand.XA_COMMIT:
                          case TxCommand.LOCAL_COMMIT:
                              Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
                              // Replay the committed operations.
                              if( tx!=null) {
                                  tx.getOperations();
                                  for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
                                      TxOperation op = (TxOperation) iter.next();
                                      if( op.operationType == TxOperation.ADD_OPERATION_TYPE ) {
                                          op.store.replayAddMessage((ActiveMQMessage) op.data);
                                      }
                                      if( op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
View Full Code Here

Examples of org.apache.activemq.store.journal.JournalTransactionStore.Tx

                        case JournalTransaction.XA_PREPARE:
                            transactionStore.replayPrepare(command.getTransactionId());
                            break;
                        case JournalTransaction.XA_COMMIT:
                        case JournalTransaction.LOCAL_COMMIT:
                            Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
                            if (tx == null) {
                                break; // We may be trying to replay a commit
                            }
                            // that
                            // was already committed.

                            // Replay the committed operations.
                            tx.getOperations();
                            for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
                                TxOperation op = (TxOperation)iter.next();
                                if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {
                                    op.store.replayAddMessage(context, (Message)op.data);
                                }
                                if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
View Full Code Here

Examples of org.apache.activemq.store.journal.JournalTransactionStore.Tx

                        case JournalTransaction.XA_PREPARE:
                            transactionStore.replayPrepare(command.getTransactionId());
                            break;
                        case JournalTransaction.XA_COMMIT:
                        case JournalTransaction.LOCAL_COMMIT:
                            Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
                            if (tx == null) {
                                break; // We may be trying to replay a commit
                            }
                            // that
                            // was already committed.

                            // Replay the committed operations.
                            tx.getOperations();
                            for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
                                TxOperation op = (TxOperation)iter.next();
                                if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {
                                    op.store.replayAddMessage(context, (Message)op.data);
                                }
                                if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
View Full Code Here

Examples of org.apache.activemq.store.journal.JournalTransactionStore.Tx

                        case JournalTransaction.XA_PREPARE:
                            transactionStore.replayPrepare(command.getTransactionId());
                            break;
                        case JournalTransaction.XA_COMMIT:
                        case JournalTransaction.LOCAL_COMMIT:
                            Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
                            if (tx == null) {
                                break; // We may be trying to replay a commit
                            }
                            // that
                            // was already committed.

                            // Replay the committed operations.
                            tx.getOperations();
                            for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
                                TxOperation op = (TxOperation)iter.next();
                                if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {
                                    op.store.replayAddMessage(context, (Message)op.data);
                                }
                                if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.