@Test @Sql(scripts = { "/sql/clearAccountCodePurpose.sql" }) public void test_create() { AccountCodePurposeEntity accountCodePurpose = AccountCodePurposeEntity.builder().id("1").name("name").build(); accountCodePurpose.setTenantId("default"); AccountCodePurposeEntity actualResult = accountCodePurposeJdbcRepository.create(accountCodePurpose); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_accountCodePurpose", new AccountCodePurposeResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("id")).isEqualTo(actualResult.getId()); assertThat(row.get("name")).isEqualTo(actualResult.getName()); }
public AccountCodePurposeEntity create(AccountCodePurposeEntity entity) { super.create(entity); return entity; }
AccountCodePurposeJdbcRepository extends JdbcRepository { public AccountCodePurposeEntity create(AccountCodePurposeEntity entity) { super.create(entity); return entity; } }
AccountCodePurposeJdbcRepository extends JdbcRepository { public AccountCodePurposeEntity create(AccountCodePurposeEntity entity) { super.create(entity); return entity; } AccountCodePurposeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
AccountCodePurposeJdbcRepository extends JdbcRepository { public AccountCodePurposeEntity create(AccountCodePurposeEntity entity) { super.create(entity); return entity; } AccountCodePurposeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); AccountCodePurposeEntity create(AccountCodePurposeEntity entity); AccountCodePurposeEntity update(AccountCodePurposeEntity entity); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch domain); AccountCodePurposeEntity findById(AccountCodePurposeEntity entity); Boolean uniqueCheck(String fieldName, AccountCodePurposeEntity accountCodePurpose); }
AccountCodePurposeJdbcRepository extends JdbcRepository { public AccountCodePurposeEntity create(AccountCodePurposeEntity entity) { super.create(entity); return entity; } AccountCodePurposeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); AccountCodePurposeEntity create(AccountCodePurposeEntity entity); AccountCodePurposeEntity update(AccountCodePurposeEntity entity); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch domain); AccountCodePurposeEntity findById(AccountCodePurposeEntity entity); Boolean uniqueCheck(String fieldName, AccountCodePurposeEntity accountCodePurpose);  }