1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.enrollment.classI.lui.dto; |
18 | |
|
19 | |
import java.io.Serializable; |
20 | |
import java.util.Date; |
21 | |
import java.util.List; |
22 | |
|
23 | |
import javax.xml.bind.annotation.XmlAccessType; |
24 | |
import javax.xml.bind.annotation.XmlAccessorType; |
25 | |
import javax.xml.bind.annotation.XmlAnyElement; |
26 | |
import javax.xml.bind.annotation.XmlElement; |
27 | |
import javax.xml.bind.annotation.XmlType; |
28 | |
|
29 | |
import org.kuali.student.enrollment.classI.lui.infc.LuiLuiRelation; |
30 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
31 | |
import org.kuali.student.r2.common.infc.ModelBuilder; |
32 | |
import org.w3c.dom.Element; |
33 | |
|
34 | |
|
35 | |
|
36 | |
@XmlAccessorType(XmlAccessType.FIELD) |
37 | |
@XmlType(name = "LuiLuiRelationInfo", propOrder = {"id","typeKey","stateKey", "name", "descr", "luiId", "relatedLuiId", "effectiveDate", "expirationDate","metaInfo","attributes", "_futureElements"}) |
38 | 0 | public class LuiLuiRelationInfo extends IdEntityInfo |
39 | |
implements Serializable, LuiLuiRelation { |
40 | |
|
41 | |
private static final long serialVersionUID = 1L; |
42 | |
|
43 | |
@XmlElement |
44 | |
private final String luiId; |
45 | |
|
46 | |
@XmlElement |
47 | |
private final String relatedLuiId; |
48 | |
|
49 | |
@XmlElement |
50 | |
private final Date effectiveDate; |
51 | |
|
52 | |
@XmlElement |
53 | |
private final Date expirationDate; |
54 | |
|
55 | |
@XmlAnyElement |
56 | |
private final List<Element> _futureElements; |
57 | |
|
58 | 0 | private LuiLuiRelationInfo() { |
59 | 0 | luiId = null; |
60 | 0 | relatedLuiId = null; |
61 | 0 | effectiveDate = null; |
62 | 0 | expirationDate = null; |
63 | 0 | _futureElements = null; |
64 | 0 | } |
65 | |
|
66 | |
private LuiLuiRelationInfo(LuiLuiRelation builder) { |
67 | 0 | super(builder); |
68 | 0 | this.luiId = builder.getLuiId(); |
69 | 0 | this.relatedLuiId = builder.getRelatedLuiId(); |
70 | 0 | this.effectiveDate = null != builder.getEffectiveDate() ? new Date(builder.getEffectiveDate().getTime()) : null; |
71 | 0 | this.expirationDate = null != builder.getExpirationDate() ? new Date(builder.getExpirationDate().getTime()) : null; |
72 | 0 | this._futureElements = null; |
73 | 0 | } |
74 | |
|
75 | |
@Override |
76 | |
public String getLuiId() { |
77 | 0 | return luiId; |
78 | |
} |
79 | |
|
80 | |
@Override |
81 | |
public String getRelatedLuiId() { |
82 | 0 | return relatedLuiId; |
83 | |
} |
84 | |
|
85 | |
|
86 | |
@Override |
87 | |
public Date getEffectiveDate() { |
88 | 0 | return effectiveDate; |
89 | |
} |
90 | |
|
91 | |
|
92 | |
@Override |
93 | |
public Date getExpirationDate() { |
94 | 0 | return expirationDate; |
95 | |
} |
96 | |
|
97 | |
|
98 | 0 | public static class Builder extends IdEntityInfo.Builder implements ModelBuilder<LuiLuiRelationInfo>, LuiLuiRelation { |
99 | |
|
100 | |
private String luiId; |
101 | |
private String relatedLuiId; |
102 | |
private Date effectiveDate; |
103 | |
private Date expirationDate; |
104 | |
|
105 | 0 | public Builder() {} |
106 | |
|
107 | |
public Builder(LuiLuiRelation llrInfo) { |
108 | 0 | super(llrInfo); |
109 | 0 | this.luiId = llrInfo.getLuiId(); |
110 | 0 | this.relatedLuiId = llrInfo.getRelatedLuiId(); |
111 | 0 | this.effectiveDate = llrInfo.getEffectiveDate(); |
112 | 0 | this.expirationDate = llrInfo.getExpirationDate(); |
113 | 0 | } |
114 | |
|
115 | |
public LuiLuiRelationInfo build() { |
116 | 0 | return new LuiLuiRelationInfo(this); |
117 | |
} |
118 | |
|
119 | |
@Override |
120 | |
public String getLuiId() { |
121 | 0 | return luiId; |
122 | |
} |
123 | |
|
124 | |
public void setLuiId(String luiId) { |
125 | 0 | this.luiId = luiId; |
126 | 0 | } |
127 | |
|
128 | |
@Override |
129 | |
public String getRelatedLuiId() { |
130 | 0 | return relatedLuiId; |
131 | |
} |
132 | |
|
133 | |
public void setRelatedLuiId(String relatedLuiId) { |
134 | 0 | this.relatedLuiId = relatedLuiId; |
135 | 0 | } |
136 | |
|
137 | |
@Override |
138 | |
public Date getEffectiveDate() { |
139 | 0 | return effectiveDate; |
140 | |
} |
141 | |
|
142 | |
public void setEffectiveDate(Date effectiveDate) { |
143 | 0 | this.effectiveDate = effectiveDate; |
144 | 0 | } |
145 | |
|
146 | |
@Override |
147 | |
public Date getExpirationDate() { |
148 | 0 | return expirationDate; |
149 | |
} |
150 | |
|
151 | |
public void setExpirationDate(Date expirationDate) { |
152 | 0 | this.expirationDate = expirationDate; |
153 | 0 | } |
154 | |
|
155 | |
} |
156 | |
} |