@Test @Sql(scripts = { "/sql/clearAccountDetailKey.sql" }) public void test_create() { AccountDetailKeyEntity accountDetailKey = AccountDetailKeyEntity.builder().id("1").key("1") .accountDetailTypeId(getAccountDetailType().getId()).build(); accountDetailKey.setTenantId("default"); AccountDetailKeyEntity actualResult = accountDetailKeyJdbcRepository.create(accountDetailKey); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_accountDetailKey", new AccountDetailKeyResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("id")).isEqualTo(actualResult.getId()); assertThat(row.get("key")).isEqualTo(actualResult.getKey()); }
public AccountDetailKeyEntity create(AccountDetailKeyEntity entity) { super.create(entity); return entity; }
AccountDetailKeyJdbcRepository extends JdbcRepository { public AccountDetailKeyEntity create(AccountDetailKeyEntity entity) { super.create(entity); return entity; } }
AccountDetailKeyJdbcRepository extends JdbcRepository { public AccountDetailKeyEntity create(AccountDetailKeyEntity entity) { super.create(entity); return entity; } AccountDetailKeyJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
AccountDetailKeyJdbcRepository extends JdbcRepository { public AccountDetailKeyEntity create(AccountDetailKeyEntity entity) { super.create(entity); return entity; } AccountDetailKeyJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); AccountDetailKeyEntity create(AccountDetailKeyEntity entity); AccountDetailKeyEntity update(AccountDetailKeyEntity entity); Pagination<AccountDetailKey> search(AccountDetailKeySearch domain); AccountDetailKeyEntity findById(AccountDetailKeyEntity entity); }
AccountDetailKeyJdbcRepository extends JdbcRepository { public AccountDetailKeyEntity create(AccountDetailKeyEntity entity) { super.create(entity); return entity; } AccountDetailKeyJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); AccountDetailKeyEntity create(AccountDetailKeyEntity entity); AccountDetailKeyEntity update(AccountDetailKeyEntity entity); Pagination<AccountDetailKey> search(AccountDetailKeySearch domain); AccountDetailKeyEntity findById(AccountDetailKeyEntity entity);  }