Coverage Report - org.kuali.student.enrollment.class2.acal.service.assembler.HolidayAssembler
 
Classes in this File Line Coverage Branch Coverage Complexity
HolidayAssembler
0%
0/34
0%
0/4
3
 
 1  
 package org.kuali.student.enrollment.class2.acal.service.assembler;
 2  
 
 3  
 import org.kuali.student.enrollment.acal.dto.HolidayInfo;
 4  
 import org.kuali.student.r2.common.assembler.AssemblyException;
 5  
 import org.kuali.student.r2.common.assembler.DTOAssembler;
 6  
 import org.kuali.student.r2.common.dto.ContextInfo;
 7  
 import org.kuali.student.r2.core.atp.dto.MilestoneInfo;
 8  
 
 9  0
 public class HolidayAssembler  implements DTOAssembler<HolidayInfo, MilestoneInfo> {
 10  
 
 11  
     @Override
 12  
     public HolidayInfo assemble(MilestoneInfo milestoneInfo, ContextInfo context) throws AssemblyException {
 13  
 
 14  0
         if (milestoneInfo == null){
 15  0
             return null;
 16  
         }
 17  
 
 18  0
         HolidayInfo holidayInfo = new HolidayInfo();
 19  0
         holidayInfo.setId(milestoneInfo.getId());
 20  0
         holidayInfo.setName(milestoneInfo.getName());
 21  0
         holidayInfo.setDescr(milestoneInfo.getDescr());
 22  
 
 23  0
         holidayInfo.setStartDate(milestoneInfo.getStartDate());
 24  0
         holidayInfo.setEndDate(milestoneInfo.getEndDate());
 25  0
         holidayInfo.setIsAllDay(milestoneInfo.getIsAllDay());
 26  0
         holidayInfo.setIsDateRange(milestoneInfo.getIsDateRange());
 27  0
         holidayInfo.setIsInstructionalDay(milestoneInfo.getIsInstructionalDay());
 28  0
         holidayInfo.setStateKey(milestoneInfo.getStateKey());
 29  0
         holidayInfo.setTypeKey(milestoneInfo.getTypeKey());
 30  
 
 31  0
         holidayInfo.setMeta(milestoneInfo.getMeta());
 32  0
         holidayInfo.setAttributes(milestoneInfo.getAttributes());
 33  
 
 34  0
         return holidayInfo;
 35  
     }
 36  
 
 37  
     @Override
 38  
     public MilestoneInfo disassemble(HolidayInfo holidayInfo, ContextInfo context) throws AssemblyException {
 39  
 
 40  0
         if (holidayInfo == null){
 41  0
             return null;
 42  
         }
 43  
 
 44  0
         MilestoneInfo msInfo = new MilestoneInfo();
 45  
 
 46  0
         msInfo.setId(holidayInfo.getId());
 47  0
         msInfo.setName(holidayInfo.getName());
 48  0
         msInfo.setDescr(holidayInfo.getDescr());
 49  
 
 50  0
         msInfo.setStartDate(holidayInfo.getStartDate());
 51  0
         msInfo.setEndDate(holidayInfo.getEndDate());
 52  
 
 53  0
         msInfo.setIsAllDay(holidayInfo.getIsAllDay());
 54  0
         msInfo.setIsDateRange(holidayInfo.getIsDateRange());
 55  0
         msInfo.setIsInstructionalDay(holidayInfo.getIsInstructionalDay());
 56  0
         msInfo.setIsRelative(false);
 57  
 
 58  0
         msInfo.setStateKey(holidayInfo.getStateKey());
 59  0
         msInfo.setTypeKey(holidayInfo.getTypeKey());
 60  
 
 61  0
         msInfo.setMeta(holidayInfo.getMeta());
 62  0
         msInfo.setAttributes(holidayInfo.getAttributes());
 63  
 
 64  0
         return msInfo;
 65  
     }
 66  
 }