Clover Coverage Report - Kuali Student 1.1-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Mar 3 2011 04:02:59 EST
../../../../../../img/srcFileCovDistChart5.png 41% of files have more coverage
19   164   18   1.12
2   92   0.95   17
17     1.06  
1    
 
  AbstractStatementInfo       Line # 39 19 0% 18 19 50% 0.5
 
  (1)
 
1    /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10    * software distributed under the License is distributed on an "AS IS"
11    * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12    * or implied. See the License for the specific language governing
13    * permissions and limitations under the License.
14    */
15   
16    package org.kuali.student.core.statement.dto;
17   
18    import java.io.Serializable;
19    import java.util.HashMap;
20    import java.util.Map;
21   
22    import javax.xml.bind.annotation.XmlAccessType;
23    import javax.xml.bind.annotation.XmlAccessorType;
24    import javax.xml.bind.annotation.XmlAttribute;
25    import javax.xml.bind.annotation.XmlElement;
26    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
27   
28    import org.kuali.student.core.dto.HasAttributes;
29    import org.kuali.student.core.dto.HasTypeState;
30    import org.kuali.student.core.dto.Idable;
31    import org.kuali.student.core.dto.MetaInfo;
32    import org.kuali.student.core.dto.RichTextInfo;
33    import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
34   
35    /**
36    *Detailed information about a single LU statement.
37    */
38    @XmlAccessorType(XmlAccessType.FIELD)
 
39    public abstract class AbstractStatementInfo implements Serializable, Idable, HasTypeState, HasAttributes {
40   
41    private static final long serialVersionUID = 1L;
42   
43    @XmlElement
44    private String name;
45   
46    @XmlElement
47    private RichTextInfo desc;
48   
49    @XmlElement
50    private StatementOperatorTypeKey operator;
51   
52    @XmlElement
53    @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
54    private Map<String, String> attributes;
55   
56    @XmlElement
57    private MetaInfo metaInfo;
58   
59    @XmlAttribute
60    private String type;
61   
62    @XmlAttribute
63    private String state;
64   
65    @XmlAttribute
66    private String id;
67   
68    /**
69    * Friendly name for the LU statement.
70    */
 
71  1 toggle public String getName() {
72  1 return name;
73    }
74   
 
75  0 toggle public void setName(String name) {
76  0 this.name = name;
77    }
78   
79    /**
80    * Narrative description for the LU statement.
81    */
 
82  1 toggle public RichTextInfo getDesc() {
83  1 return desc;
84    }
85   
 
86  0 toggle public void setDesc(RichTextInfo desc) {
87  0 this.desc = desc;
88    }
89   
90    /**
91    * Logical operator used to assemble statements. Acceptable values are restricted to AND and OR. This operator applies to both the LU statements and requirement components contained within this statement.
92    */
 
93  1 toggle public StatementOperatorTypeKey getOperator() {
94  1 return operator;
95    }
96   
 
97  0 toggle public void setOperator(StatementOperatorTypeKey operator) {
98  0 this.operator = operator;
99    }
100   
101    /**
102    * List of key/value pairs, typically used for dynamic attributes.
103    */
 
104  1 toggle public Map<String, String> getAttributes() {
105  1 if (attributes == null) {
106  1 attributes = new HashMap<String, String>();
107    }
108  1 return attributes;
109    }
110   
 
111  0 toggle public void setAttributes(Map<String, String> attributes) {
112  0 this.attributes = attributes;
113    }
114   
115    /**
116    * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations.
117    */
 
118  1 toggle public MetaInfo getMetaInfo() {
119  1 return metaInfo;
120    }
121   
 
122  0 toggle public void setMetaInfo(MetaInfo metaInfo) {
123  0 this.metaInfo = metaInfo;
124    }
125   
126    /**
127    * Unique identifier for an LU statement type.
128    */
 
129  1 toggle public String getType() {
130  1 return type;
131    }
132   
 
133  0 toggle public void setType(String type) {
134  0 this.type = type;
135    }
136   
137    /**
138    * The current status of the statement. The values for this field are constrained to those in the StatementState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
139    */
 
140  1 toggle public String getState() {
141  1 return state;
142    }
143   
 
144  0 toggle public void setState(String state) {
145  0 this.state = state;
146    }
147   
148    /**
149    * Unique identifier for a single LU statement record. This is optional, due to the identifier being set at the time of creation. Once the LU statement has been created, this should be seen as required.
150    */
 
151  1 toggle public String getId() {
152  1 return id;
153    }
154   
 
155  0 toggle public void setId(String id) {
156  0 this.id = id;
157    }
158   
 
159  0 toggle @Override
160    public String toString() {
161  0 return "StatementInfo[id=" + id + ", operator=" + operator + ", type="
162    + type + ", state=" + state + "]";
163    }
164    }