class InstrumentAccountCodeMapper {

    public InstrumentAccountCodeSearch toSearchDomain(InstrumentAccountCodeSearchContract contract) {

        InstrumentAccountCodeSearch instrumentAccountCodeSearch = new InstrumentAccountCodeSearch();

        instrumentAccountCodeSearch.setId(contract.getId());

        if (contract.getInstrumentType() != null)
            instrumentAccountCodeSearch.setInstrumentType(typeMapper.toDomain(contract.getInstrumentType()));

        if (contract.getAccountCode() != null)
            instrumentAccountCodeSearch.setAccountCode(contract.getAccountCode());

        instrumentAccountCodeSearch.setCreatedBy(contract.getCreatedBy());
        instrumentAccountCodeSearch.setCreatedDate(contract.getCreatedDate());
        instrumentAccountCodeSearch.setLastModifiedBy(contract.getLastModifiedBy());
        instrumentAccountCodeSearch.setLastModifiedDate(contract.getLastModifiedDate());
        instrumentAccountCodeSearch.setTenantId(contract.getTenantId());
        instrumentAccountCodeSearch.setPageSize(contract.getPageSize());
        instrumentAccountCodeSearch.setOffset(contract.getOffset());
        instrumentAccountCodeSearch.setSortBy(contract.getSortBy());
        instrumentAccountCodeSearch.setIds(contract.getIds());

        return instrumentAccountCodeSearch;
    }

}