コード例 #1
0
 public void insert(Discount discount) {
   jdbcTemplate.update(
       discount.generateInsertQuery(),
       discount.getGoodsId(),
       discount.getStart(),
       discount.getEnd(),
       discount.getDiscount(),
       discount.getDescription(),
       discount.getCreatedDate(),
       discount.getCreatedBy(),
       discount.getUpdatedDate(),
       discount.getUpdatedBy());
 }
コード例 #2
0
 public List<Discount> findAll() {
   return jdbcTemplate.query(SELECT_JOIN_GOODS, Discount.obtainRowMapper());
 }
コード例 #3
0
 public Discount findById(String id) {
   return jdbcTemplate.queryForObject(
       SELECT_JOIN_GOODS_BY_ID, new Object[] {id}, Discount.obtainRowMapper());
 }
コード例 #4
0
 public void delete(Discount discount) {
   jdbcTemplate.update(discount.generateDeleteQuery(), discount.getGoodsId());
 }