Clover Coverage Report - Kuali Student 1.2-M4-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Jul 20 2011 11:14:35 EDT
../../../../../../img/srcFileCovDistChart10.png 0% 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 2 94.7% 0.94736844
 
  (12)
 
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.common.dto.HasAttributes;
29    import org.kuali.student.common.dto.HasTypeState;
30    import org.kuali.student.common.dto.Idable;
31    import org.kuali.student.common.dto.MetaInfo;
32    import org.kuali.student.common.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  32 toggle public String getName() {
72  32 return name;
73    }
74   
 
75  99 toggle public void setName(String name) {
76  99 this.name = name;
77    }
78   
79    /**
80    * Narrative description for the LU statement.
81    */
 
82  38 toggle public RichTextInfo getDesc() {
83  38 return desc;
84    }
85   
 
86  63 toggle public void setDesc(RichTextInfo desc) {
87  63 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  32 toggle public StatementOperatorTypeKey getOperator() {
94  32 return operator;
95    }
96   
 
97  102 toggle public void setOperator(StatementOperatorTypeKey operator) {
98  102 this.operator = operator;
99    }
100   
101    /**
102    * List of key/value pairs, typically used for dynamic attributes.
103    */
 
104  27 toggle public Map<String, String> getAttributes() {
105  27 if (attributes == null) {
106  5 attributes = new HashMap<String, String>();
107    }
108  27 return attributes;
109    }
110   
 
111  57 toggle public void setAttributes(Map<String, String> attributes) {
112  57 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  28 toggle public MetaInfo getMetaInfo() {
119  28 return metaInfo;
120    }
121   
 
122  60 toggle public void setMetaInfo(MetaInfo metaInfo) {
123  60 this.metaInfo = metaInfo;
124    }
125   
126    /**
127    * Unique identifier for an LU statement type.
128    */
 
129  41 toggle public String getType() {
130  41 return type;
131    }
132   
 
133  67 toggle public void setType(String type) {
134  67 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  38 toggle public String getState() {
141  38 return state;
142    }
143   
 
144  66 toggle public void setState(String state) {
145  66 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  78 toggle public String getId() {
152  78 return id;
153    }
154   
 
155  62 toggle public void setId(String id) {
156  62 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    }