class InstrumentAccountCodeMapper {

    public InstrumentAccountCodeSearchContract toSearchContract(
            InstrumentAccountCodeSearch instrumentAccountCodeSearch) {

        InstrumentAccountCodeSearchContract contract = new InstrumentAccountCodeSearchContract();

        contract.setId(instrumentAccountCodeSearch.getId());

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

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

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

        return contract;
    }

}