示例#1
0
  /**
   * Update CIR_INIT Data Bindding JavaBean
   *
   * @param bean CIR_INIT Data Bindding JavaBean
   * @return 更新件数
   * @throws SQLException SQL実行例外
   */
  public int updateActSetting(CirInitModel bean) throws SQLException {

    PreparedStatement pstmt = null;
    int count = 0;
    Connection con = null;
    con = getCon();

    try {
      // SQL文
      SqlBuffer sql = new SqlBuffer();
      sql.addSql(" update");
      sql.addSql("   CIR_INIT");
      sql.addSql(" set ");
      sql.addSql("   CIN_ACNT_MAKE=?,");
      sql.addSql("   CIN_AUTO_DEL_KBN=?,");
      sql.addSql("   CIN_ACNT_USER=?");

      pstmt = con.prepareStatement(sql.toSqlString());
      sql.addIntValue(bean.getCinAcntMake());
      sql.addIntValue(bean.getCinAutoDelKbn());
      sql.addIntValue(bean.getCinAcntUser());

      log__.info(sql.toLogString());
      sql.setParameter(pstmt);
      count = pstmt.executeUpdate();
    } catch (SQLException e) {
      throw e;
    } finally {
      JDBCUtil.closeStatement(pstmt);
    }
    return count;
  }
示例#2
0
  /**
   * 初期値 設定値を更新登録する。
   *
   * @param bean CIR_USER Data Bindding JavaBean
   * @throws SQLException SQL実行例外
   */
  public void updateAdmInitSet(CirInitModel bean) throws SQLException {

    PreparedStatement pstmt = null;
    Connection con = null;
    con = getCon();

    try {
      // SQL文
      SqlBuffer sql = new SqlBuffer();
      sql.addSql(" update");
      sql.addSql("   CIR_INIT");
      sql.addSql(" set ");
      sql.addSql("   CIN_INITSET_KEN = ?,");
      sql.addSql("   CIN_MEMO_KBN = ?,");
      sql.addSql("   CIN_MEMO_DAY = ?,");
      sql.addSql("   CIN_KOU_KBN = ?,");
      sql.addSql("   CIN_EUID = ?,");
      sql.addSql("   CIN_EDATE = ?");

      pstmt = con.prepareStatement(sql.toSqlString());
      sql.addIntValue(bean.getCinInitSetKen());
      sql.addIntValue(bean.getCinMemoKbn());
      sql.addIntValue(bean.getCinMemoDay());
      sql.addIntValue(bean.getCinKouKbn());
      sql.addIntValue(bean.getCinEuid());
      sql.addDateValue(bean.getCinEdate());

      log__.info(sql.toLogString());
      sql.setParameter(pstmt);
      pstmt.executeUpdate();
    } catch (SQLException e) {
      throw e;
    } finally {
      JDBCUtil.closeStatement(pstmt);
    }
  }
示例#3
0
  /**
   * Create CIR_Init Data Bindding JavaBean From ResultSet
   *
   * @param rs ResultSet
   * @return created CirInitModel
   * @throws SQLException SQL実行例外
   */
  private CirInitModel __getCirInitFromRs(ResultSet rs) throws SQLException {
    CirInitModel bean = new CirInitModel();

    bean.setCinInitSetKen(rs.getInt("CIN_INITSET_KEN"));
    bean.setCinMemoKbn(rs.getInt("CIN_MEMO_KBN"));
    bean.setCinMemoDay(rs.getInt("CIN_MEMO_DAY"));
    bean.setCinKouKbn(rs.getInt("CIN_KOU_KBN"));
    bean.setCinAcntMake(rs.getInt("CIN_ACNT_MAKE"));
    bean.setCinAutoDelKbn(rs.getInt("CIN_AUTO_DEL_KBN"));
    bean.setCinAcntUser(rs.getInt("CIN_ACNT_USER"));
    bean.setCinAuid(rs.getInt("CIN_AUID"));
    bean.setCinAdate(UDate.getInstanceTimestamp(rs.getTimestamp("CIN_ADATE")));
    bean.setCinEuid(rs.getInt("CIN_EUID"));
    bean.setCinEdate(UDate.getInstanceTimestamp(rs.getTimestamp("CIN_EDATE")));
    return bean;
  }
示例#4
0
  /**
   * 初期値 設定値を新規登録する。
   *
   * @param bean CIR_USER Data Bindding JavaBean
   * @throws SQLException SQL実行例外
   */
  public void insertAdmInitSet(CirInitModel bean) throws SQLException {

    PreparedStatement pstmt = null;
    Connection con = null;
    con = getCon();

    try {
      // SQL文
      SqlBuffer sql = new SqlBuffer();
      sql.addSql(" insert");
      sql.addSql(" into ");
      sql.addSql(" CIR_INIT(");
      sql.addSql("   CIN_INITSET_KEN,");
      sql.addSql("   CIN_MEMO_KBN,");
      sql.addSql("   CIN_MEMO_DAY,");
      sql.addSql("   CIN_KOU_KBN,");
      sql.addSql("   CIN_AUID,");
      sql.addSql("   CIN_ADATE,");
      sql.addSql("   CIN_EUID,");
      sql.addSql("   CIN_EDATE,");
      sql.addSql("   CIN_ACNT_MAKE,");
      sql.addSql("   CIN_AUTO_DEL_KBN,");
      sql.addSql("   CIN_ACNT_USER");
      sql.addSql(" )");
      sql.addSql(" values");
      sql.addSql(" (");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?,");
      sql.addSql("   ?");
      sql.addSql(" )");

      pstmt = con.prepareStatement(sql.toSqlString());
      sql.addIntValue(bean.getCinInitSetKen());
      sql.addIntValue(bean.getCinMemoKbn());
      sql.addIntValue(bean.getCinMemoDay());
      sql.addIntValue(bean.getCinKouKbn());
      sql.addIntValue(bean.getCinAuid());
      sql.addDateValue(bean.getCinAdate());
      sql.addIntValue(bean.getCinEuid());
      sql.addDateValue(bean.getCinEdate());
      sql.addIntValue(bean.getCinAcntMake());
      sql.addIntValue(bean.getCinAutoDelKbn());
      sql.addIntValue(bean.getCinAcntUser());

      log__.info(sql.toLogString());
      sql.setParameter(pstmt);
      pstmt.executeUpdate();
    } catch (SQLException e) {
      throw e;
    } finally {
      JDBCUtil.closeStatement(pstmt);
    }
  }