@Test @Sql(scripts = { "/sql/instrumentaccountcode/clearInstrumentAccountCode.sql", "/sql/instrumentaccountcode/insertInstrumentAccountCodeData.sql" }) public void test_update() { InstrumentAccountCodeEntity instrumentAccountCode = InstrumentAccountCodeEntity.builder().instrumentTypeId("name") .accountCodeId("glcode").build(); instrumentAccountCode.setTenantId("default"); InstrumentAccountCodeEntity actualResult = instrumentAccountCodeJdbcRepository.update(instrumentAccountCode); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_instrumentAccountCode", new InstrumentAccountCodeResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("instrumentTypeId")).isEqualTo(actualResult.getInstrumentTypeId()); assertThat(row.get("accountCodeId")).isEqualTo(actualResult.getAccountCodeId()); }
public InstrumentAccountCodeEntity update(InstrumentAccountCodeEntity entity) { super.update(entity); return entity; }
InstrumentAccountCodeJdbcRepository extends JdbcRepository { public InstrumentAccountCodeEntity update(InstrumentAccountCodeEntity entity) { super.update(entity); return entity; } }
InstrumentAccountCodeJdbcRepository extends JdbcRepository { public InstrumentAccountCodeEntity update(InstrumentAccountCodeEntity entity) { super.update(entity); return entity; } InstrumentAccountCodeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); }
InstrumentAccountCodeJdbcRepository extends JdbcRepository { public InstrumentAccountCodeEntity update(InstrumentAccountCodeEntity entity) { super.update(entity); return entity; } InstrumentAccountCodeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); InstrumentAccountCodeEntity create(InstrumentAccountCodeEntity entity); InstrumentAccountCodeEntity update(InstrumentAccountCodeEntity entity); InstrumentAccountCodeEntity delete(InstrumentAccountCodeEntity entity); Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch domain); InstrumentAccountCodeEntity findById(InstrumentAccountCodeEntity entity); }
InstrumentAccountCodeJdbcRepository extends JdbcRepository { public InstrumentAccountCodeEntity update(InstrumentAccountCodeEntity entity) { super.update(entity); return entity; } InstrumentAccountCodeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); InstrumentAccountCodeEntity create(InstrumentAccountCodeEntity entity); InstrumentAccountCodeEntity update(InstrumentAccountCodeEntity entity); InstrumentAccountCodeEntity delete(InstrumentAccountCodeEntity entity); Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch domain); InstrumentAccountCodeEntity findById(InstrumentAccountCodeEntity entity);  }