class BudgetReAppropriationMapper {

    public BudgetReAppropriationSearchContract toSearchContract(
            final BudgetReAppropriationSearch budgetReAppropriationSearch) {

        final BudgetReAppropriationSearchContract contract = new BudgetReAppropriationSearchContract();

        contract.setId(budgetReAppropriationSearch.getId());
        contract.setBudgetDetail(BudgetDetailContract.builder().id(budgetReAppropriationSearch.getBudgetDetail() != null
                ? budgetReAppropriationSearch.getBudgetDetail().getId() : null).build());
        contract.setAdditionAmount(budgetReAppropriationSearch.getAdditionAmount());
        contract.setDeductionAmount(budgetReAppropriationSearch.getDeductionAmount());
        contract.setOriginalAdditionAmount(budgetReAppropriationSearch.getOriginalAdditionAmount());
        contract.setOriginalDeductionAmount(budgetReAppropriationSearch.getOriginalDeductionAmount());
        contract.setAnticipatoryAmount(budgetReAppropriationSearch.getAnticipatoryAmount());
        contract.setStatus(FinancialStatusContract.builder().id(budgetReAppropriationSearch.getStatus() != null
                ? budgetReAppropriationSearch.getStatus().getId() : null).build());
        contract.setAsOnDate(budgetReAppropriationSearch.getAsOnDate());
        contract.setCreatedBy(budgetReAppropriationSearch.getCreatedBy());
        contract.setCreatedDate(budgetReAppropriationSearch.getCreatedDate());
        contract.setLastModifiedBy(budgetReAppropriationSearch.getLastModifiedBy());
        contract.setLastModifiedDate(budgetReAppropriationSearch.getLastModifiedDate());
        contract.setTenantId(budgetReAppropriationSearch.getTenantId());
        contract.setPageSize(budgetReAppropriationSearch.getPageSize());
        contract.setOffset(budgetReAppropriationSearch.getOffset());

        return contract;
    }

}