Coverage Report - org.kuali.student.enrollment.class2.acal.dto.AcademicCalendarWrapper
 
Classes in this File Line Coverage Branch Coverage Complexity
AcademicCalendarWrapper
0%
0/15
N/A
1
 
 1  
 package org.kuali.student.enrollment.class2.acal.dto;
 2  
 
 3  
 import java.io.Serializable;
 4  
 import java.util.List;
 5  
 import java.util.ArrayList;
 6  
 
 7  
 import org.apache.commons.lang.StringUtils;
 8  
 import org.kuali.student.enrollment.acal.constants.AcademicCalendarServiceConstants;
 9  
 import org.kuali.student.enrollment.acal.dto.AcademicCalendarInfo;
 10  
 
 11  
 //This code is for core slice
 12  
 public class AcademicCalendarWrapper implements Serializable {
 13  
         private static final long serialVersionUID = 1L;
 14  
 
 15  
     String id;
 16  
         AcademicCalendarInfo academicCalendarInfo;
 17  
         List<TermWrapper> termWrapperList;
 18  
 
 19  0
         public AcademicCalendarWrapper (){
 20  0
                 termWrapperList = new ArrayList<TermWrapper>();
 21  0
         }
 22  
     /**
 23  
          * @return the id
 24  
          */
 25  
         public String getId() {
 26  0
                 return id;
 27  
         }
 28  
         /**
 29  
          * @param id the id to set. It equals to academicCalendarInfo.getId()
 30  
          */
 31  
         public void setId(String id) {
 32  0
                 this.id = id;
 33  0
         }
 34  
         /**
 35  
          * @return the academicCalendarInfo
 36  
          */
 37  
         public AcademicCalendarInfo getAcademicCalendarInfo() {
 38  0
                 return academicCalendarInfo;
 39  
         }
 40  
         /**
 41  
          * @param academicCalendarInfo the academicCalendarInfo to set
 42  
          */
 43  
         public void setAcademicCalendarInfo(AcademicCalendarInfo academicCalendarInfo) {
 44  0
                 this.academicCalendarInfo = academicCalendarInfo;
 45  0
         this.id = academicCalendarInfo.getId();
 46  0
         }
 47  
         /**
 48  
          * @return the termWrapperList
 49  
          */
 50  
         public List<TermWrapper> getTermWrapperList() {
 51  0
                 return termWrapperList;
 52  
         }
 53  
         /**
 54  
          * @param termWrapperList the termWrapperList to set
 55  
          */
 56  
         public void setTermWrapperList(List<TermWrapper> termWrapperList) {
 57  0
                 this.termWrapperList = termWrapperList;
 58  0
         }
 59  
 
 60  
     public boolean isOfficial() {
 61  0
         return StringUtils.equals(academicCalendarInfo.getStateKey(), AcademicCalendarServiceConstants.ACADEMIC_CALENDAR_OFFICIAL_STATE_KEY);
 62  
     }
 63  
 
 64  
     public boolean isNew() {
 65  0
         return StringUtils.isBlank(academicCalendarInfo.getId());
 66  
     }
 67  
 
 68  
 }