All pastes #182297 Raw Edit

Anonymous

public text v1 · immutable
#182297 ·published 2006-09-25 22:12 UTC
rendered paste body
  public int insertList(String statementName, Object parameterObject) throws DaoException {
    int result = 0;
    ArrayList list = (ArrayList) parameterObject;
    Object obj = null;
    try {
      sqlMap.startTransaction();
      for(int i=0; i<list.size(); i++) {
        //result = sqlMap.insert(statementName, (Object) list.get(i));
        obj = sqlMap.insert(statementName, (Object) list.get(i));
      }
      sqlMap.commitTransaction();
    } catch (SQLException e) {
      try {
        sqlMap.endTransaction();
      } catch (SQLException ex) {
        throw new DaoException(ex.fillInStackTrace());
      }
      throw new DaoException(e.fillInStackTrace());
    }
    return result;
  }