@Test public void test_to_search_domain() { final BudgetDetailSearch expectedSearchDomain = budgetDetailMapper.toSearchDomain(searchContract()); assertEquals(expectedSearchDomain.getId(), searchContract().getId()); assertEquals(expectedSearchDomain.getBudgetGroup().getId(), searchContract().getBudgetGroup().getId()); assertEquals(expectedSearchDomain.getBudget().getId(), searchContract().getBudget().getId()); assertEquals(expectedSearchDomain.getOriginalAmount(), searchContract().getOriginalAmount()); assertEquals(expectedSearchDomain.getApprovedAmount(), searchContract().getApprovedAmount()); assertEquals(expectedSearchDomain.getBudgetAvailable(), searchContract().getBudgetAvailable()); assertEquals(expectedSearchDomain.getAnticipatoryAmount(), searchContract().getAnticipatoryAmount()); assertEquals(expectedSearchDomain.getUsingDepartment().getId(), searchContract().getUsingDepartment().getId()); assertEquals(expectedSearchDomain.getExecutingDepartment().getId(), searchContract().getExecutingDepartment().getId()); assertEquals(expectedSearchDomain.getFunction().getId(), searchContract().getFunction().getId()); assertEquals(expectedSearchDomain.getScheme().getId(), searchContract().getScheme().getId()); assertEquals(expectedSearchDomain.getFund().getId(), searchContract().getFund().getId()); assertEquals(expectedSearchDomain.getSubScheme().getId(), searchContract().getSubScheme().getId()); assertEquals(expectedSearchDomain.getFunctionary().getId(), searchContract().getFunctionary().getId()); assertEquals(expectedSearchDomain.getBoundary().getId(), searchContract().getBoundary().getId()); assertEquals(expectedSearchDomain.getMaterializedPath(), searchContract().getMaterializedPath()); assertEquals(expectedSearchDomain.getDocumentNumber(), searchContract().getDocumentNumber()); assertEquals(expectedSearchDomain.getUniqueNo(), searchContract().getUniqueNo()); assertEquals(expectedSearchDomain.getPlanningPercent(), searchContract().getPlanningPercent()); assertEquals(expectedSearchDomain.getStatus().getId(), searchContract().getStatus().getId()); assertEquals(expectedSearchDomain.getCreatedBy().getId(), searchContract().getCreatedBy().getId()); assertEquals(expectedSearchDomain.getLastModifiedBy().getId(), searchContract().getLastModifiedBy().getId()); assertEquals(expectedSearchDomain.getTenantId(), searchContract().getTenantId()); assertEquals(expectedSearchDomain.getPageSize(), searchContract().getPageSize()); assertEquals(expectedSearchDomain.getOffset(), searchContract().getOffset()); }
public BudgetDetailSearch toSearchDomain(final BudgetDetailSearchContract contract) { final BudgetDetailSearch budgetDetailSearch = new BudgetDetailSearch(); budgetDetailSearch.setId(contract.getId()); budgetDetailSearch.setBudgetGroup(BudgetGroupContract.builder() .id(contract.getBudgetGroup() != null ? contract.getBudgetGroup().getId() : null).build()); budgetDetailSearch.setBudget( Budget.builder().id(contract.getBudget() != null ? contract.getBudget().getId() : null).build()); budgetDetailSearch.setOriginalAmount(contract.getOriginalAmount()); budgetDetailSearch.setApprovedAmount(contract.getApprovedAmount()); budgetDetailSearch.setBudgetAvailable(contract.getBudgetAvailable()); budgetDetailSearch.setAnticipatoryAmount(contract.getAnticipatoryAmount()); budgetDetailSearch.setUsingDepartment(Department.builder() .id(contract.getUsingDepartment() != null ? contract.getUsingDepartment().getId() : null).build()); budgetDetailSearch.setExecutingDepartment(Department.builder() .id(contract.getExecutingDepartment() != null ? contract.getExecutingDepartment().getId() : null) .build()); budgetDetailSearch.setFunction(FunctionContract.builder() .id(contract.getFunction() != null ? contract.getFunction().getId() : null).build()); budgetDetailSearch.setScheme(SchemeContract.builder() .id(contract.getScheme() != null ? contract.getScheme().getId() : null).build()); budgetDetailSearch.setFund( FundContract.builder().id(contract.getFund() != null ? contract.getFund().getId() : null).build()); budgetDetailSearch.setSubScheme(SubSchemeContract.builder() .id(contract.getSubScheme() != null ? contract.getSubScheme().getId() : null).build()); budgetDetailSearch.setFunctionary(FunctionaryContract.builder() .id(contract.getFunctionary() != null ? contract.getFunctionary().getId() : null).build()); budgetDetailSearch.setBoundary( Boundary.builder().id(contract.getBoundary() != null ? contract.getBoundary().getId() : null).build()); budgetDetailSearch.setMaterializedPath(contract.getMaterializedPath()); budgetDetailSearch.setDocumentNumber(contract.getDocumentNumber()); budgetDetailSearch.setUniqueNo(contract.getUniqueNo()); budgetDetailSearch.setPlanningPercent(contract.getPlanningPercent()); budgetDetailSearch.setStatus(FinancialStatusContract.builder() .id(contract.getStatus() != null ? contract.getStatus().getId() : null).build()); budgetDetailSearch.setCreatedBy(contract.getCreatedBy()); budgetDetailSearch.setCreatedDate(contract.getCreatedDate()); budgetDetailSearch.setLastModifiedBy(contract.getLastModifiedBy()); budgetDetailSearch.setLastModifiedDate(contract.getLastModifiedDate()); budgetDetailSearch.setTenantId(contract.getTenantId()); budgetDetailSearch.setPageSize(contract.getPageSize()); budgetDetailSearch.setOffset(contract.getOffset()); return budgetDetailSearch; }
BudgetDetailMapper { public BudgetDetailSearch toSearchDomain(final BudgetDetailSearchContract contract) { final BudgetDetailSearch budgetDetailSearch = new BudgetDetailSearch(); budgetDetailSearch.setId(contract.getId()); budgetDetailSearch.setBudgetGroup(BudgetGroupContract.builder() .id(contract.getBudgetGroup() != null ? contract.getBudgetGroup().getId() : null).build()); budgetDetailSearch.setBudget( Budget.builder().id(contract.getBudget() != null ? contract.getBudget().getId() : null).build()); budgetDetailSearch.setOriginalAmount(contract.getOriginalAmount()); budgetDetailSearch.setApprovedAmount(contract.getApprovedAmount()); budgetDetailSearch.setBudgetAvailable(contract.getBudgetAvailable()); budgetDetailSearch.setAnticipatoryAmount(contract.getAnticipatoryAmount()); budgetDetailSearch.setUsingDepartment(Department.builder() .id(contract.getUsingDepartment() != null ? contract.getUsingDepartment().getId() : null).build()); budgetDetailSearch.setExecutingDepartment(Department.builder() .id(contract.getExecutingDepartment() != null ? contract.getExecutingDepartment().getId() : null) .build()); budgetDetailSearch.setFunction(FunctionContract.builder() .id(contract.getFunction() != null ? contract.getFunction().getId() : null).build()); budgetDetailSearch.setScheme(SchemeContract.builder() .id(contract.getScheme() != null ? contract.getScheme().getId() : null).build()); budgetDetailSearch.setFund( FundContract.builder().id(contract.getFund() != null ? contract.getFund().getId() : null).build()); budgetDetailSearch.setSubScheme(SubSchemeContract.builder() .id(contract.getSubScheme() != null ? contract.getSubScheme().getId() : null).build()); budgetDetailSearch.setFunctionary(FunctionaryContract.builder() .id(contract.getFunctionary() != null ? contract.getFunctionary().getId() : null).build()); budgetDetailSearch.setBoundary( Boundary.builder().id(contract.getBoundary() != null ? contract.getBoundary().getId() : null).build()); budgetDetailSearch.setMaterializedPath(contract.getMaterializedPath()); budgetDetailSearch.setDocumentNumber(contract.getDocumentNumber()); budgetDetailSearch.setUniqueNo(contract.getUniqueNo()); budgetDetailSearch.setPlanningPercent(contract.getPlanningPercent()); budgetDetailSearch.setStatus(FinancialStatusContract.builder() .id(contract.getStatus() != null ? contract.getStatus().getId() : null).build()); budgetDetailSearch.setCreatedBy(contract.getCreatedBy()); budgetDetailSearch.setCreatedDate(contract.getCreatedDate()); budgetDetailSearch.setLastModifiedBy(contract.getLastModifiedBy()); budgetDetailSearch.setLastModifiedDate(contract.getLastModifiedDate()); budgetDetailSearch.setTenantId(contract.getTenantId()); budgetDetailSearch.setPageSize(contract.getPageSize()); budgetDetailSearch.setOffset(contract.getOffset()); return budgetDetailSearch; } }
BudgetDetailMapper { public BudgetDetailSearch toSearchDomain(final BudgetDetailSearchContract contract) { final BudgetDetailSearch budgetDetailSearch = new BudgetDetailSearch(); budgetDetailSearch.setId(contract.getId()); budgetDetailSearch.setBudgetGroup(BudgetGroupContract.builder() .id(contract.getBudgetGroup() != null ? contract.getBudgetGroup().getId() : null).build()); budgetDetailSearch.setBudget( Budget.builder().id(contract.getBudget() != null ? contract.getBudget().getId() : null).build()); budgetDetailSearch.setOriginalAmount(contract.getOriginalAmount()); budgetDetailSearch.setApprovedAmount(contract.getApprovedAmount()); budgetDetailSearch.setBudgetAvailable(contract.getBudgetAvailable()); budgetDetailSearch.setAnticipatoryAmount(contract.getAnticipatoryAmount()); budgetDetailSearch.setUsingDepartment(Department.builder() .id(contract.getUsingDepartment() != null ? contract.getUsingDepartment().getId() : null).build()); budgetDetailSearch.setExecutingDepartment(Department.builder() .id(contract.getExecutingDepartment() != null ? contract.getExecutingDepartment().getId() : null) .build()); budgetDetailSearch.setFunction(FunctionContract.builder() .id(contract.getFunction() != null ? contract.getFunction().getId() : null).build()); budgetDetailSearch.setScheme(SchemeContract.builder() .id(contract.getScheme() != null ? contract.getScheme().getId() : null).build()); budgetDetailSearch.setFund( FundContract.builder().id(contract.getFund() != null ? contract.getFund().getId() : null).build()); budgetDetailSearch.setSubScheme(SubSchemeContract.builder() .id(contract.getSubScheme() != null ? contract.getSubScheme().getId() : null).build()); budgetDetailSearch.setFunctionary(FunctionaryContract.builder() .id(contract.getFunctionary() != null ? contract.getFunctionary().getId() : null).build()); budgetDetailSearch.setBoundary( Boundary.builder().id(contract.getBoundary() != null ? contract.getBoundary().getId() : null).build()); budgetDetailSearch.setMaterializedPath(contract.getMaterializedPath()); budgetDetailSearch.setDocumentNumber(contract.getDocumentNumber()); budgetDetailSearch.setUniqueNo(contract.getUniqueNo()); budgetDetailSearch.setPlanningPercent(contract.getPlanningPercent()); budgetDetailSearch.setStatus(FinancialStatusContract.builder() .id(contract.getStatus() != null ? contract.getStatus().getId() : null).build()); budgetDetailSearch.setCreatedBy(contract.getCreatedBy()); budgetDetailSearch.setCreatedDate(contract.getCreatedDate()); budgetDetailSearch.setLastModifiedBy(contract.getLastModifiedBy()); budgetDetailSearch.setLastModifiedDate(contract.getLastModifiedDate()); budgetDetailSearch.setTenantId(contract.getTenantId()); budgetDetailSearch.setPageSize(contract.getPageSize()); budgetDetailSearch.setOffset(contract.getOffset()); return budgetDetailSearch; }  }
BudgetDetailMapper { public BudgetDetailSearch toSearchDomain(final BudgetDetailSearchContract contract) { final BudgetDetailSearch budgetDetailSearch = new BudgetDetailSearch(); budgetDetailSearch.setId(contract.getId()); budgetDetailSearch.setBudgetGroup(BudgetGroupContract.builder() .id(contract.getBudgetGroup() != null ? contract.getBudgetGroup().getId() : null).build()); budgetDetailSearch.setBudget( Budget.builder().id(contract.getBudget() != null ? contract.getBudget().getId() : null).build()); budgetDetailSearch.setOriginalAmount(contract.getOriginalAmount()); budgetDetailSearch.setApprovedAmount(contract.getApprovedAmount()); budgetDetailSearch.setBudgetAvailable(contract.getBudgetAvailable()); budgetDetailSearch.setAnticipatoryAmount(contract.getAnticipatoryAmount()); budgetDetailSearch.setUsingDepartment(Department.builder() .id(contract.getUsingDepartment() != null ? contract.getUsingDepartment().getId() : null).build()); budgetDetailSearch.setExecutingDepartment(Department.builder() .id(contract.getExecutingDepartment() != null ? contract.getExecutingDepartment().getId() : null) .build()); budgetDetailSearch.setFunction(FunctionContract.builder() .id(contract.getFunction() != null ? contract.getFunction().getId() : null).build()); budgetDetailSearch.setScheme(SchemeContract.builder() .id(contract.getScheme() != null ? contract.getScheme().getId() : null).build()); budgetDetailSearch.setFund( FundContract.builder().id(contract.getFund() != null ? contract.getFund().getId() : null).build()); budgetDetailSearch.setSubScheme(SubSchemeContract.builder() .id(contract.getSubScheme() != null ? contract.getSubScheme().getId() : null).build()); budgetDetailSearch.setFunctionary(FunctionaryContract.builder() .id(contract.getFunctionary() != null ? contract.getFunctionary().getId() : null).build()); budgetDetailSearch.setBoundary( Boundary.builder().id(contract.getBoundary() != null ? contract.getBoundary().getId() : null).build()); budgetDetailSearch.setMaterializedPath(contract.getMaterializedPath()); budgetDetailSearch.setDocumentNumber(contract.getDocumentNumber()); budgetDetailSearch.setUniqueNo(contract.getUniqueNo()); budgetDetailSearch.setPlanningPercent(contract.getPlanningPercent()); budgetDetailSearch.setStatus(FinancialStatusContract.builder() .id(contract.getStatus() != null ? contract.getStatus().getId() : null).build()); budgetDetailSearch.setCreatedBy(contract.getCreatedBy()); budgetDetailSearch.setCreatedDate(contract.getCreatedDate()); budgetDetailSearch.setLastModifiedBy(contract.getLastModifiedBy()); budgetDetailSearch.setLastModifiedDate(contract.getLastModifiedDate()); budgetDetailSearch.setTenantId(contract.getTenantId()); budgetDetailSearch.setPageSize(contract.getPageSize()); budgetDetailSearch.setOffset(contract.getOffset()); return budgetDetailSearch; }  BudgetDetail toDomain(final BudgetDetailContract contract); BudgetDetailContract toContract(final BudgetDetail budgetDetail); BudgetDetailSearch toSearchDomain(final BudgetDetailSearchContract contract); BudgetDetailSearchContract toSearchContract(final BudgetDetailSearch budgetDetailSearch); }
BudgetDetailMapper { public BudgetDetailSearch toSearchDomain(final BudgetDetailSearchContract contract) { final BudgetDetailSearch budgetDetailSearch = new BudgetDetailSearch(); budgetDetailSearch.setId(contract.getId()); budgetDetailSearch.setBudgetGroup(BudgetGroupContract.builder() .id(contract.getBudgetGroup() != null ? contract.getBudgetGroup().getId() : null).build()); budgetDetailSearch.setBudget( Budget.builder().id(contract.getBudget() != null ? contract.getBudget().getId() : null).build()); budgetDetailSearch.setOriginalAmount(contract.getOriginalAmount()); budgetDetailSearch.setApprovedAmount(contract.getApprovedAmount()); budgetDetailSearch.setBudgetAvailable(contract.getBudgetAvailable()); budgetDetailSearch.setAnticipatoryAmount(contract.getAnticipatoryAmount()); budgetDetailSearch.setUsingDepartment(Department.builder() .id(contract.getUsingDepartment() != null ? contract.getUsingDepartment().getId() : null).build()); budgetDetailSearch.setExecutingDepartment(Department.builder() .id(contract.getExecutingDepartment() != null ? contract.getExecutingDepartment().getId() : null) .build()); budgetDetailSearch.setFunction(FunctionContract.builder() .id(contract.getFunction() != null ? contract.getFunction().getId() : null).build()); budgetDetailSearch.setScheme(SchemeContract.builder() .id(contract.getScheme() != null ? contract.getScheme().getId() : null).build()); budgetDetailSearch.setFund( FundContract.builder().id(contract.getFund() != null ? contract.getFund().getId() : null).build()); budgetDetailSearch.setSubScheme(SubSchemeContract.builder() .id(contract.getSubScheme() != null ? contract.getSubScheme().getId() : null).build()); budgetDetailSearch.setFunctionary(FunctionaryContract.builder() .id(contract.getFunctionary() != null ? contract.getFunctionary().getId() : null).build()); budgetDetailSearch.setBoundary( Boundary.builder().id(contract.getBoundary() != null ? contract.getBoundary().getId() : null).build()); budgetDetailSearch.setMaterializedPath(contract.getMaterializedPath()); budgetDetailSearch.setDocumentNumber(contract.getDocumentNumber()); budgetDetailSearch.setUniqueNo(contract.getUniqueNo()); budgetDetailSearch.setPlanningPercent(contract.getPlanningPercent()); budgetDetailSearch.setStatus(FinancialStatusContract.builder() .id(contract.getStatus() != null ? contract.getStatus().getId() : null).build()); budgetDetailSearch.setCreatedBy(contract.getCreatedBy()); budgetDetailSearch.setCreatedDate(contract.getCreatedDate()); budgetDetailSearch.setLastModifiedBy(contract.getLastModifiedBy()); budgetDetailSearch.setLastModifiedDate(contract.getLastModifiedDate()); budgetDetailSearch.setTenantId(contract.getTenantId()); budgetDetailSearch.setPageSize(contract.getPageSize()); budgetDetailSearch.setOffset(contract.getOffset()); return budgetDetailSearch; }  BudgetDetail toDomain(final BudgetDetailContract contract); BudgetDetailContract toContract(final BudgetDetail budgetDetail); BudgetDetailSearch toSearchDomain(final BudgetDetailSearchContract contract); BudgetDetailSearchContract toSearchContract(final BudgetDetailSearch budgetDetailSearch);  }