1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
package org.kuali.student.r2.common.versionmanagement.dto; |
13 | |
|
14 | |
import java.io.Serializable; |
15 | |
import java.util.Date; |
16 | |
import java.util.List; |
17 | |
|
18 | |
import javax.xml.bind.annotation.XmlAccessType; |
19 | |
import javax.xml.bind.annotation.XmlAccessorType; |
20 | |
import javax.xml.bind.annotation.XmlAnyElement; |
21 | |
import javax.xml.bind.annotation.XmlElement; |
22 | |
import javax.xml.bind.annotation.XmlType; |
23 | |
|
24 | |
import org.kuali.student.r2.common.versionmanagement.infc.Version; |
25 | |
import org.w3c.dom.Element; |
26 | |
|
27 | |
@XmlType(name = "VersionInfo", propOrder = {"versionIndId", "sequenceNumber", "currentVersionStart", "currentVersionEnd", "versionComment", "versionedFromId", "_futureElements"}) |
28 | |
@XmlAccessorType(XmlAccessType.FIELD) |
29 | |
public class VersionInfo implements Version, Serializable { |
30 | |
|
31 | |
private static final long serialVersionUID = 1L; |
32 | |
|
33 | |
@XmlElement |
34 | |
private String versionIndId; |
35 | |
|
36 | |
@XmlElement |
37 | |
private Long sequenceNumber; |
38 | |
|
39 | |
@XmlElement |
40 | |
private Date currentVersionStart; |
41 | |
|
42 | |
@XmlElement |
43 | |
private Date currentVersionEnd; |
44 | |
|
45 | |
@XmlElement |
46 | |
private String versionComment; |
47 | |
|
48 | |
@XmlElement |
49 | |
private String versionedFromId; |
50 | |
|
51 | |
@XmlAnyElement |
52 | |
private List<Element> _futureElements; |
53 | |
|
54 | 0 | public VersionInfo() { |
55 | |
|
56 | 0 | } |
57 | |
|
58 | 0 | public VersionInfo(Version version) { |
59 | 0 | if (version != null) { |
60 | 0 | this.versionIndId = version.getVersionIndId(); |
61 | 0 | this.sequenceNumber = version.getSequenceNumber(); |
62 | 0 | this.currentVersionStart = version.getCurrentVersionStart(); |
63 | 0 | this.currentVersionEnd = version.getCurrentVersionEnd(); |
64 | 0 | this.versionComment = version.getVersionComment(); |
65 | 0 | this.versionedFromId = version.getVersionedFromId(); |
66 | |
} |
67 | 0 | } |
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
@Override |
73 | |
public String getVersionIndId() { |
74 | 0 | return versionIndId; |
75 | |
} |
76 | |
|
77 | |
public void setVersionIndId(String versionIndId) { |
78 | 0 | this.versionIndId = versionIndId; |
79 | 0 | } |
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
@Override |
85 | |
public Long getSequenceNumber() { |
86 | 0 | return sequenceNumber; |
87 | |
} |
88 | |
|
89 | |
public void setSequenceNumber(Long sequenceNumber) { |
90 | 0 | this.sequenceNumber = sequenceNumber; |
91 | 0 | } |
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
@Override |
97 | |
public Date getCurrentVersionStart() { |
98 | 0 | return currentVersionStart; |
99 | |
} |
100 | |
|
101 | |
public void setCurrentVersionStart(Date currentVersionStart) { |
102 | 0 | this.currentVersionStart = currentVersionStart; |
103 | 0 | } |
104 | |
|
105 | |
|
106 | |
|
107 | |
|
108 | |
@Override |
109 | |
public Date getCurrentVersionEnd() { |
110 | 0 | return currentVersionEnd; |
111 | |
} |
112 | |
|
113 | |
public void setCurrentVersionEnd(Date currentVersionEnd) { |
114 | 0 | this.currentVersionEnd = currentVersionEnd; |
115 | 0 | } |
116 | |
|
117 | |
|
118 | |
|
119 | |
|
120 | |
@Override |
121 | |
public String getVersionComment() { |
122 | 0 | return versionComment; |
123 | |
} |
124 | |
|
125 | |
public void setVersionComment(String versionComment) { |
126 | 0 | this.versionComment = versionComment; |
127 | 0 | } |
128 | |
|
129 | |
public void setVersionedFromId(String versionedFromId) { |
130 | 0 | this.versionedFromId = versionedFromId; |
131 | 0 | } |
132 | |
|
133 | |
@Override |
134 | |
public String getVersionedFromId() { |
135 | 0 | return versionedFromId; |
136 | |
} |
137 | |
} |