@Test @Sql(scripts = { "/sql/clearRecovery.sql" }) public void test_create() { RecoveryEntity recovery = RecoveryEntity.builder().id("2374257").code("code").name("name").active(true) .mode('M').accountNumber("30492234547").flat(100.00).ifscCode("ifsccode").chartOfAccountId("1").remittanceMode('M').remitted("test").build(); recovery.setTenantId("default"); RecoveryEntity actualResult = recoveryJdbcRepository.create(recovery); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_recovery", new RecoveryResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("name")).isEqualTo(actualResult.getName()); assertThat(row.get("code")).isEqualTo(actualResult.getCode()); }
public RecoveryEntity create(RecoveryEntity entity) { super.create(entity); return entity; }
RecoveryJdbcRepository extends JdbcRepository { public RecoveryEntity create(RecoveryEntity entity) { super.create(entity); return entity; } }
RecoveryJdbcRepository extends JdbcRepository { public RecoveryEntity create(RecoveryEntity entity) { super.create(entity); return entity; } RecoveryJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
RecoveryJdbcRepository extends JdbcRepository { public RecoveryEntity create(RecoveryEntity entity) { super.create(entity); return entity; } RecoveryJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); RecoveryEntity create(RecoveryEntity entity); RecoveryEntity update(RecoveryEntity entity); Pagination<Recovery> search(RecoverySearch domain); RecoveryEntity findById(RecoveryEntity entity); }
RecoveryJdbcRepository extends JdbcRepository { public RecoveryEntity create(RecoveryEntity entity) { super.create(entity); return entity; } RecoveryJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); RecoveryEntity create(RecoveryEntity entity); RecoveryEntity update(RecoveryEntity entity); Pagination<Recovery> search(RecoverySearch domain); RecoveryEntity findById(RecoveryEntity entity);  }