@Test public void test_to_contract() { InstrumentAccountCodeContract expectedContract = instrumentAccountCodeMapper.toContract(domain()); assertEquals(expectedContract.getId(), contract().getId()); assertEquals(expectedContract.getInstrumentType().getId(), contract().getInstrumentType().getId()); assertEquals(expectedContract.getAccountCode().getId(), contract().getAccountCode().getId()); assertEquals(expectedContract.getCreatedBy().getId(), contract().getCreatedBy().getId()); assertEquals(expectedContract.getLastModifiedBy().getId(), contract().getLastModifiedBy().getId()); assertEquals(expectedContract.getTenantId(), contract().getTenantId()); }
public InstrumentAccountCodeContract toContract(InstrumentAccountCode instrumentAccountCode) { InstrumentAccountCodeContract contract = new InstrumentAccountCodeContract(); contract.setId(instrumentAccountCode.getId()); if (instrumentAccountCode.getInstrumentType() != null) contract.setInstrumentType(typeMapper.toContract(instrumentAccountCode.getInstrumentType())); if (instrumentAccountCode.getAccountCode() != null) contract.setAccountCode(instrumentAccountCode.getAccountCode()); contract.setCreatedBy(instrumentAccountCode.getCreatedBy()); contract.setCreatedDate(instrumentAccountCode.getCreatedDate()); contract.setLastModifiedBy(instrumentAccountCode.getLastModifiedBy()); contract.setLastModifiedDate(instrumentAccountCode.getLastModifiedDate()); contract.setTenantId(instrumentAccountCode.getTenantId()); return contract; }
InstrumentAccountCodeMapper { public InstrumentAccountCodeContract toContract(InstrumentAccountCode instrumentAccountCode) { InstrumentAccountCodeContract contract = new InstrumentAccountCodeContract(); contract.setId(instrumentAccountCode.getId()); if (instrumentAccountCode.getInstrumentType() != null) contract.setInstrumentType(typeMapper.toContract(instrumentAccountCode.getInstrumentType())); if (instrumentAccountCode.getAccountCode() != null) contract.setAccountCode(instrumentAccountCode.getAccountCode()); contract.setCreatedBy(instrumentAccountCode.getCreatedBy()); contract.setCreatedDate(instrumentAccountCode.getCreatedDate()); contract.setLastModifiedBy(instrumentAccountCode.getLastModifiedBy()); contract.setLastModifiedDate(instrumentAccountCode.getLastModifiedDate()); contract.setTenantId(instrumentAccountCode.getTenantId()); return contract; } }
InstrumentAccountCodeMapper { public InstrumentAccountCodeContract toContract(InstrumentAccountCode instrumentAccountCode) { InstrumentAccountCodeContract contract = new InstrumentAccountCodeContract(); contract.setId(instrumentAccountCode.getId()); if (instrumentAccountCode.getInstrumentType() != null) contract.setInstrumentType(typeMapper.toContract(instrumentAccountCode.getInstrumentType())); if (instrumentAccountCode.getAccountCode() != null) contract.setAccountCode(instrumentAccountCode.getAccountCode()); contract.setCreatedBy(instrumentAccountCode.getCreatedBy()); contract.setCreatedDate(instrumentAccountCode.getCreatedDate()); contract.setLastModifiedBy(instrumentAccountCode.getLastModifiedBy()); contract.setLastModifiedDate(instrumentAccountCode.getLastModifiedDate()); contract.setTenantId(instrumentAccountCode.getTenantId()); return contract; }  }
InstrumentAccountCodeMapper { public InstrumentAccountCodeContract toContract(InstrumentAccountCode instrumentAccountCode) { InstrumentAccountCodeContract contract = new InstrumentAccountCodeContract(); contract.setId(instrumentAccountCode.getId()); if (instrumentAccountCode.getInstrumentType() != null) contract.setInstrumentType(typeMapper.toContract(instrumentAccountCode.getInstrumentType())); if (instrumentAccountCode.getAccountCode() != null) contract.setAccountCode(instrumentAccountCode.getAccountCode()); contract.setCreatedBy(instrumentAccountCode.getCreatedBy()); contract.setCreatedDate(instrumentAccountCode.getCreatedDate()); contract.setLastModifiedBy(instrumentAccountCode.getLastModifiedBy()); contract.setLastModifiedDate(instrumentAccountCode.getLastModifiedDate()); contract.setTenantId(instrumentAccountCode.getTenantId()); return contract; }  InstrumentAccountCode toDomain(InstrumentAccountCodeContract contract); InstrumentAccountCodeContract toContract(InstrumentAccountCode instrumentAccountCode); InstrumentAccountCodeSearch toSearchDomain(InstrumentAccountCodeSearchContract contract); InstrumentAccountCodeSearchContract toSearchContract(
            InstrumentAccountCodeSearch instrumentAccountCodeSearch); }
InstrumentAccountCodeMapper { public InstrumentAccountCodeContract toContract(InstrumentAccountCode instrumentAccountCode) { InstrumentAccountCodeContract contract = new InstrumentAccountCodeContract(); contract.setId(instrumentAccountCode.getId()); if (instrumentAccountCode.getInstrumentType() != null) contract.setInstrumentType(typeMapper.toContract(instrumentAccountCode.getInstrumentType())); if (instrumentAccountCode.getAccountCode() != null) contract.setAccountCode(instrumentAccountCode.getAccountCode()); contract.setCreatedBy(instrumentAccountCode.getCreatedBy()); contract.setCreatedDate(instrumentAccountCode.getCreatedDate()); contract.setLastModifiedBy(instrumentAccountCode.getLastModifiedBy()); contract.setLastModifiedDate(instrumentAccountCode.getLastModifiedDate()); contract.setTenantId(instrumentAccountCode.getTenantId()); return contract; }  InstrumentAccountCode toDomain(InstrumentAccountCodeContract contract); InstrumentAccountCodeContract toContract(InstrumentAccountCode instrumentAccountCode); InstrumentAccountCodeSearch toSearchDomain(InstrumentAccountCodeSearchContract contract); InstrumentAccountCodeSearchContract toSearchContract(
            InstrumentAccountCodeSearch instrumentAccountCodeSearch);  }