001/**
002 * Copyright 2005-2014 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 java.sql.Timestamp;
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 javax.persistence.UniqueConstraint;
027
028import org.eclipse.persistence.annotations.Index;
029
030/*
031 * Defines methods a business object should implement.
032 */
033@IdClass(SessionDocumentId.class)
034@Entity
035@Table(name="KRNS_SESN_DOC_T",uniqueConstraints= {
036        @UniqueConstraint(name="KRNS_SESN_DOC_TC0",columnNames="OBJ_ID")
037})
038public class SessionDocument extends DataObjectBase {
039
040        private static final long serialVersionUID = 2866566562262830639L;
041
042    @Id
043    @Column(name="SESN_DOC_ID",length=40)
044    protected String sessionId;
045    @Id
046    @Column(name="DOC_HDR_ID",length=14)
047    protected String documentNumber;
048    @Id
049    @Column(name="PRNCPL_ID",length=40)
050    protected String principalId;
051    @Id
052    @Column(name="IP_ADDR",length=60)
053    protected String ipAddress;
054
055    @Column(name="LAST_UPDT_DT")
056    @Index(name="KRNS_SESN_DOC_TI1")
057        protected Timestamp lastUpdatedDate;
058        @Lob
059        @Column(name="SERIALZD_DOC_FRM")
060        protected byte[] serializedDocumentForm;
061
062        @Column(name="CONTENT_ENCRYPTED_IND",length=1)
063        protected Boolean encrypted = false;
064
065        /**
066         * @return the serializedDocumentForm
067         */
068        public byte[] getSerializedDocumentForm() {
069                return this.serializedDocumentForm;
070        }
071
072        /**
073         * @param serializedDocumentForm the serializedDocumentForm to set
074         */
075        public void setSerializedDocumentForm(byte[] serializedDocumentForm) {
076                this.serializedDocumentForm = serializedDocumentForm;
077        }
078
079
080        /**
081         * @return the sessionId
082         */
083        public String getSessionId() {
084                return this.sessionId;
085        }
086
087        /**
088         * @param sessionId the sessionId to set
089         */
090        public void setSessionId(String sessionId) {
091                this.sessionId = sessionId;
092        }
093
094
095        /**
096         * @return the lastUpdatedDate
097         */
098        public Timestamp getLastUpdatedDate() {
099                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}