@Test @Sql(scripts = { "/sql/budgetdetail/clearBudgetDetail.sql", "/sql/budgetdetail/insertBudgetDetailData.sql" }) public void test_delete() { BudgetDetailEntity budgetDetail = BudgetDetailEntity.builder().id("1").anticipatoryAmount(BigDecimal.ONE) .approvedAmount(BigDecimal.ONE).budgetAvailable(BigDecimal.ONE).originalAmount(BigDecimal.ONE) .budgetId("1").budgetGroupId("1").planningPercent(BigDecimal.valueOf(1500)).build(); budgetDetail.setTenantId("default"); BudgetDetailEntity actualResult = budgetDetailJdbcRepository.delete(budgetDetail); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_budgetdetail", new BudgetDetailResultExtractor()); assertTrue("Result set length is zero", result.size() == 0); }
public BudgetDetailEntity delete(final BudgetDetailEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; }
BudgetDetailJdbcRepository extends JdbcRepository { public BudgetDetailEntity delete(final BudgetDetailEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; } }
BudgetDetailJdbcRepository extends JdbcRepository { public BudgetDetailEntity delete(final BudgetDetailEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; } BudgetDetailJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); }
BudgetDetailJdbcRepository extends JdbcRepository { public BudgetDetailEntity delete(final BudgetDetailEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; } BudgetDetailJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); BudgetDetailEntity create(final BudgetDetailEntity entity); BudgetDetailEntity update(final BudgetDetailEntity entity); BudgetDetailEntity delete(final BudgetDetailEntity entity); Pagination<BudgetDetail> search(final BudgetDetailSearch domain); BudgetDetailEntity findById(final BudgetDetailEntity entity); }
BudgetDetailJdbcRepository extends JdbcRepository { public BudgetDetailEntity delete(final BudgetDetailEntity entity) { super.delete(entity.TABLE_NAME, entity.getId()); return entity; } BudgetDetailJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); BudgetDetailEntity create(final BudgetDetailEntity entity); BudgetDetailEntity update(final BudgetDetailEntity entity); BudgetDetailEntity delete(final BudgetDetailEntity entity); Pagination<BudgetDetail> search(final BudgetDetailSearch domain); BudgetDetailEntity findById(final BudgetDetailEntity entity);  }