Clover Coverage Report - KS Services 0.0.1-SNAPSHOT (Aggregated)
Coverage timestamp: Mon May 23 2011 04:06:57 EDT
../../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
23   233   22   1.1
2   108   0.96   21
21     1.05  
1    
 
  CluCluRelationInfo       Line # 41 23 0% 22 46 0% 0.0
 
No Tests
 
1    /**
2    * Copyright 2010 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.opensource.org/licenses/ecl1.php
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.lum.lu.dto;
18   
19    import org.kuali.student.core.dto.HasAttributes;
20    import org.kuali.student.core.dto.HasTypeState;
21    import org.kuali.student.core.dto.Idable;
22    import org.kuali.student.core.dto.MetaInfo;
23    import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
24   
25    import javax.xml.bind.annotation.XmlAccessType;
26    import javax.xml.bind.annotation.XmlAccessorType;
27    import javax.xml.bind.annotation.XmlAttribute;
28    import javax.xml.bind.annotation.XmlElement;
29    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
30    import java.io.Serializable;
31    import java.util.Date;
32    import java.util.HashMap;
33    import java.util.Map;
34   
35   
36    /**
37    * Detailed information about a CLU to CLU relationship.
38    */
39   
40    @XmlAccessorType(XmlAccessType.FIELD)
 
41    public class CluCluRelationInfo implements Serializable, Idable, HasTypeState, HasAttributes {
42   
43    private static final long serialVersionUID = 1L;
44   
45    @XmlElement
46    private String cluId;
47   
48    @XmlElement
49    private String relatedCluId;
50   
51    @XmlElement
52    private Boolean isCluRelationRequired;
53   
54    @XmlElement
55    private Date effectiveDate;
56   
57    @XmlElement
58    private Date expirationDate;
59   
60    @XmlElement
61    @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
62    private Map<String, String> attributes;
63   
64    @XmlElement
65    private MetaInfo metaInfo;
66   
67    @XmlAttribute
68    private String type;
69   
70    @XmlAttribute
71    private String state;
72   
73    @XmlAttribute
74    private String id;
75   
76   
77    /**
78    * Unique identifier for a Canonical Learning Unit (CLU).
79    */
80   
 
81  0 toggle public String getCluId() {
82  0 return cluId;
83    }
84   
 
85  0 toggle public void setCluId(String cluId) {
86  0 this.cluId = cluId;
87    }
88   
89   
90    /**
91    * Unique identifier for a Canonical Learning Unit (CLU).
92    */
93   
 
94  0 toggle public String getRelatedCluId() {
95  0 return relatedCluId;
96    }
97   
 
98  0 toggle public void setRelatedCluId(String relatedCluId) {
99  0 this.relatedCluId = relatedCluId;
100    }
101   
102   
103    /**
104    * Indicates if the relation is required upon instantiation of a
105    * LUI. Default is "true".
106    */
107   
 
108  0 toggle public Boolean getIsCluRelationRequired() {
109  0 return isCluRelationRequired;
110    }
111   
 
112  0 toggle public void setIsCluRelationRequired(Boolean isCluRelationRequired) {
113  0 this.isCluRelationRequired = isCluRelationRequired;
114    }
115   
116   
117    /**
118    * Date and time that this CLU to CLU relationship became
119    * effective. This is a similar concept to the effective date on
120    * enumerated values. When an expiration date has been specified,
121    * this field must be less than or equal to the expiration date.
122    */
123   
 
124  0 toggle public Date getEffectiveDate() {
125  0 return effectiveDate;
126    }
127   
 
128  0 toggle public void setEffectiveDate(Date effectiveDate) {
129  0 this.effectiveDate = effectiveDate;
130    }
131   
132   
133    /**
134    * Date and time that this CLU to CLU relationship expires. This
135    * is a similar concept to the expiration date on enumerated
136    * values. If specified, this should be greater than or equal to
137    * the effective date. If this field is not specified, then no
138    * expiration date has been currently defined and should
139    * automatically be considered greater than the effective date.
140    */
141   
 
142  0 toggle public Date getExpirationDate() {
143  0 return expirationDate;
144    }
145   
 
146  0 toggle public void setExpirationDate(Date expirationDate) {
147  0 this.expirationDate = expirationDate;
148    }
149   
150   
151    /**
152    * List of key/value pairs, typically used for dynamic attributes.
153    */
154   
 
155  0 toggle public Map<String, String> getAttributes() {
156  0 if (attributes == null) {
157  0 attributes = new HashMap<String, String>();
158    }
159   
160  0 return attributes;
161    }
162   
 
163  0 toggle @Override
164    public void setAttributes(Map<String, String> attributes) {
165  0 this.attributes = attributes;
166    }
167   
168   
169    /**
170    * Create and last update info for the structure. This is optional
171    * and treated as read only since the data is set by the internals
172    * of the service during maintenance operations.
173    */
174   
 
175  0 toggle public MetaInfo getMetaInfo() {
176  0 return metaInfo;
177    }
178   
 
179  0 toggle public void setMetaInfo(MetaInfo metaInfo) {
180  0 this.metaInfo = metaInfo;
181    }
182   
183   
184    /**
185    * Unique identifier for the LU to LU relation type.
186    */
187   
 
188  0 toggle public String getType() {
189  0 return type;
190    }
191   
 
192  0 toggle public void setType(String type) {
193  0 this.type = type;
194    }
195   
196   
197    /**
198    * Identifier for the current status of a CLU to CLU
199    * relationship. The values for this field are constrained to
200    * those in the luLuRelationState enumeration. A separate setup
201    * operation does not exist for retrieval of the meta data around
202    * this value.
203    */
204   
 
205  0 toggle public String getState() {
206  0 return state;
207    }
208   
 
209  0 toggle public void setState(String state) {
210  0 this.state = state;
211    }
212   
213   
214    /**
215    * Unique identifier for a CLU to CLU relationship. This is
216    * optional, due to the identifier being set at the time of
217    * creation. Once the relation has been created, this should be
218    * seen as required.
219    */
220   
 
221  0 toggle public String getId() {
222  0 return id;
223    }
224   
 
225  0 toggle public void setId(String id) {
226  0 this.id = id;
227    }
228   
 
229  0 toggle @Override
230    public String toString() {
231  0 return "CluCluRelationInfo[id=" + id + ", cluId=" + cluId + ", relatedCluId=" + relatedCluId + ", type=" + type + ", cluRelationRequired=" + isCluRelationRequired + "]";
232    }
233    }