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