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