@Test public void test_to_contract() { final BudgetReAppropriationContract expectedContract = budgetDetailMapper.toContract(domain()); assertEquals(expectedContract.getId(), contract().getId()); assertEquals(expectedContract.getBudgetDetail().getId(), contract().getBudgetDetail().getId()); assertEquals(expectedContract.getAdditionAmount(), contract().getAdditionAmount()); assertEquals(expectedContract.getDeductionAmount(), contract().getDeductionAmount()); assertEquals(expectedContract.getOriginalAdditionAmount(), contract().getOriginalAdditionAmount()); assertEquals(expectedContract.getOriginalDeductionAmount(), contract().getOriginalDeductionAmount()); assertEquals(expectedContract.getAnticipatoryAmount(), contract().getAnticipatoryAmount()); assertEquals(expectedContract.getStatus().getId(), contract().getStatus().getId()); assertEquals(expectedContract.getCreatedBy().getId(), contract().getCreatedBy().getId()); assertEquals(expectedContract.getLastModifiedBy().getId(), contract().getLastModifiedBy().getId()); assertEquals(expectedContract.getTenantId(), contract().getTenantId()); }
public BudgetReAppropriationContract toContract(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationContract contract = new BudgetReAppropriationContract(); contract.setId(budgetReAppropriation.getId()); if (budgetReAppropriation.getBudgetDetail() != null) { final BudgetDetailMapper bdMapper = new BudgetDetailMapper(); contract.setBudgetDetail(bdMapper.toContract(budgetReAppropriation.getBudgetDetail())); } contract.setAdditionAmount(budgetReAppropriation.getAdditionAmount()); contract.setDeductionAmount(budgetReAppropriation.getDeductionAmount()); contract.setOriginalAdditionAmount(budgetReAppropriation.getOriginalAdditionAmount()); contract.setOriginalDeductionAmount(budgetReAppropriation.getOriginalDeductionAmount()); contract.setAnticipatoryAmount(budgetReAppropriation.getAnticipatoryAmount()); if (budgetReAppropriation.getStatus() != null) contract.setStatus(FinancialStatusContract.builder().id(budgetReAppropriation.getStatus().getId()) .code(budgetReAppropriation.getStatus().getCode()) .description(budgetReAppropriation.getStatus().getDescription()) .moduleType(budgetReAppropriation.getStatus().getModuleType()).build()); contract.setAsOnDate(budgetReAppropriation.getAsOnDate()); contract.setCreatedBy(budgetReAppropriation.getCreatedBy()); contract.setCreatedDate(budgetReAppropriation.getCreatedDate()); contract.setLastModifiedBy(budgetReAppropriation.getLastModifiedBy()); contract.setLastModifiedDate(budgetReAppropriation.getLastModifiedDate()); contract.setTenantId(budgetReAppropriation.getTenantId()); return contract; }
BudgetReAppropriationMapper { public BudgetReAppropriationContract toContract(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationContract contract = new BudgetReAppropriationContract(); contract.setId(budgetReAppropriation.getId()); if (budgetReAppropriation.getBudgetDetail() != null) { final BudgetDetailMapper bdMapper = new BudgetDetailMapper(); contract.setBudgetDetail(bdMapper.toContract(budgetReAppropriation.getBudgetDetail())); } contract.setAdditionAmount(budgetReAppropriation.getAdditionAmount()); contract.setDeductionAmount(budgetReAppropriation.getDeductionAmount()); contract.setOriginalAdditionAmount(budgetReAppropriation.getOriginalAdditionAmount()); contract.setOriginalDeductionAmount(budgetReAppropriation.getOriginalDeductionAmount()); contract.setAnticipatoryAmount(budgetReAppropriation.getAnticipatoryAmount()); if (budgetReAppropriation.getStatus() != null) contract.setStatus(FinancialStatusContract.builder().id(budgetReAppropriation.getStatus().getId()) .code(budgetReAppropriation.getStatus().getCode()) .description(budgetReAppropriation.getStatus().getDescription()) .moduleType(budgetReAppropriation.getStatus().getModuleType()).build()); contract.setAsOnDate(budgetReAppropriation.getAsOnDate()); contract.setCreatedBy(budgetReAppropriation.getCreatedBy()); contract.setCreatedDate(budgetReAppropriation.getCreatedDate()); contract.setLastModifiedBy(budgetReAppropriation.getLastModifiedBy()); contract.setLastModifiedDate(budgetReAppropriation.getLastModifiedDate()); contract.setTenantId(budgetReAppropriation.getTenantId()); return contract; } }
BudgetReAppropriationMapper { public BudgetReAppropriationContract toContract(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationContract contract = new BudgetReAppropriationContract(); contract.setId(budgetReAppropriation.getId()); if (budgetReAppropriation.getBudgetDetail() != null) { final BudgetDetailMapper bdMapper = new BudgetDetailMapper(); contract.setBudgetDetail(bdMapper.toContract(budgetReAppropriation.getBudgetDetail())); } contract.setAdditionAmount(budgetReAppropriation.getAdditionAmount()); contract.setDeductionAmount(budgetReAppropriation.getDeductionAmount()); contract.setOriginalAdditionAmount(budgetReAppropriation.getOriginalAdditionAmount()); contract.setOriginalDeductionAmount(budgetReAppropriation.getOriginalDeductionAmount()); contract.setAnticipatoryAmount(budgetReAppropriation.getAnticipatoryAmount()); if (budgetReAppropriation.getStatus() != null) contract.setStatus(FinancialStatusContract.builder().id(budgetReAppropriation.getStatus().getId()) .code(budgetReAppropriation.getStatus().getCode()) .description(budgetReAppropriation.getStatus().getDescription()) .moduleType(budgetReAppropriation.getStatus().getModuleType()).build()); contract.setAsOnDate(budgetReAppropriation.getAsOnDate()); contract.setCreatedBy(budgetReAppropriation.getCreatedBy()); contract.setCreatedDate(budgetReAppropriation.getCreatedDate()); contract.setLastModifiedBy(budgetReAppropriation.getLastModifiedBy()); contract.setLastModifiedDate(budgetReAppropriation.getLastModifiedDate()); contract.setTenantId(budgetReAppropriation.getTenantId()); return contract; }  }
BudgetReAppropriationMapper { public BudgetReAppropriationContract toContract(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationContract contract = new BudgetReAppropriationContract(); contract.setId(budgetReAppropriation.getId()); if (budgetReAppropriation.getBudgetDetail() != null) { final BudgetDetailMapper bdMapper = new BudgetDetailMapper(); contract.setBudgetDetail(bdMapper.toContract(budgetReAppropriation.getBudgetDetail())); } contract.setAdditionAmount(budgetReAppropriation.getAdditionAmount()); contract.setDeductionAmount(budgetReAppropriation.getDeductionAmount()); contract.setOriginalAdditionAmount(budgetReAppropriation.getOriginalAdditionAmount()); contract.setOriginalDeductionAmount(budgetReAppropriation.getOriginalDeductionAmount()); contract.setAnticipatoryAmount(budgetReAppropriation.getAnticipatoryAmount()); if (budgetReAppropriation.getStatus() != null) contract.setStatus(FinancialStatusContract.builder().id(budgetReAppropriation.getStatus().getId()) .code(budgetReAppropriation.getStatus().getCode()) .description(budgetReAppropriation.getStatus().getDescription()) .moduleType(budgetReAppropriation.getStatus().getModuleType()).build()); contract.setAsOnDate(budgetReAppropriation.getAsOnDate()); contract.setCreatedBy(budgetReAppropriation.getCreatedBy()); contract.setCreatedDate(budgetReAppropriation.getCreatedDate()); contract.setLastModifiedBy(budgetReAppropriation.getLastModifiedBy()); contract.setLastModifiedDate(budgetReAppropriation.getLastModifiedDate()); contract.setTenantId(budgetReAppropriation.getTenantId()); return contract; }  BudgetReAppropriation toDomain(final BudgetReAppropriationContract contract); BudgetReAppropriationContract toContract(final BudgetReAppropriation budgetReAppropriation); BudgetReAppropriationSearch toSearchDomain(final BudgetReAppropriationSearchContract contract); BudgetReAppropriationSearchContract toSearchContract(
            final BudgetReAppropriationSearch budgetReAppropriationSearch); }
BudgetReAppropriationMapper { public BudgetReAppropriationContract toContract(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationContract contract = new BudgetReAppropriationContract(); contract.setId(budgetReAppropriation.getId()); if (budgetReAppropriation.getBudgetDetail() != null) { final BudgetDetailMapper bdMapper = new BudgetDetailMapper(); contract.setBudgetDetail(bdMapper.toContract(budgetReAppropriation.getBudgetDetail())); } contract.setAdditionAmount(budgetReAppropriation.getAdditionAmount()); contract.setDeductionAmount(budgetReAppropriation.getDeductionAmount()); contract.setOriginalAdditionAmount(budgetReAppropriation.getOriginalAdditionAmount()); contract.setOriginalDeductionAmount(budgetReAppropriation.getOriginalDeductionAmount()); contract.setAnticipatoryAmount(budgetReAppropriation.getAnticipatoryAmount()); if (budgetReAppropriation.getStatus() != null) contract.setStatus(FinancialStatusContract.builder().id(budgetReAppropriation.getStatus().getId()) .code(budgetReAppropriation.getStatus().getCode()) .description(budgetReAppropriation.getStatus().getDescription()) .moduleType(budgetReAppropriation.getStatus().getModuleType()).build()); contract.setAsOnDate(budgetReAppropriation.getAsOnDate()); contract.setCreatedBy(budgetReAppropriation.getCreatedBy()); contract.setCreatedDate(budgetReAppropriation.getCreatedDate()); contract.setLastModifiedBy(budgetReAppropriation.getLastModifiedBy()); contract.setLastModifiedDate(budgetReAppropriation.getLastModifiedDate()); contract.setTenantId(budgetReAppropriation.getTenantId()); return contract; }  BudgetReAppropriation toDomain(final BudgetReAppropriationContract contract); BudgetReAppropriationContract toContract(final BudgetReAppropriation budgetReAppropriation); BudgetReAppropriationSearch toSearchDomain(final BudgetReAppropriationSearchContract contract); BudgetReAppropriationSearchContract toSearchContract(
            final BudgetReAppropriationSearch budgetReAppropriationSearch);  }