@Test @Sql(scripts = { "/sql/budget/clearBudget.sql", "/sql/budget/insertBudgetData.sql" }) public void test_delete() { BudgetEntity budget = BudgetEntity.builder().id("1").name("name").parentId("1").active(true).financialYearId("1") .estimationType("BE").primaryBudget(true).build(); budget.setTenantId("default"); BudgetEntity actualResult = budgetJdbcRepository.delete(budget); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_budget", new BudgetResultExtractor()); assertTrue("Result set length is zero", result.size() == 0); }
public BudgetEntity delete(final BudgetEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity delete(final BudgetEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; } }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity delete(final BudgetEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; } BudgetJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, final JdbcTemplate jdbcTemplate); }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity delete(final BudgetEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); 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 delete(final BudgetEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); 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);  }