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