@Test @Sql(scripts = { "/sql/instrumenttypeproperty/clearInstrumentTypeProperty.sql", "/sql/instrumenttypeproperty/insertInstrumentTypePropertyData.sql" }) public void test_update() { InstrumentTypePropertyEntity instrumentTypeProperty = InstrumentTypePropertyEntity.builder().id("1") .transactionType("Credit").reconciledOncreate(true).statusOnCreateId("1").statusOnReconcileId("1") .statusOnUpdateId("1").build(); instrumentTypeProperty.setTenantId("default"); InstrumentTypePropertyEntity actualResult = instrumentTypePropertyJdbcRepository.update(instrumentTypeProperty); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_instrumentTypeProperty", new InstrumentTypePropertyResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("transactionType")).isEqualTo(actualResult.getTransactionType()); assertThat(row.get("reconciledOncreate")).isEqualTo(actualResult.getReconciledOncreate()); assertThat(row.get("statusOnCreateId")).isEqualTo(actualResult.getStatusOnCreateId()); assertThat(row.get("statusOnReconcileId")).isEqualTo(actualResult.getStatusOnReconcileId()); assertThat(row.get("statusOnUpdateId")).isEqualTo(actualResult.getStatusOnUpdateId()); }
public InstrumentTypePropertyEntity update(InstrumentTypePropertyEntity entity) { super.update(entity); return entity; }
InstrumentTypePropertyJdbcRepository extends JdbcRepository { public InstrumentTypePropertyEntity update(InstrumentTypePropertyEntity entity) { super.update(entity); return entity; } }
InstrumentTypePropertyJdbcRepository extends JdbcRepository { public InstrumentTypePropertyEntity update(InstrumentTypePropertyEntity entity) { super.update(entity); return entity; } InstrumentTypePropertyJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
InstrumentTypePropertyJdbcRepository extends JdbcRepository { public InstrumentTypePropertyEntity update(InstrumentTypePropertyEntity entity) { super.update(entity); return entity; } InstrumentTypePropertyJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); InstrumentTypePropertyEntity create(InstrumentTypePropertyEntity entity); InstrumentTypePropertyEntity update(InstrumentTypePropertyEntity entity); InstrumentTypePropertyEntity findById(InstrumentTypePropertyEntity entity); }
InstrumentTypePropertyJdbcRepository extends JdbcRepository { public InstrumentTypePropertyEntity update(InstrumentTypePropertyEntity entity) { super.update(entity); return entity; } InstrumentTypePropertyJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate); InstrumentTypePropertyEntity create(InstrumentTypePropertyEntity entity); InstrumentTypePropertyEntity update(InstrumentTypePropertyEntity entity); InstrumentTypePropertyEntity findById(InstrumentTypePropertyEntity entity);  }