@Override public void save(DwhHistoryTimekeeping variable) { getCallsHandler().executeModification("UpdateDwhHistoryTimekeeping", getCustomMapSqlParameterSource() .addValue("var_name", variable.getVariable().getVarName()) .addValue("var_value", variable.getValue()) .addValue("var_datetime", variable.getDateTime())); } }
/** * Tests saving variable */ @Test public void testSave() { DwhHistoryTimekeeping var = new DwhHistoryTimekeeping(); var.setVariable(DwhHistoryTimekeepingVariable.HEART_BEAT); var.setValue(null); var.setDateTime(new Date()); dao.save(var); DwhHistoryTimekeeping found = dao.get(var.getVariable()); assertNotNull(found); assertEquals(var.getVariable(), found.getVariable()); assertEquals(var.getValue(), found.getValue()); assertEquals(var.getDateTime(), found.getDateTime()); } }