Coverage Report - org.kuali.rice.kew.documentlink.DocumentLink
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentLink
0%
0/12
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2010 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.kew.documentlink;
 17  
 
 18  
 import org.hibernate.annotations.GenericGenerator;
 19  
 import org.hibernate.annotations.Parameter;
 20  
 import org.kuali.rice.core.framework.persistence.jpa.OrmUtils;
 21  
 import org.kuali.rice.kew.service.KEWServiceLocator;
 22  
 
 23  
 import javax.persistence.*;
 24  
 import java.io.Serializable;
 25  
 
 26  
 /**
 27  
  * Server side bean for DocumentLinkDAO 
 28  
  * 
 29  
  * @author Kuali Rice Team (kuali-rice@googlegroups.com)
 30  
  *
 31  
  */
 32  
 
 33  
 @Entity
 34  
 @Table(name="KREW_DOC_LNK_T")
 35  
 //@Sequence(name="KREW_DOC_LNK_S",property="docLinkId")
 36  0
 public class DocumentLink implements Serializable {
 37  
 
 38  
         private static final long serialVersionUID = 551926904795633010L;
 39  
         
 40  
         @Id
 41  
         @GeneratedValue(generator="KREW_DOC_LNK_S")
 42  
         @GenericGenerator(name="KREW_DOC_LNK_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
 43  
                         @Parameter(name="sequence_name",value="KREW_DOC_LNK_S"),
 44  
                         @Parameter(name="value_column",value="id")
 45  
         })
 46  
         @Column(name="DOC_LNK_ID")
 47  
         private Long docLinkId;
 48  
     @Column(name="ORGN_DOC_ID")
 49  
         private String orgnDocId;
 50  
     @Column(name="DEST_DOC_ID")
 51  
         private String destDocId;
 52  
     
 53  
         /**
 54  
          * @return the docLinkId
 55  
          */
 56  
         public Long getDocLinkId() {
 57  0
                 return this.docLinkId;
 58  
         }
 59  
 
 60  
         /**
 61  
          * @param docLinkId the docLinkId to set
 62  
          */
 63  
         public void setDocLinkId(Long docLinkId) {
 64  0
                 this.docLinkId = docLinkId;
 65  0
         }
 66  
 
 67  
         /**
 68  
          * @return the orgnDocId
 69  
          */
 70  
         public String getOrgnDocId() {
 71  0
                 return this.orgnDocId;
 72  
         }
 73  
 
 74  
         /**
 75  
          * @param orgnDocId the orgnDocId to set
 76  
          */
 77  
         public void setOrgnDocId(String orgnDocId) {
 78  0
                 this.orgnDocId = orgnDocId;
 79  0
         }
 80  
 
 81  
         /**
 82  
          * @return the destDocId
 83  
          */
 84  
         public String getDestDocId() {
 85  0
                 return this.destDocId;
 86  
         }
 87  
 
 88  
         /**
 89  
          * @param destDocId the destDocId to set
 90  
          */
 91  
         public void setDestDocId(String destDocId) {
 92  0
                 this.destDocId = destDocId;
 93  0
         }
 94  
         
 95  
         //@PrePersist
 96  
         public void beforeInsert(){
 97  0
                 OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager());                
 98  0
         }
 99  
 
 100  
 }