@Test @Sql(scripts = { "/sql/clearFund.sql", "/sql/insertFundData.sql" }) public void test_update() { FundEntity fund = FundEntity.builder().code("codeU").name("nameU").active(true).level(1l) .identifier('F').id("2").build(); fund.setTenantId("default"); FundEntity actualResult = fundJdbcRepository.update(fund); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_fund", new FundResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("id")).isEqualTo(actualResult.getId()); assertThat(row.get("name")).isEqualTo(actualResult.getName()); assertThat(row.get("code")).isEqualTo(actualResult.getCode()); }
public FundEntity update(FundEntity entity) { super.update(entity); return entity; }
FundJdbcRepository extends JdbcRepository { public FundEntity update(FundEntity entity) { super.update(entity); return entity; } }
FundJdbcRepository extends JdbcRepository { public FundEntity update(FundEntity entity) { super.update(entity); return entity; } FundJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
FundJdbcRepository extends JdbcRepository { public FundEntity update(FundEntity entity) { super.update(entity); return entity; } FundJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); FundEntity create(FundEntity entity); FundEntity update(FundEntity entity); boolean delete(FundEntity entity,String reason); Pagination<Fund> search(FundSearch domain); FundEntity findById(FundEntity entity); }
FundJdbcRepository extends JdbcRepository { public FundEntity update(FundEntity entity) { super.update(entity); return entity; } FundJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); FundEntity create(FundEntity entity); FundEntity update(FundEntity entity); boolean delete(FundEntity entity,String reason); Pagination<Fund> search(FundSearch domain); FundEntity findById(FundEntity entity);  }