Example #1
0
 public void update(ItemValue itemValue) {
   jdbcTemplate.update(
       "UPDATE item_value SET " + "data = ?, last_update = ?, update_count = ? " + "WHERE id = ?",
       serializeData(itemValue),
       toTimestamp(itemValue.getLastUpdate()),
       itemValue.getUpdateCount(),
       itemValue.getId());
 }
Example #2
0
  public void insert(ItemValue itemValue) {

    jdbcTemplate.update(
        "INSERT INTO item_value "
            + "(creation,dashboard_id,data,item_name,last_update,update_count)"
            + " VALUES (?,?,?,?,?,?)",
        toTimestamp(itemValue.getCreation()),
        itemValue.getItemRef().getDashboardId(),
        serializeData(itemValue),
        itemValue.getItemRef().getItemName(),
        toTimestamp(itemValue.getLastUpdate()),
        itemValue.getUpdateCount());
  }