@Test @Sql(scripts = { "/sql/budgetreappropriation/clearBudgetReAppropriation.sql" }) public void test_create() { BudgetReAppropriationEntity budgetReAppropriation = BudgetReAppropriationEntity.builder().budgetDetailId("1") .build(); budgetReAppropriation.setTenantId("default"); BudgetReAppropriationEntity actualResult = budgetReAppropriationJdbcRepository.create(budgetReAppropriation); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_budgetReAppropriation", new BudgetReAppropriationResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("id")).isEqualTo(actualResult.getId()); assertThat(row.get("budgetDetailId")).isEqualTo(actualResult.getBudgetDetailId()); }
public BudgetReAppropriationEntity create(final BudgetReAppropriationEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; }
BudgetReAppropriationJdbcRepository extends JdbcRepository { public BudgetReAppropriationEntity create(final BudgetReAppropriationEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; } }
BudgetReAppropriationJdbcRepository extends JdbcRepository { public BudgetReAppropriationEntity create(final BudgetReAppropriationEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; } BudgetReAppropriationJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); }
BudgetReAppropriationJdbcRepository extends JdbcRepository { public BudgetReAppropriationEntity create(final BudgetReAppropriationEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; } BudgetReAppropriationJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); BudgetReAppropriationEntity create(final BudgetReAppropriationEntity entity); BudgetReAppropriationEntity update(final BudgetReAppropriationEntity entity); BudgetReAppropriationEntity delete(final BudgetReAppropriationEntity entity); Pagination<BudgetReAppropriation> search(final BudgetReAppropriationSearch domain); BudgetReAppropriationEntity findById(final BudgetReAppropriationEntity entity); }
BudgetReAppropriationJdbcRepository extends JdbcRepository { public BudgetReAppropriationEntity create(final BudgetReAppropriationEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; } BudgetReAppropriationJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate); BudgetReAppropriationEntity create(final BudgetReAppropriationEntity entity); BudgetReAppropriationEntity update(final BudgetReAppropriationEntity entity); BudgetReAppropriationEntity delete(final BudgetReAppropriationEntity entity); Pagination<BudgetReAppropriation> search(final BudgetReAppropriationSearch domain); BudgetReAppropriationEntity findById(final BudgetReAppropriationEntity entity);  }