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 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 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
@Entity |
34 | |
@Table(name="KREW_DOC_LNK_T") |
35 | |
|
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 | |
|
55 | |
|
56 | |
public Long getDocLinkId() { |
57 | 0 | return this.docLinkId; |
58 | |
} |
59 | |
|
60 | |
|
61 | |
|
62 | |
|
63 | |
public void setDocLinkId(Long docLinkId) { |
64 | 0 | this.docLinkId = docLinkId; |
65 | 0 | } |
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
public String getOrgnDocId() { |
71 | 0 | return this.orgnDocId; |
72 | |
} |
73 | |
|
74 | |
|
75 | |
|
76 | |
|
77 | |
public void setOrgnDocId(String orgnDocId) { |
78 | 0 | this.orgnDocId = orgnDocId; |
79 | 0 | } |
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
public String getDestDocId() { |
85 | 0 | return this.destDocId; |
86 | |
} |
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
public void setDestDocId(String destDocId) { |
92 | 0 | this.destDocId = destDocId; |
93 | 0 | } |
94 | |
|
95 | |
|
96 | |
public void beforeInsert(){ |
97 | 0 | OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager()); |
98 | 0 | } |
99 | |
|
100 | |
} |