View Javadoc

1   /**
2    * Copyright 2012 The Kuali Foundation 
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the
5    * "License"); you may not use this file except in compliance with the
6    * License. You may obtain a copy of the License at
7    *
8    * http://www.osedu.org/licenses/ECL-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13   * implied. See the License for the specific language governing
14   * permissions and limitations under the License.
15   */
16  
17  package org.kuali.student.enrollment.roster.dto;
18  
19  import java.io.Serializable;
20  import java.util.ArrayList;
21  import java.util.List;
22  
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlAnyElement;
26  import javax.xml.bind.annotation.XmlElement;
27  import javax.xml.bind.annotation.XmlType;
28  
29  import org.kuali.student.enrollment.roster.infc.LprRoster;
30  import org.kuali.student.r2.common.dto.IdEntityInfo;
31  import org.kuali.student.r2.common.dto.TimeAmountInfo;
32  import org.w3c.dom.Element;
33  
34  @XmlAccessorType(XmlAccessType.FIELD)
35  @XmlType(name = "LprRosterInfo", propOrder = {
36                  "id", "typeKey", "stateKey", "name", "descr", 
37                  "associatedLuiIds", "maximumCapacity", "checkInRequired", 
38                  "checkInFrequency", "meta", "attributes", "_futureElements"})
39          
40  public class LprRosterInfo 
41      extends IdEntityInfo 
42      implements LprRoster, Serializable {
43  
44      private static final long serialVersionUID = 1L;
45  
46      @XmlElement
47      private List<String> associatedLuiIds;
48  
49      @XmlElement
50      private Integer maximumCapacity;
51  
52      @XmlElement
53      private Boolean checkInRequired;
54  
55      @XmlElement
56      private TimeAmountInfo checkInFrequency;
57  
58      @XmlAnyElement
59      private List<Element> _futureElements;
60  
61  
62      /**
63       *  Constructs a new LprRosterInfo.
64       */
65      public LprRosterInfo() {
66      }
67  
68      /**
69       *  Constructs a new LprRosterInfo from another LprRoster.
70       *
71       *  @param lprRoster the LprRoster to copy
72       */    
73      public LprRosterInfo(LprRoster lprRoster) {
74          if (lprRoster != null) {
75              this.associatedLuiIds = new ArrayList<String>(lprRoster.getAssociatedLuiIds());
76              this.maximumCapacity = lprRoster.getMaximumCapacity();
77              this.checkInRequired = lprRoster.getCheckInRequired();
78              this.checkInFrequency = lprRoster.getCheckInFrequency();
79          }
80      }
81  
82      @Override
83      public List<String> getAssociatedLuiIds() {
84          if (this.associatedLuiIds == null) {
85              this.associatedLuiIds = new ArrayList<String>();
86          }
87  
88          return this.associatedLuiIds;
89      }
90  
91      public void setAssociatedLuiIds(List<String> associatedLuiIds) {
92          this.associatedLuiIds = associatedLuiIds;
93      }
94  
95      @Override
96      public Integer getMaximumCapacity() {
97          return maximumCapacity;
98      }
99  
100     public void setMaximumCapacity(Integer maximumCapacity) {
101         this.maximumCapacity = maximumCapacity;
102     }
103 
104     @Override
105     public Boolean getCheckInRequired() {
106         return checkInRequired;
107     }
108 
109     public void setCheckInRequired(Boolean checkInRequired) {
110         this.checkInRequired = checkInRequired;
111     }
112 
113     @Override
114     public TimeAmountInfo getCheckInFrequency() {
115         return checkInFrequency;
116     }
117 
118     public void setCheckInFrequency(TimeAmountInfo checkInFrequency) {
119         this.checkInFrequency = checkInFrequency;
120     }
121 }