View Javadoc

1   /**
2    * Copyright 2011-2012 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.mobility.reporting.entity;
17  
18  import java.io.Serializable;
19  import java.sql.Timestamp;
20  import java.util.ArrayList;
21  import java.util.List;
22  
23  import javax.persistence.CascadeType;
24  import javax.persistence.Column;
25  import javax.persistence.Entity;
26  import javax.persistence.FetchType;
27  import javax.persistence.GeneratedValue;
28  import javax.persistence.GenerationType;
29  import javax.persistence.Id;
30  import javax.persistence.OneToMany;
31  import javax.persistence.Table;
32  import javax.persistence.Version;
33  import javax.xml.bind.annotation.XmlElement;
34  import javax.xml.bind.annotation.XmlRootElement;
35  
36  @XmlRootElement(name = "submission")
37  @Entity
38  @Table(name="KME_SUBMISSION_T")
39  public class Submission implements Serializable {
40  
41  	private static final long serialVersionUID = 3936544145647062912L;
42  
43      @Id
44  	@GeneratedValue(strategy = GenerationType.TABLE)
45      @Column(name="ID", nullable=false, updatable=false)
46      private Long id;
47    
48      @Column(name="PRNT_ID")
49      private Long parentId;
50      
51      @Column(name="REV_NBR")
52      private Long revisionNumber;
53  
54      @Column(name="REV_USR_ID")
55      private String revisionUserId;
56      
57      @Column(name="NM")
58      private String name;
59      
60      @Column(name="TYP")
61      private String type;
62      
63      @Column(name="GRP")
64      private String group;
65      
66      @Column(name="ACTV")
67      private int active;
68      
69      @Column(name="PST_DT")
70      private Timestamp postDate;
71  
72      @Column(name="ARCHVD_DT")
73      private Timestamp archivedDate;
74  
75      @Column(name="IP_ADDR")
76      private String ipAddress;
77  
78      @Column(name="USR_AGNT")
79      private String userAgent;
80      
81      @Column(name="USR_ID")
82      private String userId;
83      
84      @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy="submission")
85      private List<SubmissionAttribute> attributes;
86  
87  	@Version
88      @Column(name="VER_NBR")
89      protected Long versionNumber;
90  
91  	public Long getId() {
92  		return id;
93  	}
94  
95  	public void setId(Long id) {
96  		this.id = id;
97  	}
98  
99  	public Long getParentId() {
100 		return parentId;
101 	}
102 
103 	public void setParentId(Long parentId) {
104 		this.parentId = parentId;
105 	}
106 
107 	public Long getRevisionNumber() {
108 		return revisionNumber;
109 	}
110 
111 	public void setRevisionNumber(Long revisionNumber) {
112 		this.revisionNumber = revisionNumber;
113 	}
114 
115 	public String getRevisionUserId() {
116 		return revisionUserId;
117 	}
118 
119 	public void setRevisionUserId(String revisionUserId) {
120 		this.revisionUserId = revisionUserId;
121 	}
122 
123 	public String getName() {
124 		return name;
125 	}
126 
127 	public void setName(String name) {
128 		this.name = name;
129 	}
130 
131 	public String getType() {
132 		return type;
133 	}
134 
135 	public void setType(String type) {
136 		this.type = type;
137 	}
138 
139 	public String getGroup() {
140 		return group;
141 	}
142 
143 	public void setGroup(String group) {
144 		this.group = group;
145 	}
146 
147 	public int getActive() {
148 		return active;
149 	}
150 
151 	public void setActive(int active) {
152 		this.active = active;
153 	}
154 
155 	public Timestamp getPostDate() {
156 		return postDate;
157 	}
158 
159 	public void setPostDate(Timestamp postDate) {
160 		this.postDate = postDate;
161 	}
162 
163 	public Timestamp getArchivedDate() {
164 		return archivedDate;
165 	}
166 
167 	public void setArchivedDate(Timestamp archivedDate) {
168 		this.archivedDate = archivedDate;
169 	}
170 
171 	public String getIpAddress() {
172 		return ipAddress;
173 	}
174 
175 	public void setIpAddress(String ipAddress) {
176 		this.ipAddress = ipAddress;
177 	}
178 
179 	public String getUserAgent() {
180 		return userAgent;
181 	}
182 
183 	public void setUserAgent(String userAgent) {
184 		this.userAgent = userAgent;
185 	}
186 
187 	public String getUserId() {
188 		return userId;
189 	}
190 
191 	public void setUserId(String userId) {
192 		this.userId = userId;
193 	}
194 
195 	public Long getVersionNumber() {
196 		return versionNumber;
197 	}
198 
199 	public void setVersionNumber(Long versionNumber) {
200 		this.versionNumber = versionNumber;
201 	}    
202 	
203 	@XmlElement(name = "attributes")
204     public List<SubmissionAttribute> getAttributes() {
205 		return attributes;
206 	}
207 
208 	public void setAttributes(List<SubmissionAttribute> attributes) {
209 		this.attributes = attributes;
210 	}
211 
212 }