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
32   149   21   1.68
4   109   0.66   9.5
19     1.11  
2    
 
  RelationshipInfo       Line # 29 16 0% 9 27 0% 0.0
  RelationshipInfo.Builder       Line # 85 16 0% 12 28 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2009 The Kuali Foundation Licensed under the Educational
3    * Community License, Version 1.0 (the "License"); you may not use
4    * this file except in compliance with the License. You may obtain a
5    * copy of the License at http://www.opensource.org/licenses/ecl1.php
6    * Unless required by applicable law or agreed to in writing, software
7    * distributed under the License is distributed on an "AS IS" BASIS,
8    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
9    * implied. See the License for the specific language governing
10    * permissions and limitations under the License.
11    */
12    package org.kuali.student.contract.model.test.source;
13   
14    import java.io.Serializable;
15    import java.util.Date;
16   
17    import javax.xml.bind.annotation.XmlAccessType;
18    import javax.xml.bind.annotation.XmlAccessorType;
19    import javax.xml.bind.annotation.XmlAttribute;
20    import javax.xml.bind.annotation.XmlElement;
21    import javax.xml.bind.annotation.XmlTransient;
22   
23   
24    /**
25    * Information about a Relationship.
26    */
27    @XmlAccessorType(XmlAccessType.FIELD)
28    @XmlTransient
 
29    public abstract class RelationshipInfo extends HasAttributesAndMetaInfo implements Relationship, Serializable {
30   
31    @XmlAttribute
32    private String id;
33    @XmlAttribute (required = true)
34    private String typeKey;
35    @XmlAttribute (required = true)
36    private String stateKey;
37    @XmlElement
38    private final Date effectiveDate;
39    @XmlElement
40    private final Date expirationDate;
41   
 
42  0 toggle protected RelationshipInfo() {
43  0 id = null;
44  0 typeKey = null;
45  0 stateKey = null;
46  0 effectiveDate = null;
47  0 expirationDate = null;
48    }
49   
 
50  0 toggle protected RelationshipInfo(Relationship builder) {
51  0 super(builder);
52  0 this.id = builder.getId();
53  0 this.typeKey = builder.getTypeKey();
54  0 this.stateKey = builder.getStateKey();
55  0 this.effectiveDate = null != builder.getEffectiveDate() ? new Date(builder.getEffectiveDate().getTime()) : null;
56  0 this.expirationDate = null != builder.getExpirationDate() ? new Date(builder.getExpirationDate().getTime()) : null;
57    }
58   
59   
 
60  0 toggle @Override
61    public String getId() {
62  0 return id;
63    }
64   
 
65  0 toggle @Override
66    public String getTypeKey() {
67  0 return typeKey;
68    }
69   
 
70  0 toggle @Override
71    public String getStateKey() {
72  0 return stateKey;
73    }
74   
 
75  0 toggle @Override
76    public Date getEffectiveDate() {
77  0 return effectiveDate;
78    }
79   
 
80  0 toggle @Override
81    public Date getExpirationDate() {
82  0 return expirationDate;
83    }
84   
 
85    public static class Builder extends HasAttributesAndMetaInfo.Builder implements Relationship {
86   
87    private String id;
88    private String typeKey;
89    private String stateKey;
90    private Date effectiveDate;
91    private Date expirationDate;
92   
 
93  0 toggle public Builder() {
94    }
95   
 
96  0 toggle public Builder(Relationship amrInfo) {
97  0 super(amrInfo);
98  0 this.id = amrInfo.getId();
99  0 this.typeKey = amrInfo.getTypeKey();
100  0 this.stateKey = amrInfo.getStateKey();
101  0 this.effectiveDate = amrInfo.getEffectiveDate();
102  0 this.expirationDate = amrInfo.getExpirationDate();
103    }
104   
 
105  0 toggle @Override
106    public String getId() {
107  0 return id;
108    }
109   
 
110  0 toggle public void setId(String id) {
111  0 this.id = id;
112    }
113   
 
114  0 toggle @Override
115    public String getTypeKey() {
116  0 return typeKey;
117    }
118   
 
119  0 toggle public void setTypeKey(String typeKey) {
120  0 this.typeKey = typeKey;
121    }
122   
 
123  0 toggle @Override
124    public String getStateKey() {
125  0 return stateKey;
126    }
127   
 
128  0 toggle public void setStateKey(String stateKey) {
129  0 this.stateKey = stateKey;
130    }
 
131  0 toggle @Override
132    public Date getEffectiveDate() {
133  0 return effectiveDate;
134    }
135   
 
136  0 toggle public void setEffectiveDate(Date effectiveDate) {
137  0 this.effectiveDate = effectiveDate;
138    }
139   
 
140  0 toggle @Override
141    public Date getExpirationDate() {
142  0 return expirationDate;
143    }
144   
 
145  0 toggle public void setExpirationDate(Date expirationDate) {
146  0 this.expirationDate = expirationDate;
147    }
148    }
149    }