private static void addProcessParameters(int AD_PInstance_ID,Map<String,Object> params,String trxName){
  final String sql="SELECT " + " " + X_AD_PInstance_Para.COLUMNNAME_ParameterName + ","+ X_AD_PInstance_Para.COLUMNNAME_P_String+ ","+ X_AD_PInstance_Para.COLUMNNAME_P_String_To+ ","+ X_AD_PInstance_Para.COLUMNNAME_P_Number+ ","+ X_AD_PInstance_Para.COLUMNNAME_P_Number_To+ ","+ X_AD_PInstance_Para.COLUMNNAME_P_Date+ ","+ X_AD_PInstance_Para.COLUMNNAME_P_Date_To+ ","+ X_AD_PInstance_Para.COLUMNNAME_Info+ ","+ X_AD_PInstance_Para.COLUMNNAME_Info_To+ " FROM "+ X_AD_PInstance_Para.Table_Name+ " WHERE "+ X_AD_PInstance_Para.COLUMNNAME_AD_PInstance_ID+ "=?";
  PreparedStatement pstmt=null;
  ResultSet rs=null;
  try {
    pstmt=DB.prepareStatement(sql,ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY,trxName);
    pstmt.setInt(1,AD_PInstance_ID);
    rs=pstmt.executeQuery();
    while (rs.next()) {
      String name=rs.getString(1);
      String pStr=rs.getString(2);
      String pStrTo=rs.getString(3);
      BigDecimal pNum=rs.getBigDecimal(4);
      BigDecimal pNumTo=rs.getBigDecimal(5);
      Timestamp pDate=rs.getTimestamp(6);
      Timestamp pDateTo=rs.getTimestamp(7);
      if (pStr != null) {
        if (pStrTo != null) {
          params.put(name + "1",pStr);
          params.put(name + "2",pStrTo);
        }
 else {
          params.put(name,pStr);
        }
      }
 else       if (pDate != null) {
        if (pDateTo != null) {
          params.put(name + "1",pDate);
          params.put(name + "2",pDateTo);
        }
 else {
          params.put(name,pDate);
        }
      }
 else       if (pNum != null) {
        if (pNumTo != null) {
          params.put(name + "1",pNum);
          params.put(name + "2",pNumTo);
        }
 else {
          params.put(name,pNum);
        }
      }
      String info=rs.getString(8);
      String infoTo=rs.getString(9);
      params.put(name + "_Info1",(info != null ? info : ""));
      params.put(name + "_Info2",(infoTo != null ? infoTo : ""));
    }
  }
 catch (  SQLException e) {
    throw new DBException(e,sql);
  }
 finally {
    DB.close(rs,pstmt);
    rs=null;
    pstmt=null;
  }
}

private static void addProcessParameters ( int AD_PInstance_ID , Map < String , Object > params , String trxName ) { final String sql = "SELECT " + " " + X_AD_PInstance_Para . COLUMNNAME_ParameterName + "," + X_AD_PInstance_Para . COLUMNNAME_P_String + "," + X_AD_PInstance_Para . COLUMNNAME_P_String_To + "," + X_AD_PInstance_Para . COLUMNNAME_P_Number + "," + X_AD_PInstance_Para . COLUMNNAME_P_Number_To + "," + X_AD_PInstance_Para . COLUMNNAME_P_Date + "," + X_AD_PInstance_Para . COLUMNNAME_P_Date_To + "," + X_AD_PInstance_Para . COLUMNNAME_Info + "," + X_AD_PInstance_Para . COLUMNNAME_Info_To + " FROM " + X_AD_PInstance_Para . Table_Name + " WHERE " + X_AD_PInstance_Para . COLUMNNAME_AD_PInstance_ID + "=?" ; PreparedStatement pstmt = null ; ResultSet rs = null ; try { pstmt = DB . prepareStatement ( sql , ResultSet . TYPE_FORWARD_ONLY , ResultSet . CONCUR_READ_ONLY , trxName ) ; pstmt . setInt ( 1 , AD_PInstance_ID ) ; rs = pstmt . executeQuery ( ) ; while ( rs . next ( ) ) { String name = rs . getString ( 1 ) ; String pStr = rs . getString ( 2 ) ; String pStrTo = rs . getString ( 3 ) ; BigDecimal pNum = rs . getBigDecimal ( 4 ) ; BigDecimal pNumTo = rs . getBigDecimal ( 5 ) ; Timestamp pDate = rs . getTimestamp ( 6 ) ; Timestamp pDateTo = rs . getTimestamp ( 7 ) ; if ( pStr != null ) { if ( pStrTo != null ) { params . put ( name + "1" , pStr ) ; params . put ( name + "2" , pStrTo ) ; } else { params . put ( name , pStr ) ; } } else if ( pDate != null ) { if ( pDateTo != null ) { params . put ( name + "1" , pDate ) ; params . put ( name + "2" , pDateTo ) ; } else { params . put ( name , pDate ) ; } } else if ( pNum != null ) { if ( pNumTo != null ) { params . put ( name + "1" , pNum ) ; params . put ( name + "2" , pNumTo ) ; } else { params . put ( name , pNum ) ; } } String info = rs . getString ( 8 ) ; String infoTo = rs . getString ( 9 ) ; params . put ( name + "_Info1" , ( info != null ? info : "" ) ) ; params . put ( name + "_Info2" , ( infoTo != null ? infoTo : "" ) ) ; } } catch ( SQLException e ) { throw new DBException ( e , sql ) ; } finally { DB . close ( rs , pstmt ) ; rs = null ; pstmt = null ; } }
load process parameters into given params map
