Clover Coverage Report - KS Contract Documentation Generator 0.0.1-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
34   155   22   1.7
4   115   0.65   10
20     1.1  
2    
 
  StateInfo       Line # 29 18 0% 9 29 0% 0.0
  StateInfo.Builder       Line # 93 16 0% 13 29 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2010 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may
3    * not use this file except in compliance with the License. You may obtain a copy of the License at
4    * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable law or agreed to in writing, software distributed
5    * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
6    * implied. See the License for the specific language governing permissions and limitations under the License.
7    */
8   
9    package org.kuali.student.contract.model.test.source;
10   
11    import java.io.Serializable;
12    import java.util.Date;
13    import java.util.List;
14   
15    import javax.xml.bind.annotation.XmlAccessType;
16    import javax.xml.bind.annotation.XmlAccessorType;
17    import javax.xml.bind.annotation.XmlAnyElement;
18    import javax.xml.bind.annotation.XmlAttribute;
19    import javax.xml.bind.annotation.XmlElement;
20    import javax.xml.bind.annotation.XmlType;
21   
22    import org.kuali.student.contract.model.test.source.ModelBuilder;
23    import org.kuali.student.contract.model.test.source.State;
24    import org.w3c.dom.Element;
25   
26    @SuppressWarnings("serial")
27    @XmlAccessorType(XmlAccessType.FIELD)
28    @XmlType(name = "StateInfo", propOrder = {"key", "name", "descr", "effectiveDate", "expirationDate", "attributes", "_futureElements"})
 
29    public class StateInfo extends HasAttributesInfo implements State, Serializable {
30   
31    @XmlAttribute
32    private final String key;
33   
34    @XmlElement
35    private final String name;
36   
37    @XmlElement
38    private final String descr;
39   
40    @XmlElement
41    private final Date effectiveDate;
42   
43    @XmlElement
44    private final Date expirationDate;
45   
46    @XmlAnyElement
47    private final List<Element> _futureElements;
48   
 
49  0 toggle private StateInfo() {
50  0 key = null;
51  0 name = null;
52  0 descr = null;
53  0 effectiveDate = null;
54  0 expirationDate = null;
55  0 _futureElements = null;
56    }
57   
 
58  0 toggle private StateInfo(State builder) {
59  0 super(builder);
60  0 this.key = builder.getKey();
61  0 this.name = builder.getName();
62  0 this.descr = builder.getDescr();
63  0 this.effectiveDate = null != builder.getEffectiveDate() ? new Date(builder.getEffectiveDate().getTime()) : null;
64  0 this.expirationDate = null != builder.getExpirationDate() ? new Date(builder.getExpirationDate().getTime()) : null;
65  0 this._futureElements = null;
66    }
67   
 
68  0 toggle @Override
69    public String getKey() {
70  0 return key;
71    }
72   
 
73  0 toggle @Override
74    public String getName() {
75  0 return name;
76    }
77   
 
78  0 toggle @Override
79    public String getDescr() {
80  0 return descr;
81    }
82   
 
83  0 toggle @Override
84    public Date getEffectiveDate() {
85  0 return effectiveDate;
86    }
87   
 
88  0 toggle @Override
89    public Date getExpirationDate() {
90  0 return expirationDate;
91    }
92   
 
93    public static class Builder extends HasAttributesInfo.Builder implements ModelBuilder<StateInfo>, State {
94    private String key;
95    private String name;
96    private String descr;
97    private Date effectiveDate;
98    private Date expirationDate;
99   
 
100  0 toggle public Builder() {}
101   
 
102  0 toggle public Builder(State stateInfo) {
103  0 this.key = stateInfo.getKey();
104  0 this.name = stateInfo.getName();
105  0 this.descr = stateInfo.getDescr();
106  0 this.effectiveDate = stateInfo.getEffectiveDate();
107  0 this.expirationDate = stateInfo.getExpirationDate();
108    }
109   
 
110  0 toggle public StateInfo build() {
111  0 return new StateInfo(this);
112    }
113   
 
114  0 toggle public String getKey() {
115  0 return key;
116    }
117   
 
118  0 toggle public void setKey(String key) {
119  0 this.key = key;
120    }
121   
 
122  0 toggle public String getName() {
123  0 return name;
124    }
125   
 
126  0 toggle public void setName(String name) {
127  0 this.name = name;
128    }
129   
 
130  0 toggle public String getDescr() {
131  0 return descr;
132    }
133   
 
134  0 toggle public void setDescr(String descr) {
135  0 this.descr = descr;
136    }
137   
 
138  0 toggle public Date getEffectiveDate() {
139  0 return effectiveDate;
140    }
141   
 
142  0 toggle public void setEffectiveDate(Date effectiveDate) {
143  0 this.effectiveDate = effectiveDate;
144    }
145   
 
146  0 toggle public Date getExpirationDate() {
147  0 return expirationDate;
148    }
149   
 
150  0 toggle public void setExpirationDate(Date expirationDate) {
151  0 this.expirationDate = expirationDate;
152    }
153   
154    }
155    }