コード例 #1
0
ファイル: DeleteCategory.java プロジェクト: devis505/hobotun
  public DeleteCategory(DataSource dataSource) {
    super(dataSource, SQL_DELETE_CATEGORY);

    super.declareParameter(new SqlParameter("idCategory", Types.INTEGER));
  }
コード例 #2
0
ファイル: PoDaoImpl.java プロジェクト: rmage/gnvc-ims
 /** Updates a single row in the po table. */
 public void update(PoPk pk, Po dto) throws PoDaoException {
   SqlUpdate su =
       new SqlUpdate(
           dataSource,
           "UPDATE "
               + getTableName()
               + " SET ponumber = ?, podate = ?, prsnumber = ?, prsdate = ?, deliverydate = ?, poreferensi = ?, createdby = ?, corpid = ?, wh_code = ?, department_name = ?, supplier_name = ?, currency = ?, prsremarks = ?, role_code = ?,status, status_date = ?,status, status_date_date = ? WHERE id = ?");
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.BIGINT));
   su.compile();
   su.update(
       new Object[] {
         dto.getPonumber(),
         dto.getPodate(),
         dto.getPrsnumber(),
         dto.getPrsdate(),
         dto.getDeliverydate(),
         dto.getPoreferensi(),
         dto.getCreatedby(),
         dto.getCorpid(),
         dto.getWhCode(),
         dto.getDepartmentName(),
         dto.getSupplierName(),
         dto.getCurrency(),
         dto.getPrsremarks(),
         dto.getRoleCode(),
         dto.getStatus(),
         dto.getStatusdate(),
         pk.getId()
       });
 }
コード例 #3
0
ファイル: StockInDaoImpl.java プロジェクト: rmage/gnvc-ims
 /** Updates a single row in the stock_in table. */
 public void update(StockInPk pk, StockIn dto) throws StockInDaoException {
   SqlUpdate su =
       new SqlUpdate(
           dataSource,
           "UPDATE "
               + getTableName()
               + " SET document_no = ?, document_date = ?, product_code = ?, product_name = ?, quantity = ?, is_active = ?, is_delete = ?, created_by = ?, created_date = ?, updated_by = ?, updated_date = ? WHERE id = ?");
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.INTEGER));
   su.declareParameter(new SqlParameter(java.sql.Types.CHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.CHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.INTEGER));
   su.compile();
   su.update(
       new Object[] {
         dto.getDocumentNo(),
         dto.getDocumentDate(),
         dto.getProductCode(),
         dto.getProductName(),
         dto.getQuantity(),
         dto.getIsActive(),
         dto.getIsDelete(),
         dto.getCreatedBy(),
         dto.getCreatedDate(),
         dto.getUpdatedBy(),
         dto.getUpdatedDate(),
         pk.getId()
       });
 }
コード例 #4
0
ファイル: PoDaoImpl.java プロジェクト: rmage/gnvc-ims
 /**
  * Method 'insert'
  *
  * @param dto
  * @return PoPk
  */
 public PoPk insert(Po dto) {
   SqlUpdate su =
       new SqlUpdate(
           dataSource,
           "INSERT INTO "
               + getTableName()
               + " ( ponumber, podate, prsnumber, prsdate, deliverydate, poreferensi, createdby, corpid, wh_code, department_name, supplier_name, currency, prsremarks, role_code,status, status_date,status, status_date_date ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )");
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.compile();
   su.update(
       new Object[] {
         dto.getPonumber(),
         dto.getPodate(),
         dto.getPrsnumber(),
         dto.getPrsdate(),
         dto.getDeliverydate(),
         dto.getPoreferensi(),
         dto.getCreatedby(),
         dto.getCorpid(),
         dto.getWhCode(),
         dto.getDepartmentName(),
         dto.getSupplierName(),
         dto.getCurrency(),
         dto.getPrsremarks(),
         dto.getRoleCode(),
         dto.getStatus(),
         dto.getStatusdate()
       });
   PoPk pk = new PoPk();
   pk.setId(jdbcTemplate.queryForInt("select @@IDENTITY"));
   return pk;
 }
コード例 #5
0
ファイル: StockInDaoImpl.java プロジェクト: rmage/gnvc-ims
 /**
  * Method 'insert'
  *
  * @param dto
  * @return StockInPk
  */
 public StockInPk insert(StockIn dto) {
   SqlUpdate su =
       new SqlUpdate(
           dataSource,
           "INSERT INTO "
               + getTableName()
               + " ( document_no, document_date, product_code, product_name, quantity, is_active, is_delete, created_by, created_date, updated_by, updated_date ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )");
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.INTEGER));
   su.declareParameter(new SqlParameter(java.sql.Types.CHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.CHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.declareParameter(new SqlParameter(java.sql.Types.VARCHAR));
   su.declareParameter(new SqlParameter(java.sql.Types.TIMESTAMP));
   su.compile();
   su.update(
       new Object[] {
         dto.getDocumentNo(),
         dto.getDocumentDate(),
         dto.getProductCode(),
         dto.getProductName(),
         dto.getQuantity(),
         dto.getIsActive(),
         dto.getIsDelete(),
         dto.getCreatedBy(),
         dto.getCreatedDate(),
         dto.getUpdatedBy(),
         dto.getUpdatedDate()
       });
   StockInPk pk = new StockInPk();
   pk.setId(jdbcTemplate.queryForInt("select @@IDENTITY"));
   return pk;
 }