| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kew.documentlink; |
| 17 | |
|
| 18 | |
import javax.persistence.Column; |
| 19 | |
import javax.persistence.Entity; |
| 20 | |
import javax.persistence.Id; |
| 21 | |
import javax.persistence.PrePersist; |
| 22 | |
import javax.persistence.Table; |
| 23 | |
|
| 24 | |
import org.kuali.rice.core.jpa.annotations.Sequence; |
| 25 | |
import org.kuali.rice.core.util.OrmUtils; |
| 26 | |
import org.kuali.rice.kew.bo.WorkflowPersistable; |
| 27 | |
import org.kuali.rice.kew.service.KEWServiceLocator; |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
@Entity |
| 37 | |
@Table(name="KREW_DOC_LNK_T") |
| 38 | |
@Sequence(name="KREW_DOC_LNK_S",property="docLinkId") |
| 39 | 0 | public class DocumentLink implements WorkflowPersistable { |
| 40 | |
|
| 41 | |
private static final long serialVersionUID = 551926904795633010L; |
| 42 | |
|
| 43 | |
@Id |
| 44 | |
@Column(name="DOC_LNK_ID") |
| 45 | |
private Long docLinkId; |
| 46 | |
@Column(name="ORGN_DOC_ID") |
| 47 | |
private Long orgnDocId; |
| 48 | |
@Column(name="DEST_DOC_ID") |
| 49 | |
private Long destDocId; |
| 50 | |
|
| 51 | |
|
| 52 | |
|
| 53 | |
|
| 54 | |
public Long getDocLinkId() { |
| 55 | 0 | return this.docLinkId; |
| 56 | |
} |
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
|
| 61 | |
public void setDocLinkId(Long docLinkId) { |
| 62 | 0 | this.docLinkId = docLinkId; |
| 63 | 0 | } |
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
public Long getOrgnDocId() { |
| 69 | 0 | return this.orgnDocId; |
| 70 | |
} |
| 71 | |
|
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
public void setOrgnDocId(Long orgnDocId) { |
| 76 | 0 | this.orgnDocId = orgnDocId; |
| 77 | 0 | } |
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
|
| 82 | |
public Long getDestDocId() { |
| 83 | 0 | return this.destDocId; |
| 84 | |
} |
| 85 | |
|
| 86 | |
|
| 87 | |
|
| 88 | |
|
| 89 | |
public void setDestDocId(Long destDocId) { |
| 90 | 0 | this.destDocId = destDocId; |
| 91 | 0 | } |
| 92 | |
|
| 93 | |
|
| 94 | |
|
| 95 | |
|
| 96 | |
|
| 97 | |
|
| 98 | |
public Object copy(boolean preserveKeys) { |
| 99 | 0 | return null; |
| 100 | |
} |
| 101 | |
|
| 102 | |
@PrePersist |
| 103 | |
public void beforeInsert(){ |
| 104 | 0 | OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager()); |
| 105 | 0 | } |
| 106 | |
|
| 107 | |
} |