1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.core.statement.dto; |
17 | |
|
18 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
19 | |
import org.kuali.student.r2.core.statement.infc.Statement; |
20 | |
import org.w3c.dom.Element; |
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 | |
import java.io.Serializable; |
28 | |
import java.util.ArrayList; |
29 | |
import java.util.List; |
30 | |
|
31 | |
@XmlAccessorType(XmlAccessType.FIELD) |
32 | |
@XmlType(name = "StatementInfo", propOrder = {"id", "typeKey", "stateKey", |
33 | |
"name", "descr", "operator", "statementIds", "reqComponentIds", "meta", "attributes", "_futureElements"}) |
34 | |
public class StatementInfo extends IdEntityInfo implements Statement, Serializable { |
35 | |
|
36 | |
private static final long serialVersionUID = 1L; |
37 | |
|
38 | |
@XmlElement |
39 | |
private StatementOperator operator; |
40 | |
@XmlElement |
41 | |
private List<String> statementIds; |
42 | |
@XmlElement |
43 | |
private List<String> reqComponentIds; |
44 | |
@XmlAnyElement |
45 | |
private List<Element> _futureElements; |
46 | |
|
47 | 0 | public StatementInfo() { |
48 | 0 | } |
49 | |
|
50 | |
public StatementInfo(Statement statement) { |
51 | 0 | super(statement); |
52 | 0 | if (null != statement) { |
53 | |
|
54 | 0 | this.operator = statement.getOperator(); |
55 | 0 | this.statementIds = new ArrayList<String>(statement.getStatementIds()); |
56 | 0 | this.reqComponentIds = new ArrayList<String>(statement.getReqComponentIds()); |
57 | |
} |
58 | 0 | } |
59 | |
|
60 | |
@Override |
61 | |
public StatementOperator getOperator() { |
62 | 0 | return this.operator; |
63 | |
} |
64 | |
|
65 | |
public void setOperator(StatementOperator operator) { |
66 | 0 | this.operator = operator; |
67 | 0 | } |
68 | |
|
69 | |
@Override |
70 | |
public List<String> getStatementIds() { |
71 | 0 | if (this.statementIds == null) { |
72 | 0 | this.statementIds = new ArrayList<String>(0); |
73 | |
} |
74 | 0 | return this.statementIds; |
75 | |
} |
76 | |
|
77 | |
public void setStatementIds(List<String> statementIds) { |
78 | 0 | this.statementIds = statementIds; |
79 | 0 | } |
80 | |
|
81 | |
@Override |
82 | |
public List<String> getReqComponentIds() { |
83 | 0 | if (this.reqComponentIds == null) { |
84 | 0 | this.reqComponentIds = new ArrayList<String>(0); |
85 | |
} |
86 | 0 | return this.reqComponentIds; |
87 | |
} |
88 | |
|
89 | |
public void setReqComponentIds(List<String> reqComponentIds) { |
90 | 0 | this.reqComponentIds = reqComponentIds; |
91 | 0 | } |
92 | |
|
93 | |
@Override |
94 | |
public String toString() { |
95 | 0 | return "StatementInfo[id=" + getId() + "]"; |
96 | |
} |
97 | |
|
98 | |
} |