Examples of ResultSetHandler


Examples of com.iCo6.util.org.apache.commons.dbutils.ResultSetHandler

                QueryRunner run = new QueryRunner();

                try {
                    try{
                        run.query(old, "SELECT * FROM " + table, new ResultSetHandler(){
                            public Object handle(ResultSet rs) throws SQLException {
                                Account current = null;
                                Boolean next = rs.next();

                                if(next)
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

  public void updateRecord(String tableName, String primaryKeyName, Map columnMap
  throws ControllerException  {
   
    Connection conn = null;
    QueryRunner queryRunner = new QueryRunner(dataSource);
    ResultSetHandler rsh = new MapHandler();
    String sql = null;

    try {
      conn = dataSource.getConnection();
      conn.setAutoCommit(false)// Start transaction
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

      System.out.println(se.getMessage());
      return;
    }
   
    QueryRunner runner = new QueryRunner();
    ResultSetHandler rsh = new MapHandler();
    String sql = "select * from Client where (ClientID=1)";
    Map clientMap = null;
    try {
      clientMap = (Map) runner.query(conn, sql, null, rsh);
    } catch (SQLException se) {
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

    } else {
      sql += " set acount unlock";
    }
     
    QueryRunner queryRunner = new QueryRunner(DataSourceHandler.getDataSource());
    ResultSetHandler rsh = new MapHandler();
    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("SystemDBController: " + se.getMessage());
      throw new ControllerException(se);
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

    if (groupList != null) {
      sql += " set groups '" + groupList +"'";
    }
   
    QueryRunner queryRunner = new QueryRunner(DataSourceHandler.getDataSource());
    ResultSetHandler rsh = new MapHandler();
    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("SystemDBController: " + se.getMessage());
      throw new ControllerException(se);
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

   
    // Create user in system database as well.
    String sql = "select * from SYS_INFO.sUSRPassword";
    sql += " where (UserName='" + userName + "')";
    QueryRunner queryRunner = new QueryRunner(DataSourceHandler.getDataSource());
    ResultSetHandler rsh = new MapHandler();

    try {
      return (Map) queryRunner.query(sql, rsh);
    } catch (SQLException se) {
      log.warning("SystemDBController: " + se.getMessage());
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

   *
   */
  public static void loadParameters() {

      QueryRunner queryRunner = new QueryRunner(DataSourceHandler.getDataSource());
      ResultSetHandler rsh = new MapListHandler();
      String sql = "select * from parameter";
     
      try {
        parameterMap = (Map) queryRunner.query(sql, rsh);
      } catch (SQLException se) {
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

 
  public void go() {
   
    DataSource dataSource= DataSourceHandler.getDataSource();
    QueryRunner runner = new QueryRunner(dataSource);
    ResultSetHandler rsh = new ResultSetMetaDataHandler();
    String sql = "select * from Client";
    List columnList = null;
    try {
      columnList = (List) runner.query(sql, rsh);
    } catch (SQLException se) {
View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

    String orderClause,
    String whereClause)
    throws ControllerException {

    QueryRunner queryRunner = new QueryRunner(dataSource);
    ResultSetHandler rsh = new MapListHandler();
    String sql = null;

    try {
      sql = "SELECT * FROM " + tableName;

View Full Code Here

Examples of org.apache.commons.dbutils.ResultSetHandler

   */
  public Map findWhere(String tableName, String whereClause)
    throws ControllerException, FinderException {

    QueryRunner queryRunner = new QueryRunner(dataSource);
    ResultSetHandler rsh = new MapHandler();
    String sql = null;

    try {
      sql = "SELECT * FROM " + tableName;

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.