class BudgetReAppropriationController {

    @PostMapping("/_search")
    @ResponseBody
    @ResponseStatus(HttpStatus.OK)
    public BudgetReAppropriationResponse search(
            @ModelAttribute final BudgetReAppropriationSearchContract budgetReAppropriationSearchContract,
            @RequestBody final RequestInfo requestInfo, final BindingResult errors) {

        final BudgetReAppropriationMapper mapper = new BudgetReAppropriationMapper();
        final BudgetReAppropriationSearch domain = mapper.toSearchDomain(budgetReAppropriationSearchContract);
        BudgetReAppropriationContract contract = null;
        final List<BudgetReAppropriationContract> budgetReAppropriationContracts = new ArrayList<BudgetReAppropriationContract>();
        final Pagination<BudgetReAppropriation> budgetreappropriations = budgetReAppropriationService.search(domain);

        for (final BudgetReAppropriation budgetReAppropriation : budgetreappropriations.getPagedData()) {
            contract = mapper.toContract(budgetReAppropriation);
            budgetReAppropriationContracts.add(contract);
        }

        final BudgetReAppropriationResponse response = new BudgetReAppropriationResponse();
        response.setBudgetReAppropriations(budgetReAppropriationContracts);
        response.setPage(new PaginationContract(budgetreappropriations));
        response.setResponseInfo(getResponseInfo(requestInfo));

        return response;

    }

}