@Test @Sql(scripts = { "/sql/instrument/clearInstrument.sql", "/sql/instrument/insertInstrumentData.sql" }) public void test_update() { InstrumentEntity instrument = InstrumentEntity.builder().id("1").amount(BigDecimal.ONE).bankAccountId("1") .bankId("1").branchName("branchName").drawer("drawer").financialStatusId("1").instrumentTypeId("1") .payee("payee").serialNo("serialNo").surrenderReasonId("1").transactionNumber("transactionNumber") .transactionDate(new Date()).transactionType("Credit").build(); instrument.setTenantId("default"); InstrumentEntity actualResult = instrumentJdbcRepository.update(instrument); List<Map<String, Object>> result = namedParameterJdbcTemplate.query("SELECT * FROM egf_instrument", new InstrumentResultExtractor()); Map<String, Object> row = result.get(0); assertThat(row.get("amount").toString()).isEqualTo("1.00"); assertThat(row.get("bankId")).isEqualTo(actualResult.getBankId()); assertThat(row.get("bankAccountId")).isEqualTo(actualResult.getBankAccountId()); assertThat(row.get("branchName")).isEqualTo(actualResult.getBranchName()); assertThat(row.get("drawer")).isEqualTo(actualResult.getDrawer()); assertThat(row.get("financialStatusId")).isEqualTo(actualResult.getFinancialStatusId()); assertThat(row.get("instrumentTypeId")).isEqualTo(actualResult.getInstrumentTypeId()); assertThat(row.get("payee")).isEqualTo(actualResult.getPayee()); assertThat(row.get("serialNo")).isEqualTo(actualResult.getSerialNo()); assertThat(row.get("surrenderReasonId")).isEqualTo(actualResult.getSurrenderReasonId()); assertThat(row.get("transactionNumber")).isEqualTo(actualResult.getTransactionNumber()); assertThat(row.get("transactionType")).isEqualTo(actualResult.getTransactionType()); }
public InstrumentEntity update(InstrumentEntity entity) { super.update(entity); return entity; }
InstrumentJdbcRepository extends JdbcRepository { public InstrumentEntity update(InstrumentEntity entity) { super.update(entity); return entity; } }
InstrumentJdbcRepository extends JdbcRepository { public InstrumentEntity update(InstrumentEntity entity) { super.update(entity); return entity; } InstrumentJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate,
            InstrumentVoucherJdbcRepository instrumentVoucherJdbcRepository); }
InstrumentJdbcRepository extends JdbcRepository { public InstrumentEntity update(InstrumentEntity entity) { super.update(entity); return entity; } InstrumentJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate,
            InstrumentVoucherJdbcRepository instrumentVoucherJdbcRepository); InstrumentEntity create(InstrumentEntity entity); InstrumentEntity update(InstrumentEntity entity); InstrumentEntity delete(InstrumentEntity entity); Pagination<Instrument> search(InstrumentSearch domain); InstrumentEntity findById(InstrumentEntity entity); }
InstrumentJdbcRepository extends JdbcRepository { public InstrumentEntity update(InstrumentEntity entity) { super.update(entity); return entity; } InstrumentJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, JdbcTemplate jdbcTemplate,
            InstrumentVoucherJdbcRepository instrumentVoucherJdbcRepository); InstrumentEntity create(InstrumentEntity entity); InstrumentEntity update(InstrumentEntity entity); InstrumentEntity delete(InstrumentEntity entity); Pagination<Instrument> search(InstrumentSearch domain); InstrumentEntity findById(InstrumentEntity entity);  }