@Test @Sql(scripts = { "/sql/surrenderreason/clearSurrenderReason.sql", "/sql/surrenderreason/insertSurrenderReasonData.sql" }) public void test_update() { SurrenderReasonEntity surrenderReason = SurrenderReasonEntity.builder().id("1").name("name") .description("description").build(); surrenderReason.setTenantId("default"); SurrenderReasonEntity actualResult = surrenderReasonJdbcRepository.update(surrenderReason); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_surrenderReason", new SurrenderReasonResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("name")).isEqualTo(actualResult.getName()); assertThat(row.get("description")).isEqualTo(actualResult.getDescription()); }
public SurrenderReasonEntity update(SurrenderReasonEntity entity) { super.update(entity); return entity; }
SurrenderReasonJdbcRepository extends JdbcRepository { public SurrenderReasonEntity update(SurrenderReasonEntity entity) { super.update(entity); return entity; } }
SurrenderReasonJdbcRepository extends JdbcRepository { public SurrenderReasonEntity update(SurrenderReasonEntity entity) { super.update(entity); return entity; } SurrenderReasonJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); }
SurrenderReasonJdbcRepository extends JdbcRepository { public SurrenderReasonEntity update(SurrenderReasonEntity entity) { super.update(entity); return entity; } SurrenderReasonJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); SurrenderReasonEntity create(SurrenderReasonEntity entity); SurrenderReasonEntity update(SurrenderReasonEntity entity); SurrenderReasonEntity delete(SurrenderReasonEntity entity); Pagination<SurrenderReason> search(SurrenderReasonSearch domain); SurrenderReasonEntity findById(SurrenderReasonEntity entity); }
SurrenderReasonJdbcRepository extends JdbcRepository { public SurrenderReasonEntity update(SurrenderReasonEntity entity) { super.update(entity); return entity; } SurrenderReasonJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); SurrenderReasonEntity create(SurrenderReasonEntity entity); SurrenderReasonEntity update(SurrenderReasonEntity entity); SurrenderReasonEntity delete(SurrenderReasonEntity entity); Pagination<SurrenderReason> search(SurrenderReasonSearch domain); SurrenderReasonEntity findById(SurrenderReasonEntity entity);  }