Package hirondelle.web4j.database

Examples of hirondelle.web4j.database.Tx


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


   Move the given unknown to the <tt>BaseText</tt> table.
  */
  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());
  }
View Full Code Here

   <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

  
   <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

   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

   @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

TOP

Related Classes of hirondelle.web4j.database.Tx

Copyright © 2018 www.massapicom. 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.