View Javadoc

1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.bo;
17  
18  import org.hibernate.annotations.Type;
19  
20  import javax.persistence.Column;
21  import javax.persistence.Entity;
22  import javax.persistence.Id;
23  import javax.persistence.IdClass;
24  import javax.persistence.Lob;
25  import javax.persistence.Table;
26  import java.sql.Timestamp;
27  
28  /*
29   * Defines methods a business object should implement.
30   */
31  @IdClass(org.kuali.rice.krad.bo.SessionDocumentId.class)
32  @Entity
33  @Table(name="KRNS_SESN_DOC_T")
34  public class SessionDocument extends PersistableBusinessObjectBase{
35  
36  	private static final long serialVersionUID = 2866566562262830639L;
37  
38  	@Id
39  	protected String documentNumber;
40  	@Id
41  	protected String sessionId;
42  	@Column(name="LAST_UPDT_DT")
43  	protected Timestamp lastUpdatedDate;
44  	@Lob
45  	@Column(name="SERIALZD_DOC_FRM")
46  	protected byte[] serializedDocumentForm;
47  	@Type(type="yes_no")
48  	@Column(name="CONTENT_ENCRYPTED_IND")
49  	protected boolean encrypted = false;
50  	@Id
51  	protected String principalId;
52  	@Id
53  	protected String ipAddress;
54  
55  
56  	/**
57  	 * @return the serializedDocumentForm
58  	 */
59  	public byte[] getSerializedDocumentForm() {
60  		return this.serializedDocumentForm;
61  	}
62  
63  	/**
64  	 * @param serializedDocumentForm the serializedDocumentForm to set
65  	 */
66  	public void setSerializedDocumentForm(byte[] serializedDocumentForm) {
67  		this.serializedDocumentForm = serializedDocumentForm;
68  	}
69  
70  
71  	/**
72  	 * @return the sessionId
73  	 */
74  	public String getSessionId() {
75  		return this.sessionId;
76  	}
77  
78  	/**
79  	 * @param sessionId the sessionId to set
80  	 */
81  	public void setSessionId(String sessionId) {
82  		this.sessionId = sessionId;
83  	}
84  
85  
86  	/**
87  	 * @return the lastUpdatedDate
88  	 */
89  	public Timestamp getLastUpdatedDate() {
90  		return this.lastUpdatedDate;
91  	}
92  
93  	/**
94  	 * @param lastUpdatedDate the lastUpdatedDate to set
95  	 */
96  	public void setLastUpdatedDate(Timestamp lastUpdatedDate) {
97  		this.lastUpdatedDate = lastUpdatedDate;
98  	}
99  
100 	/**
101 	 * @return the documentNumber
102 	 */
103 	public String getDocumentNumber() {
104 		return this.documentNumber;
105 	}
106 
107 	/**
108 	 * @param documentNumber the documentNumber to set
109 	 */
110 	public void setDocumentNumber(String documentNumber) {
111 		this.documentNumber = documentNumber;
112 	}
113 
114 
115 
116 	/**
117 	 * @return the principalId
118 	 */
119 	public String getPrincipalId() {
120 		return this.principalId;
121 	}
122 
123 	/**
124 	 * @param principalId the principalId to set
125 	 */
126 	public void setPrincipalId(String principalId) {
127 		this.principalId = principalId;
128 	}
129 
130 	/**
131 	 * @return the ipAddress
132 	 */
133 	public String getIpAddress() {
134 		return this.ipAddress;
135 	}
136 
137 	/**
138 	 * @param ipAddress the ipAddress to set
139 	 */
140 	public void setIpAddress(String ipAddress) {
141 		this.ipAddress = ipAddress;
142 	}
143 
144 	public boolean isEncrypted() {
145 		return this.encrypted;
146 	}
147 
148 	public void setEncrypted(boolean encrypted) {
149 		this.encrypted = encrypted;
150 	}
151 
152 }