@Test(expected = DataIntegrityViolationException.class) @Sql(scripts = { "/sql/budget/clearBudget.sql" }) public void test_create_with_tenantId_null() { BudgetEntity budget = BudgetEntity.builder().name("name").parentId("1").active(true).financialYearId("1") .estimationType("BE").primaryBudget(true).build(); budgetJdbcRepository.create(budget); }
public BudgetEntity create(final BudgetEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity create(final BudgetEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; } }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity create(final BudgetEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(entity); return entity; } BudgetJdbcRepository(final NamedParameterJdbcTemplate namedParameterJdbcTemplate, final JdbcTemplate jdbcTemplate); }
BudgetJdbcRepository extends JdbcRepository { public BudgetEntity create(final BudgetEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(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 create(final BudgetEntity entity) { entity.setId(UUID.randomUUID().toString().replace("-", "")); super.create(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);  }