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