public static void updateColumns(SetGetModel[] models,String[] columnNames,String sql,Object[] params,String trxName){
  PreparedStatement pstmt=null;
  ResultSet rs=null;
  try {
    pstmt=DB.prepareStatement(sql,trxName);
    DB.setParameters(pstmt,params);
    rs=pstmt.executeQuery();
    updateColumns(models,columnNames,rs);
  }
 catch (  SQLException e) {
    throw new DBException(e,sql);
  }
 finally {
    DB.close(rs,pstmt);
    rs=null;
    pstmt=null;
  }
}

public static void updateColumns ( SetGetModel [ ] models , String [ ] columnNames , String sql , Object [ ] params , String trxName ) { PreparedStatement pstmt = null ; ResultSet rs = null ; try { pstmt = DB . prepareStatement ( sql , trxName ) ; DB . setParameters ( pstmt , params ) ; rs = pstmt . executeQuery ( ) ; updateColumns ( models , columnNames , rs ) ; } catch ( SQLException e ) { throw new DBException ( e , sql ) ; } finally { DB . close ( rs , pstmt ) ; rs = null ; pstmt = null ; } }
update columns from the result of the given query .
