コード例 #1
0
  /**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("CalCode") == null) this.calCode = null;
      else this.calCode = rs.getString("CalCode").trim();

      if (rs.getString("RiskCode") == null) this.riskCode = null;
      else this.riskCode = rs.getString("RiskCode").trim();

      if (rs.getString("Type") == null) this.type = null;
      else this.type = rs.getString("Type").trim();

      if (rs.getString("CalSQL") == null) this.calSQL = null;
      else this.calSQL = rs.getString("CalSQL").trim();

      if (rs.getString("Remark") == null) this.remark = null;
      else this.remark = rs.getString("Remark").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的LEPCalMode表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LEPCalModeSchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }
コード例 #2
0
  /**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("RiskCode") == null) this.riskCode = null;
      else this.riskCode = rs.getString("RiskCode").trim();

      if (rs.getString("RiskVer") == null) this.riskVer = null;
      else this.riskVer = rs.getString("RiskVer").trim();

      if (rs.getString("DutyCode") == null) this.dutyCode = null;
      else this.dutyCode = rs.getString("DutyCode").trim();

      if (rs.getString("ChoFlag") == null) this.choFlag = null;
      else this.choFlag = rs.getString("ChoFlag").trim();

      if (rs.getString("SpecFlag") == null) this.specFlag = null;
      else this.specFlag = rs.getString("SpecFlag").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的LEPRiskDuty表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LEPRiskDutySchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }
コード例 #3
0
  /**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("recommend") == null) this.recommend = null;
      else this.recommend = rs.getString("recommend").trim();

      if (rs.getString("recommended") == null) this.recommended = null;
      else this.recommended = rs.getString("recommended").trim();

      this.sendtimes = rs.getInt("sendtimes");
      if (rs.getString("success") == null) this.success = null;
      else this.success = rs.getString("success").trim();

      if (rs.getString("registered") == null) this.registered = null;
      else this.registered = rs.getString("registered").trim();

      if (rs.getString("field1") == null) this.field1 = null;
      else this.field1 = rs.getString("field1").trim();

      if (rs.getString("field2") == null) this.field2 = null;
      else this.field2 = rs.getString("field2").trim();

      if (rs.getString("field3") == null) this.field3 = null;
      else this.field3 = rs.getString("field3").trim();

      if (rs.getString("makedate") == null) this.makedate = null;
      else this.makedate = rs.getString("makedate").trim();

      if (rs.getString("maketime") == null) this.maketime = null;
      else this.maketime = rs.getString("maketime").trim();

      if (rs.getString("modifydate") == null) this.modifydate = null;
      else this.modifydate = rs.getString("modifydate").trim();

      if (rs.getString("modifytime") == null) this.modifytime = null;
      else this.modifytime = rs.getString("modifytime").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的LECRecommendation表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LECRecommendationSchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }
コード例 #4
0
  /**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("tradeNo") == null) this.tradeNo = null;
      else this.tradeNo = rs.getString("tradeNo").trim();

      if (rs.getString("contNo") == null) this.contNo = null;
      else this.contNo = rs.getString("contNo").trim();

      if (rs.getString("UserCode") == null) this.userCode = null;
      else this.userCode = rs.getString("UserCode").trim();

      if (rs.getString("Name") == null) this.name = null;
      else this.name = rs.getString("Name").trim();

      if (rs.getString("Gender") == null) this.gender = null;
      else this.gender = rs.getString("Gender").trim();

      this.birthday = rs.getDate("Birthday");
      if (rs.getString("Province") == null) this.province = null;
      else this.province = rs.getString("Province").trim();

      if (rs.getString("City") == null) this.city = null;
      else this.city = rs.getString("City").trim();

      if (rs.getString("Mobile") == null) this.mobile = null;
      else this.mobile = rs.getString("Mobile").trim();

      if (rs.getString("UserIDType") == null) this.userIDType = null;
      else this.userIDType = rs.getString("UserIDType").trim();

      if (rs.getString("UserIDNo") == null) this.userIDNo = null;
      else this.userIDNo = rs.getString("UserIDNo").trim();

      if (rs.getString("riskname") == null) this.riskname = null;
      else this.riskname = rs.getString("riskname").trim();

      if (rs.getString("riskcode") == null) this.riskcode = null;
      else this.riskcode = rs.getString("riskcode").trim();

      if (rs.getString("UserState") == null) this.userState = null;
      else this.userState = rs.getString("UserState").trim();

      if (rs.getString("UserSource") == null) this.userSource = null;
      else this.userSource = rs.getString("UserSource").trim();

      if (rs.getString("field1") == null) this.field1 = null;
      else this.field1 = rs.getString("field1").trim();

      if (rs.getString("field2") == null) this.field2 = null;
      else this.field2 = rs.getString("field2").trim();

      if (rs.getString("field3") == null) this.field3 = null;
      else this.field3 = rs.getString("field3").trim();

      if (rs.getString("field4") == null) this.field4 = null;
      else this.field4 = rs.getString("field4").trim();

      if (rs.getString("field5") == null) this.field5 = null;
      else this.field5 = rs.getString("field5").trim();

      if (rs.getString("field6") == null) this.field6 = null;
      else this.field6 = rs.getString("field6").trim();

      this.searchDate = rs.getDate("searchDate");
      if (rs.getString("searchTime") == null) this.searchTime = null;
      else this.searchTime = rs.getString("searchTime").trim();

      this.makedate = rs.getDate("makedate");
      if (rs.getString("maketime") == null) this.maketime = null;
      else this.maketime = rs.getString("maketime").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的SearchRecord表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "SearchRecordSchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }