001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.bo;
017
018import org.hibernate.annotations.Type;
019
020import javax.persistence.Column;
021import javax.persistence.Entity;
022import javax.persistence.Id;
023import javax.persistence.IdClass;
024import javax.persistence.Lob;
025import javax.persistence.Table;
026import java.sql.Timestamp;
027
028/*
029 * Defines methods a business object should implement.
030 */
031@IdClass(org.kuali.rice.krad.bo.SessionDocumentId.class)
032@Entity
033@Table(name="KRNS_SESN_DOC_T")
034public class SessionDocument extends PersistableBusinessObjectBase{
035    
036        private static final long serialVersionUID = 2866566562262830639L;
037        
038        @Id
039        protected String documentNumber;
040        @Id
041        protected String sessionId;
042        @Column(name="LAST_UPDT_DT")
043        protected Timestamp lastUpdatedDate;
044        @Lob
045        @Column(name="SERIALZD_DOC_FRM")
046        protected byte[] serializedDocumentForm;
047        @Type(type="yes_no")
048        @Column(name="CONTENT_ENCRYPTED_IND")
049        protected boolean encrypted = false;
050        @Id
051        protected String principalId;
052        @Id
053        protected String ipAddress;
054        
055        
056        /**
057         * @return the serializedDocumentForm
058         */
059        public byte[] getSerializedDocumentForm() {
060                return this.serializedDocumentForm;
061        }
062
063        /**
064         * @param serializedDocumentForm the serializedDocumentForm to set
065         */
066        public void setSerializedDocumentForm(byte[] serializedDocumentForm) {
067                this.serializedDocumentForm = serializedDocumentForm;
068        }
069
070
071        /**
072         * @return the sessionId
073         */
074        public String getSessionId() {
075                return this.sessionId;
076        }
077
078        /**
079         * @param sessionId the sessionId to set
080         */
081        public void setSessionId(String sessionId) {
082                this.sessionId = sessionId;
083        }
084
085        
086        /**
087         * @return the lastUpdatedDate
088         */
089        public Timestamp getLastUpdatedDate() {
090                return this.lastUpdatedDate;
091        }
092
093        /**
094         * @param lastUpdatedDate the lastUpdatedDate to set
095         */
096        public void setLastUpdatedDate(Timestamp lastUpdatedDate) {
097                this.lastUpdatedDate = lastUpdatedDate;
098        }
099
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}