Examples of executeTx()


Examples of hirondelle.web4j.database.Tx.executeTx()

  
    <P>This is an all or none operation.
  */
  public int addAll(Set<String> aUnknowns) throws DAOException {
    Tx addTx = new AddAllUnknowns(aUnknowns);
    return addTx.executeTx();
  }
 
  /**
   Delete an item from the <tt>UnknownBaseText</tt> table.
  */
 
View Full Code Here

Examples of hirondelle.web4j.database.Tx.executeTx()

  */
  boolean move(BaseText aUnknownBaseText) throws DAOException {
    SqlId[] sqlIds = {BaseTextAction.BASE_TEXT_ADD, UnknownBaseTextEdit.DELETE};
    Object[] params = {aUnknownBaseText.getBaseText(), aUnknownBaseText.getIsCoderKey(), aUnknownBaseText.getBaseText()};
    Tx move = new TxSimple(sqlIds, params);
    return Util.isSuccess(move.executeTx());
  }
 
  // PRIVATE //
 
  /**
 
View Full Code Here

Examples of hirondelle.web4j.database.Tx.executeTx()

  */
  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.executeTx()

   <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());
  }
 
  // PRIVATE //
  private static final int NUM_CTOR_ARGS_CHILD = 1;
 
View Full Code Here

Examples of hirondelle.web4j.database.Tx.executeTx()

   <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());
  }
 
  /**
   Delete a {@link Prediction}.
  */
 
View Full Code Here

Examples of hirondelle.web4j.database.Tx.executeTx()

   @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();
  }

  // PRIVATE //

  /** Transaction for deleting all items as a single unit of work. */
 
View Full Code Here

Examples of hirondelle.web4j.database.TxSimple.executeTx()

  */
  boolean move(BaseText aUnknownBaseText) throws DAOException {
    SqlId[] sqlIds = {BaseTextAction.BASE_TEXT_ADD, UnknownBaseTextEdit.DELETE};
    Object[] params = {aUnknownBaseText.getBaseText(), aUnknownBaseText.getIsCoderKey(), aUnknownBaseText.getBaseText()};
    Tx move = new TxSimple(sqlIds, params);
    return Util.isSuccess(move.executeTx());
  }
 
  // PRIVATE //
 
  /**
 
View Full Code Here

Examples of hirondelle.web4j.database.TxSimple.executeTx()

  */
  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.TxSimple.executeTx()

      aRegister.getLoginName(), aRegister.getScreenName(), Id.from(hashedPassword), aRegister.getEmail(),
      /*params for role: */
      aRegister.getLoginName()
    };
    TxSimple tx = new TxSimple(sqls, params);
    int numRecords = tx.executeTx();
    if ( numRecords != 2 ){
      String msg = "Should have added 2 records (user and single role), but added this many: " + numRecords;
      throw new AssertionError(msg);
    }
  }
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.