1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.bo;
17
18 import java.util.LinkedHashMap;
19
20 import javax.persistence.CascadeType;
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.FetchType;
24 import javax.persistence.Id;
25 import javax.persistence.JoinColumn;
26 import javax.persistence.OneToOne;
27 import javax.persistence.Table;
28
29 import org.hibernate.annotations.Type;
30 import org.kuali.rice.kns.util.KNSPropertyConstants;
31
32
33
34
35 @Entity
36 @Table(name="KRNS_CAMPUS_T")
37 public class CampusImpl extends PersistableBusinessObjectBase implements Campus, Inactivateable {
38
39 private static final long serialVersionUID = 787567094298971223L;
40 @Id
41 @Column(name="CAMPUS_CD")
42 private String campusCode;
43 @Column(name="CAMPUS_NM")
44 private String campusName;
45 @Column(name="CAMPUS_SHRT_NM")
46 private String campusShortName;
47 @Column(name="CAMPUS_TYP_CD")
48 private String campusTypeCode;
49 @Type(type="yes_no")
50 @Column(name="ACTV_IND")
51 protected boolean active;
52
53 @OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST})
54 @JoinColumn(name="CAMPUS_TYP_CD", insertable=false, updatable=false)
55 private CampusType campusType;
56
57
58
59
60 public CampusImpl() {
61
62 }
63
64
65
66
67
68
69 public String getCampusCode() {
70 return campusCode;
71 }
72
73
74
75
76
77
78
79 public void setCampusCode(String campusCode) {
80 this.campusCode = campusCode;
81 }
82
83
84
85
86
87
88 public String getCampusName() {
89 return campusName;
90 }
91
92
93
94
95
96
97
98 public void setCampusName(String campusName) {
99 this.campusName = campusName;
100 }
101
102
103
104
105
106
107 public String getCampusShortName() {
108 return campusShortName;
109 }
110
111
112
113
114
115
116
117 public void setCampusShortName(String campusShortName) {
118 this.campusShortName = campusShortName;
119 }
120
121
122
123
124
125
126 public String getCampusTypeCode() {
127 return campusTypeCode;
128 }
129
130
131
132
133
134
135
136 public void setCampusTypeCode(String campusTypeCode) {
137 this.campusTypeCode = campusTypeCode;
138 }
139
140
141
142
143
144
145 public CampusType getCampusType() {
146 return campusType;
147 }
148
149
150
151
152
153
154 public void setCampusType(CampusType campusType) {
155 this.campusType = campusType;
156 }
157
158
159
160
161
162
163 public boolean isActive() {
164 return this.active;
165 }
166
167
168
169
170 public void setActive(boolean active) {
171 this.active = active;
172 }
173
174
175
176
177 protected LinkedHashMap toStringMapper() {
178 LinkedHashMap m = new LinkedHashMap();
179 m.put(KNSPropertyConstants.CAMPUS_CODE, this.campusCode);
180 return m;
181 }
182
183 }
184