@Test @Sql(scripts = { "/sql/clearAccountDetailType.sql" }) public void test_create() { AccountDetailTypeEntity accountDetailType = AccountDetailTypeEntity.builder().id("1").tablename("contractor") .description("contractor").fullyQualifiedName("abc/contractor").name("name").active(true).build(); accountDetailType.setTenantId("default"); AccountDetailTypeEntity actualResult = accountDetailTypeJdbcRepository.create(accountDetailType); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_accountDetailType", new AccountDetailTypeResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("id")).isEqualTo(actualResult.getId()); assertThat(row.get("name")).isEqualTo(actualResult.getName()); assertThat(row.get("tableName")).isEqualTo(actualResult.getTablename()); assertThat(row.get("fullyQualifiedName")).isEqualTo(actualResult.getFullyQualifiedName()); }
public AccountDetailTypeEntity create(AccountDetailTypeEntity entity) { super.create(entity); return entity; }
AccountDetailTypeJdbcRepository extends JdbcRepository { public AccountDetailTypeEntity create(AccountDetailTypeEntity entity) { super.create(entity); return entity; } }
AccountDetailTypeJdbcRepository extends JdbcRepository { public AccountDetailTypeEntity create(AccountDetailTypeEntity entity) { super.create(entity); return entity; } AccountDetailTypeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
AccountDetailTypeJdbcRepository extends JdbcRepository { public AccountDetailTypeEntity create(AccountDetailTypeEntity entity) { super.create(entity); return entity; } AccountDetailTypeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); AccountDetailTypeEntity create(AccountDetailTypeEntity entity); AccountDetailTypeEntity update(AccountDetailTypeEntity entity); Pagination<AccountDetailType> search(AccountDetailTypeSearch domain); AccountDetailTypeEntity findById(AccountDetailTypeEntity entity); }
AccountDetailTypeJdbcRepository extends JdbcRepository { public AccountDetailTypeEntity create(AccountDetailTypeEntity entity) { super.create(entity); return entity; } AccountDetailTypeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); AccountDetailTypeEntity create(AccountDetailTypeEntity entity); AccountDetailTypeEntity update(AccountDetailTypeEntity entity); Pagination<AccountDetailType> search(AccountDetailTypeSearch domain); AccountDetailTypeEntity findById(AccountDetailTypeEntity entity);  }