@Test @Sql(scripts = { "/sql/clearAccountDetailType.sql", "/sql/insertAccountDetailType.sql" }) public void test_update() { AccountDetailTypeEntity accountDetailType = AccountDetailTypeEntity.builder().tablename("contractorU") .description("contractor").fullyQualifiedName("abc/contractorU").name("nameU").active(true).id("1") .build(); accountDetailType.setTenantId("default"); AccountDetailTypeEntity actualResult = accountDetailTypeJdbcRepository.update(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()); }
public AccountDetailTypeEntity update(AccountDetailTypeEntity entity) { super.update(entity); return entity; }
AccountDetailTypeJdbcRepository extends JdbcRepository { public AccountDetailTypeEntity update(AccountDetailTypeEntity entity) { super.update(entity); return entity; } }
AccountDetailTypeJdbcRepository extends JdbcRepository { public AccountDetailTypeEntity update(AccountDetailTypeEntity entity) { super.update(entity); return entity; } AccountDetailTypeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
AccountDetailTypeJdbcRepository extends JdbcRepository { public AccountDetailTypeEntity update(AccountDetailTypeEntity entity) { super.update(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 update(AccountDetailTypeEntity entity) { super.update(entity); return entity; } AccountDetailTypeJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); AccountDetailTypeEntity create(AccountDetailTypeEntity entity); AccountDetailTypeEntity update(AccountDetailTypeEntity entity); Pagination<AccountDetailType> search(AccountDetailTypeSearch domain); AccountDetailTypeEntity findById(AccountDetailTypeEntity entity);  }