View Javadoc
1   /**
2    * Copyright 2005-2015 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 java.sql.Timestamp;
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 javax.persistence.UniqueConstraint;
27  
28  import org.eclipse.persistence.annotations.Index;
29  
30  /*
31   * Defines methods a business object should implement.
32   */
33  @IdClass(SessionDocumentId.class)
34  @Entity
35  @Table(name="KRNS_SESN_DOC_T",uniqueConstraints= {
36          @UniqueConstraint(name="KRNS_SESN_DOC_TC0",columnNames="OBJ_ID")
37  })
38  public class SessionDocument extends DataObjectBase {
39  
40  	private static final long serialVersionUID = 2866566562262830639L;
41  
42      @Id
43      @Column(name="SESN_DOC_ID",length=40)
44      protected String sessionId;
45      @Id
46      @Column(name="DOC_HDR_ID",length=14)
47      protected String documentNumber;
48      @Id
49      @Column(name="PRNCPL_ID",length=40)
50      protected String principalId;
51      @Id
52      @Column(name="IP_ADDR",length=60)
53      protected String ipAddress;
54  
55      @Column(name="LAST_UPDT_DT")
56      @Index(name="KRNS_SESN_DOC_TI1")
57  	protected Timestamp lastUpdatedDate;
58  	@Lob
59  	@Column(name="SERIALZD_DOC_FRM")
60  	protected byte[] serializedDocumentForm;
61  
62  	@Column(name="CONTENT_ENCRYPTED_IND",length=1)
63  	protected Boolean encrypted = false;
64  
65  	/**
66  	 * @return the serializedDocumentForm
67  	 */
68  	public byte[] getSerializedDocumentForm() {
69  		return this.serializedDocumentForm;
70  	}
71  
72  	/**
73  	 * @param serializedDocumentForm the serializedDocumentForm to set
74  	 */
75  	public void setSerializedDocumentForm(byte[] serializedDocumentForm) {
76  		this.serializedDocumentForm = serializedDocumentForm;
77  	}
78  
79  
80  	/**
81  	 * @return the sessionId
82  	 */
83  	public String getSessionId() {
84  		return this.sessionId;
85  	}
86  
87  	/**
88  	 * @param sessionId the sessionId to set
89  	 */
90  	public void setSessionId(String sessionId) {
91  		this.sessionId = sessionId;
92  	}
93  
94  
95  	/**
96  	 * @return the lastUpdatedDate
97  	 */
98  	public Timestamp getLastUpdatedDate() {
99  		return this.lastUpdatedDate;
100 	}
101 
102 	/**
103 	 * @param lastUpdatedDate the lastUpdatedDate to set
104 	 */
105 	public void setLastUpdatedDate(Timestamp lastUpdatedDate) {
106 		this.lastUpdatedDate = lastUpdatedDate;
107 	}
108 
109 	/**
110 	 * @return the documentNumber
111 	 */
112 	public String getDocumentNumber() {
113 		return this.documentNumber;
114 	}
115 
116 	/**
117 	 * @param documentNumber the documentNumber to set
118 	 */
119 	public void setDocumentNumber(String documentNumber) {
120 		this.documentNumber = documentNumber;
121 	}
122 
123 
124 
125 	/**
126 	 * @return the principalId
127 	 */
128 	public String getPrincipalId() {
129 		return this.principalId;
130 	}
131 
132 	/**
133 	 * @param principalId the principalId to set
134 	 */
135 	public void setPrincipalId(String principalId) {
136 		this.principalId = principalId;
137 	}
138 
139 	/**
140 	 * @return the ipAddress
141 	 */
142 	public String getIpAddress() {
143 		return this.ipAddress;
144 	}
145 
146 	/**
147 	 * @param ipAddress the ipAddress to set
148 	 */
149 	public void setIpAddress(String ipAddress) {
150 		this.ipAddress = ipAddress;
151 	}
152 
153 	public boolean isEncrypted() {
154 		return this.encrypted;
155 	}
156 
157 	public void setEncrypted(boolean encrypted) {
158 		this.encrypted = encrypted;
159 	}
160 
161 }