| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| SessionDocument |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2005-2008 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.kns.bo; | |
| 17 | ||
| 18 | import java.sql.Timestamp; | |
| 19 | import java.util.LinkedHashMap; | |
| 20 | ||
| 21 | import org.apache.ojb.broker.PersistenceBroker; | |
| 22 | import org.apache.ojb.broker.PersistenceBrokerException; | |
| 23 | ||
| 24 | ||
| 25 | /* | |
| 26 | * Defines methods a business object should implement. | |
| 27 | */ | |
| 28 | 0 | public class SessionDocument extends PersistableBusinessObjectBase{ |
| 29 | ||
| 30 | private static final long serialVersionUID = 2866566562262830639L; | |
| 31 | ||
| 32 | protected String documentNumber; | |
| 33 | protected String sessionId; | |
| 34 | protected Timestamp lastUpdatedDate; | |
| 35 | protected byte[] serializedDocumentForm; | |
| 36 | //private KualiDocumentFormBase serializedDocumentForm; | |
| 37 | 0 | protected boolean encrypted = false; |
| 38 | protected String principalId; | |
| 39 | protected String ipAddress; | |
| 40 | ||
| 41 | ||
| 42 | /** | |
| 43 | * @return the serializedDocumentForm | |
| 44 | */ | |
| 45 | public byte[] getSerializedDocumentForm() { | |
| 46 | 0 | return this.serializedDocumentForm; |
| 47 | } | |
| 48 | ||
| 49 | /** | |
| 50 | * @param serializedDocumentForm the serializedDocumentForm to set | |
| 51 | */ | |
| 52 | public void setSerializedDocumentForm(byte[] serializedDocumentForm) { | |
| 53 | 0 | this.serializedDocumentForm = serializedDocumentForm; |
| 54 | 0 | } |
| 55 | ||
| 56 | ||
| 57 | /** | |
| 58 | * @return the sessionId | |
| 59 | */ | |
| 60 | public String getSessionId() { | |
| 61 | 0 | return this.sessionId; |
| 62 | } | |
| 63 | ||
| 64 | /** | |
| 65 | * @param sessionId the sessionId to set | |
| 66 | */ | |
| 67 | public void setSessionId(String sessionId) { | |
| 68 | 0 | this.sessionId = sessionId; |
| 69 | 0 | } |
| 70 | ||
| 71 | ||
| 72 | /** | |
| 73 | * @return the lastUpdatedDate | |
| 74 | */ | |
| 75 | public Timestamp getLastUpdatedDate() { | |
| 76 | 0 | return this.lastUpdatedDate; |
| 77 | } | |
| 78 | ||
| 79 | /** | |
| 80 | * @param lastUpdatedDate the lastUpdatedDate to set | |
| 81 | */ | |
| 82 | public void setLastUpdatedDate(Timestamp lastUpdatedDate) { | |
| 83 | 0 | this.lastUpdatedDate = lastUpdatedDate; |
| 84 | 0 | } |
| 85 | ||
| 86 | /** | |
| 87 | * @return the documentNumber | |
| 88 | */ | |
| 89 | public String getDocumentNumber() { | |
| 90 | 0 | return this.documentNumber; |
| 91 | } | |
| 92 | ||
| 93 | /** | |
| 94 | * @param documentNumber the documentNumber to set | |
| 95 | */ | |
| 96 | public void setDocumentNumber(String documentNumber) { | |
| 97 | 0 | this.documentNumber = documentNumber; |
| 98 | 0 | } |
| 99 | ||
| 100 | ||
| 101 | ||
| 102 | /** | |
| 103 | * @return the principalId | |
| 104 | */ | |
| 105 | public String getPrincipalId() { | |
| 106 | 0 | return this.principalId; |
| 107 | } | |
| 108 | ||
| 109 | /** | |
| 110 | * @param principalId the principalId to set | |
| 111 | */ | |
| 112 | public void setPrincipalId(String principalId) { | |
| 113 | 0 | this.principalId = principalId; |
| 114 | 0 | } |
| 115 | ||
| 116 | /** | |
| 117 | * @return the ipAddress | |
| 118 | */ | |
| 119 | public String getIpAddress() { | |
| 120 | 0 | return this.ipAddress; |
| 121 | } | |
| 122 | ||
| 123 | /** | |
| 124 | * @param ipAddress the ipAddress to set | |
| 125 | */ | |
| 126 | public void setIpAddress(String ipAddress) { | |
| 127 | 0 | this.ipAddress = ipAddress; |
| 128 | 0 | } |
| 129 | ||
| 130 | @SuppressWarnings("unchecked") | |
| 131 | protected LinkedHashMap toStringMapper() { | |
| 132 | 0 | LinkedHashMap m = new LinkedHashMap(); |
| 133 | 0 | m.put("documentNumber", this.documentNumber); |
| 134 | 0 | m.put("sessionId", this.sessionId); |
| 135 | 0 | m.put("principalId", this.principalId); |
| 136 | 0 | m.put("ipAddress", this.ipAddress); |
| 137 | 0 | return m; |
| 138 | } | |
| 139 | ||
| 140 | public boolean isEncrypted() { | |
| 141 | 0 | return this.encrypted; |
| 142 | } | |
| 143 | ||
| 144 | public void setEncrypted(boolean encrypted) { | |
| 145 | 0 | this.encrypted = encrypted; |
| 146 | 0 | } |
| 147 | ||
| 148 | public void beforeInsert() { | |
| 149 | // TODO kellerj - THIS METHOD NEEDS JAVADOCS | |
| 150 | 0 | super.beforeInsert(); |
| 151 | 0 | } |
| 152 | ||
| 153 | /** | |
| 154 | * This overridden method ... | |
| 155 | * | |
| 156 | * @see org.kuali.rice.kns.bo.PersistableBusinessObjectBase#beforeInsert(org.apache.ojb.broker.PersistenceBroker) | |
| 157 | */ | |
| 158 | @Override | |
| 159 | public void beforeInsert(PersistenceBroker persistenceBroker) | |
| 160 | throws PersistenceBrokerException { | |
| 161 | // TODO kellerj - THIS METHOD NEEDS JAVADOCS | |
| 162 | 0 | super.beforeInsert(persistenceBroker); |
| 163 | 0 | } |
| 164 | ||
| 165 | /** | |
| 166 | * This overridden method ... | |
| 167 | * | |
| 168 | * @see org.kuali.rice.kns.bo.PersistableBusinessObjectBase#afterLookup(org.apache.ojb.broker.PersistenceBroker) | |
| 169 | */ | |
| 170 | @Override | |
| 171 | public void afterLookup(PersistenceBroker persistenceBroker) | |
| 172 | throws PersistenceBrokerException { | |
| 173 | // TODO kellerj - THIS METHOD NEEDS JAVADOCS | |
| 174 | 0 | super.afterLookup(persistenceBroker); |
| 175 | 0 | } |
| 176 | } |