1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.impl.repository;
17
18 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.GeneratedValue;
23 import javax.persistence.Id;
24 import javax.persistence.JoinColumn;
25 import javax.persistence.ManyToOne;
26 import javax.persistence.Table;
27 import javax.persistence.Transient;
28 import java.io.Serializable;
29
30 @Entity
31 @Table(name = "KRMS_CNTXT_VLD_TERM_SPEC_T")
32 public class ContextValidTermBo implements Serializable {
33
34 private static final long serialVersionUID = 1l;
35
36 @PortableSequenceGenerator(name = "KRMS_CNTXT_VLD_TERM_SPEC_S")
37 @GeneratedValue(generator = "KRMS_CNTXT_VLD_TERM_SPEC_S")
38 @Id
39 @Column(name = "CNTXT_TERM_SPEC_PREREQ_ID")
40 private String id;
41
42 @Column(name = "CNTXT_ID")
43 private String contextId;
44
45 @Transient
46 private Boolean prereq;
47
48 @ManyToOne()
49 @JoinColumn(name = "TERM_SPEC_ID", referencedColumnName = "TERM_SPEC_ID")
50 private TermSpecificationBo termSpecification;
51
52 public String getId() {
53 return id;
54 }
55
56 public void setId(String id) {
57 this.id = id;
58 }
59
60 public String getContextId() {
61 return contextId;
62 }
63
64 public void setContextId(String contextId) {
65 this.contextId = contextId;
66 }
67
68 public String getTermSpecificationId() {
69 if (termSpecification != null) {
70 return termSpecification.getId();
71 }
72
73 return null;
74 }
75
76 public Boolean getPrereq() {
77 return prereq;
78 }
79
80 public void setPrereq(Boolean prereq) {
81 this.prereq = prereq;
82 }
83
84 public TermSpecificationBo getTermSpecification() {
85 return termSpecification;
86 }
87
88 public void setTermSpecification(TermSpecificationBo termSpecification) {
89 this.termSpecification = termSpecification;
90 }
91 }