@Test @Sql(scripts = { "/sql/budget/clearBudget.sql", "/sql/budget/insertBudgetData.sql" }) public void test_update() { BudgetEntity budget = BudgetEntity.builder().name("name").parentId("1").active(true).financialYearId("1") .estimationType("BE").primaryBudget(true).id("1").build(); budget.setTenantId("default"); BudgetEntity actualResult = budgetJdbcRepository.update(budget); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_budget", new BudgetResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("id")).isEqualTo(actualResult.getId()); assertThat(row.get("name")).isEqualTo(actualResult.getName()); }
public BudgetEntity update(final BudgetEntity entity) { super.update(entity); return entity; }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity update(final BudgetEntity entity) { super.update(entity); return entity; } }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity update(final BudgetEntity entity) { super.update(entity); return entity; } BudgetJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, final JdbcTemplate jdbcTemplate); }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity update(final BudgetEntity entity) { super.update(entity); return entity; } BudgetJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, final JdbcTemplate jdbcTemplate); BudgetEntity create(final BudgetEntity entity); BudgetEntity update(final BudgetEntity entity); BudgetEntity delete(final BudgetEntity entity); Pagination<Budget> search(final BudgetSearch domain); BudgetEntity findById(final BudgetEntity entity); }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity update(final BudgetEntity entity) { super.update(entity); return entity; } BudgetJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, final JdbcTemplate jdbcTemplate); BudgetEntity create(final BudgetEntity entity); BudgetEntity update(final BudgetEntity entity); BudgetEntity delete(final BudgetEntity entity); Pagination<Budget> search(final BudgetSearch domain); BudgetEntity findById(final BudgetEntity entity);  }