Coverage Report - org.kuali.student.enrollment.class2.acal.service.assembler.KeyDateAssembler
 
Classes in this File Line Coverage Branch Coverage Complexity
KeyDateAssembler
0%
0/32
N/A
1
 
 1  
 package org.kuali.student.enrollment.class2.acal.service.assembler;
 2  
 
 3  
 import org.kuali.student.enrollment.acal.dto.KeyDateInfo;
 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 KeyDateAssembler implements DTOAssembler<KeyDateInfo, MilestoneInfo> {
 10  
 
 11  
     @Override
 12  
     public KeyDateInfo assemble(MilestoneInfo baseDTO, ContextInfo context) throws AssemblyException {
 13  0
         KeyDateInfo keyDateInfo = new KeyDateInfo();
 14  
 
 15  0
         keyDateInfo.setAttributes(baseDTO.getAttributes());
 16  0
         keyDateInfo.setDescr(baseDTO.getDescr());
 17  0
         keyDateInfo.setEndDate(baseDTO.getEndDate());
 18  0
         keyDateInfo.setId(baseDTO.getId());
 19  0
         keyDateInfo.setIsAllDay(baseDTO.getIsAllDay());
 20  0
         keyDateInfo.setIsDateRange(baseDTO.getIsDateRange());
 21  0
         keyDateInfo.setIsRelativeToKeyDate(baseDTO.getIsRelative());
 22  0
         keyDateInfo.setMeta(baseDTO.getMeta());
 23  0
         keyDateInfo.setName(baseDTO.getName());
 24  0
         keyDateInfo.setRelativeAnchorKeyDateId (baseDTO.getRelativeAnchorMilestoneId());
 25  0
         keyDateInfo.setStartDate(baseDTO.getStartDate());
 26  0
         keyDateInfo.setStateKey(baseDTO.getStateKey());
 27  0
         keyDateInfo.setTypeKey(baseDTO.getTypeKey());
 28  
 
 29  0
         return keyDateInfo;
 30  
     }
 31  
 
 32  
     @Override
 33  
     public MilestoneInfo disassemble(KeyDateInfo businessDTO, ContextInfo context) throws AssemblyException {
 34  0
         MilestoneInfo milestone = new MilestoneInfo();
 35  
         
 36  0
         milestone.setAttributes(businessDTO.getAttributes());
 37  0
         milestone.setDescr(businessDTO.getDescr() );
 38  0
         milestone.setEndDate(businessDTO.getEndDate());
 39  0
         milestone.setId(businessDTO.getId());
 40  0
         milestone.setIsAllDay(businessDTO.getIsAllDay());
 41  0
         milestone.setIsDateRange(businessDTO.getIsDateRange());
 42  0
         milestone.setIsRelative(businessDTO.getIsRelativeToKeyDate());
 43  0
         milestone.setIsInstructionalDay(false);
 44  0
         milestone.setMeta(businessDTO.getMeta());
 45  0
         milestone.setName(businessDTO.getName());
 46  0
         milestone.setRelativeAnchorMilestoneId(businessDTO.getRelativeAnchorKeyDateId());
 47  0
         milestone.setStartDate(businessDTO.getStartDate());
 48  0
         milestone.setStateKey(businessDTO.getStateKey());
 49  0
         milestone.setTypeKey(milestone.getTypeKey());
 50  
         
 51  0
         return milestone;
 52  
     }
 53  
 }