예제 #1
0
  public static void main(String[] args) {

    SqlMapClient sqlMapClient = SqlConfig.getAtSqlMapInstance();
    try {
      sqlMapClient.startTransaction();
      ProviderAccountDao dao = new ProviderAccountDao(sqlMapClient);
      //			update for delete
      ProviderAccount oldAccount = new ProviderAccount();
      oldAccount.setTxnId("54321");
      oldAccount.setDeleted(1L);
      oldAccount.setUpdatedBy("test");
      oldAccount.setUpdatedDate(new Date());
      dao.updateDeleted(oldAccount);
      //			insert new record
      sqlMapClient.commitTransaction();
    } catch (Exception e) {
      try {
        sqlMapClient.endTransaction();
      } catch (SQLException e1) {

      }
    }
  }
예제 #2
0
 public long selectTotalAmountByProviderId(String providerId) throws DaoException {
   ProviderAccount obj = new ProviderAccount();
   obj.setProviderId(providerId);
   return (Long) selectObject(obj, ProviderAccount.SELECT_TOTAL_AMOUNT_BY_PROVIDER_ID);
 }