Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
NotificationContentType |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.ken.bo; | |
17 | ||
18 | import org.hibernate.annotations.GenericGenerator; | |
19 | import org.hibernate.annotations.Parameter; | |
20 | import org.hibernate.annotations.Type; | |
21 | import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; | |
22 | ||
23 | import javax.persistence.*; | |
24 | ||
25 | /** | |
26 | * This class represents the different types of Notification content that the system can handle. | |
27 | * For example, and instance of content type could be "Alert" or "Event". | |
28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
29 | */ | |
30 | @Entity | |
31 | @Table(name="KREN_CNTNT_TYP_T") | |
32 | public class NotificationContentType extends PersistableBusinessObjectBase{ | |
33 | @Id | |
34 | @GeneratedValue(generator="KREN_CNTNT_TYP_S") | |
35 | @GenericGenerator(name="KREN_CNTNT_TYP_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={ | |
36 | @Parameter(name="sequence_name",value="KREN_CNTNT_TYP_S"), | |
37 | @Parameter(name="value_column",value="id") | |
38 | }) | |
39 | @Column(name="CNTNT_TYP_ID") | |
40 | private Long id; | |
41 | @Column(name="NM", nullable=false) | |
42 | private String name; | |
43 | 0 | @Type(type="true_false") |
44 | private boolean current = true; | |
45 | 0 | @Column(name="CNTNT_TYP_VER_NBR", nullable=false) |
46 | private Integer version = Integer.valueOf(0); | |
47 | @Column(name="DESC_TXT", nullable=false) | |
48 | private String description; | |
49 | @Column(name="NMSPC_CD", nullable=false) | |
50 | private String namespace; | |
51 | @Column(name="XSD", nullable=false, length=4096) | |
52 | private String xsd; | |
53 | @Column(name="XSL", nullable=false, length=4096) | |
54 | private String xsl; | |
55 | ||
56 | /** | |
57 | * Constructs a NotificationContentType instance. | |
58 | */ | |
59 | 0 | public NotificationContentType() { |
60 | 0 | } |
61 | ||
62 | /** | |
63 | * Gets the description attribute. | |
64 | * @return Returns the description. | |
65 | */ | |
66 | public String getDescription() { | |
67 | 0 | return description; |
68 | } | |
69 | ||
70 | /** | |
71 | * Sets the description attribute value. | |
72 | * @param description The description to set. | |
73 | */ | |
74 | public void setDescription(String description) { | |
75 | 0 | this.description = description; |
76 | 0 | } |
77 | ||
78 | /** | |
79 | * Gets the id attribute. | |
80 | * @return Returns the id. | |
81 | */ | |
82 | public Long getId() { | |
83 | 0 | return id; |
84 | } | |
85 | ||
86 | /** | |
87 | * Sets the id attribute value. | |
88 | * @param id The id to set. | |
89 | */ | |
90 | public void setId(Long id) { | |
91 | 0 | this.id = id; |
92 | 0 | } |
93 | ||
94 | /** | |
95 | * Gets the name attribute. | |
96 | * @return Returns the name. | |
97 | */ | |
98 | public String getName() { | |
99 | 0 | return name; |
100 | } | |
101 | ||
102 | /** | |
103 | * @return whether this is the current version | |
104 | */ | |
105 | public boolean isCurrent() { | |
106 | 0 | return this.current; |
107 | } | |
108 | ||
109 | /** | |
110 | * @param current whether this is the current version | |
111 | */ | |
112 | public void setCurrent(boolean current) { | |
113 | 0 | this.current = current; |
114 | 0 | } |
115 | ||
116 | /** | |
117 | * @return the version | |
118 | */ | |
119 | public Integer getVersion() { | |
120 | 0 | return this.version; |
121 | } | |
122 | ||
123 | /** | |
124 | * @param version the version to set | |
125 | */ | |
126 | public void setVersion(Integer version) { | |
127 | 0 | this.version = version; |
128 | 0 | } |
129 | ||
130 | /** | |
131 | * Sets the name attribute value. | |
132 | * @param name The name to set. | |
133 | */ | |
134 | public void setName(String name) { | |
135 | 0 | this.name = name; |
136 | 0 | } |
137 | ||
138 | /** | |
139 | * Gets the namespace attribute. | |
140 | * @return Returns the namespace. | |
141 | */ | |
142 | public String getNamespace() { | |
143 | 0 | return namespace; |
144 | } | |
145 | ||
146 | /** | |
147 | * Sets the namespace attribute value. | |
148 | * @param namespace The namespace to set. | |
149 | */ | |
150 | public void setNamespace(String namespace) { | |
151 | 0 | this.namespace = namespace; |
152 | 0 | } |
153 | ||
154 | /** | |
155 | * Gets the xsd attribute. The value of this field is used to validate a notification's content field dynamically. | |
156 | * @return Returns the xsd. | |
157 | */ | |
158 | public String getXsd() { | |
159 | 0 | return xsd; |
160 | } | |
161 | ||
162 | /** | |
163 | * Sets the xsd attribute value. The value of this field is used to validate a notification's content field dynamically. | |
164 | * @param xsd The xsd to set. | |
165 | */ | |
166 | public void setXsd(String xsd) { | |
167 | 0 | this.xsd = xsd; |
168 | 0 | } |
169 | ||
170 | /** | |
171 | * Gets the xsl attribute. The value of this field is used to render a notification's contents dynamically. | |
172 | * @return Returns the xsl. | |
173 | */ | |
174 | public String getXsl() { | |
175 | 0 | return xsl; |
176 | } | |
177 | ||
178 | /** | |
179 | * Sets the xsl attribute value. The value of this field is used to render a notification's contents dynamically. | |
180 | * @param xsl The xsl to set. | |
181 | */ | |
182 | public void setXsl(String xsl) { | |
183 | 0 | this.xsl = xsl; |
184 | 0 | } |
185 | } |