Coverage Report - org.kuali.rice.kns.document.MaintenanceLock
 
Classes in this File Line Coverage Branch Coverage Complexity
MaintenanceLock
0%
0/14
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-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.document;
 17  
 
 18  
 import java.util.LinkedHashMap;
 19  
 
 20  
 import javax.persistence.Column;
 21  
 import javax.persistence.Entity;
 22  
 import javax.persistence.Id;
 23  
 import javax.persistence.Table;
 24  
 
 25  
 import org.kuali.rice.core.jpa.annotations.Sequence;
 26  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
 27  
 import org.kuali.rice.kns.util.KNSPropertyConstants;
 28  
 
 29  
 /**
 30  
  * List of business objects that this maintenance document is locking (prevents two documents from being routed trying to update the same object)
 31  
  * Most maintenance documents have only one lock, but globals have many 
 32  
  */
 33  
 @Entity
 34  
 @Sequence(name="KRNS_MAINT_LOCK_S", property="lockId")
 35  
 @Table(name="KRNS_MAINT_LOCK_T")
 36  0
 public class MaintenanceLock extends PersistableBusinessObjectBase {
 37  
     private static final long serialVersionUID = 7766326835852387301L;
 38  
         @Id
 39  
     @Column(name="MAINT_LOCK_ID")
 40  
     private String lockId;
 41  
         @Column(name="MAINT_LOCK_REP_TXT")
 42  
         private String lockingRepresentation;
 43  
     @Column(name="DOC_HDR_ID")
 44  
         private String documentNumber;
 45  
 
 46  
     public String getLockId() {
 47  0
                 return this.lockId;
 48  
         }
 49  
 
 50  
         public void setLockId(String lockId) {
 51  0
                 this.lockId = lockId;
 52  0
         }
 53  
 
 54  
         public String getLockingRepresentation() {
 55  0
         return lockingRepresentation;
 56  
     }
 57  
 
 58  
     public void setLockingRepresentation(String lockingRepresentation) {
 59  0
         this.lockingRepresentation = lockingRepresentation;
 60  0
     }
 61  
     
 62  
     public String getDocumentNumber() {
 63  0
         return documentNumber;
 64  
     }
 65  
 
 66  
     public void setDocumentNumber(String documentNumber) {
 67  0
         this.documentNumber = documentNumber;
 68  0
     }
 69  
 
 70  
     /**
 71  
      * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
 72  
      */
 73  
     @SuppressWarnings("unchecked")
 74  
         protected LinkedHashMap toStringMapper() {
 75  0
         LinkedHashMap m = new LinkedHashMap();
 76  0
         m.put("lockingRepresentation", this.lockingRepresentation);
 77  0
         m.put(KNSPropertyConstants.DOCUMENT_NUMBER, getDocumentNumber());
 78  0
         return m;
 79  
     }
 80  
 }
 81