/** {@inheritDoc} */ @Override public void insert(Relay relay) { logger.debug("Inserting relay with id [{}]", relay.getId()); Map<String, Object> valuesToInsert = new HashMap<String, Object>(); valuesToInsert.put("id", relay.getId()); valuesToInsert.put("name", relay.getText()); jdbcInsert.execute(valuesToInsert); }
/** {@inheritDoc} */ @Override public void update(Relay relay) throws SQLException { logger.debug("Update relay with id [{}]", relay.getId()); jdbcTemplate.update( "update relaynames set Name=? where ID=?", new Object[] {relay.getText(), relay.getId()}); }