1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ksb.messaging.bam;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.hibernate.annotations.GenericGenerator;
20 import org.hibernate.annotations.Parameter;
21
22 import javax.persistence.CascadeType;
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.FetchType;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.Id;
28 import javax.persistence.JoinColumn;
29 import javax.persistence.Lob;
30 import javax.persistence.ManyToOne;
31 import javax.persistence.Table;
32
33
34
35
36
37
38 @Entity
39 @Table(name="KRSB_BAM_PARM_T")
40
41 public class BAMParam {
42
43 @Id
44 @GeneratedValue(generator="KRSB_BAM_PARM_S")
45 @GenericGenerator(name="KRSB_BAM_PARM_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
46 @Parameter(name="sequence_name",value="KRSB_BAM_PARM_S"),
47 @Parameter(name="value_column",value="id")
48 })
49 @Column(name="BAM_PARM_ID")
50 private Long bamParamId;
51 @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST})
52 @JoinColumn(name="BAM_ID")
53 private BAMTargetEntry bamTargetEntry;
54 @Lob
55 @Column(name="PARM")
56 private String param;
57
58 public BAMTargetEntry getBamTargetEntry() {
59 return this.bamTargetEntry;
60 }
61 public void setBamTargetEntry(BAMTargetEntry bamTargetEntry) {
62 this.bamTargetEntry = bamTargetEntry;
63 }
64 public Long getBamParamId() {
65 return this.bamParamId;
66 }
67 public void setBamParamId(Long bamParamId) {
68 this.bamParamId = bamParamId;
69 }
70 public String getParam() {
71 return this.param;
72 }
73 public void setParam(String paramToString) {
74 if (StringUtils.isEmpty(paramToString)) {
75 paramToString = "<null>";
76 }
77 this.param = paramToString;
78 }
79 }