コード例 #1
0
 private int insertDataReviewStatusBean(DataReviewStatusBean dataReviewStatusBean) {
   String sql =
       "insert into "
           + REVIEW_STATUS_TABLE
           + "("
           + REVIEW_STATUS_TABLE_ALL_COLS
           + ") values(?,?,?,?,?,?)";
   Object[] args = {
     dataReviewStatusBean.getDataId(),
     dataReviewStatusBean.getDataName(),
     dataReviewStatusBean.getDataType(),
     dataReviewStatusBean.getReviewStatus(),
     dataReviewStatusBean.getSubmittedBy(),
     dataReviewStatusBean.getSubmittedDate()
   };
   int status = this.getJdbcTemplate().update(sql, args);
   return status;
 }
コード例 #2
0
  private int updateDataReviewStatusBean(DataReviewStatusBean dataReviewStatusBean) {
    String sql =
        "update "
            + REVIEW_STATUS_TABLE
            + " set "
            + REVIEW_STATUS_TABLE_DATA_NAME_COL
            + "= ?, "
            + REVIEW_STATUS_TABLE_STATUS_COL
            + "=? where "
            + REVIEW_STATUS_TABLE_DATA_ID_COL
            + "= ?";

    Object[] args = {
      dataReviewStatusBean.getDataName(),
      dataReviewStatusBean.getReviewStatus(),
      dataReviewStatusBean.getDataId()
    };
    int status = this.getJdbcTemplate().update(sql, args);
    return status;
  }