Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AwardBase |
|
| 1.0;1 |
1 | // Do not edit this file! It was generated by Melati POEM's DSD preprocessor. | |
2 | ||
3 | package org.paneris.jammyjoes.model.generated; | |
4 | ||
5 | ||
6 | import org.melati.poem.AccessPoemException; | |
7 | import org.melati.poem.Column; | |
8 | import org.melati.poem.Field; | |
9 | import org.melati.poem.JdbcPersistent; | |
10 | import org.melati.poem.ValidationPoemException; | |
11 | import org.paneris.jammyjoes.model.AwardTable; | |
12 | import org.paneris.jammyjoes.model.JammyjoesDatabaseTables; | |
13 | ||
14 | ||
15 | /** | |
16 | * Melati POEM generated abstract base class for a <code>Persistent</code> | |
17 | * <code>Award</code> Object. | |
18 | * | |
19 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
20 | */ | |
21 | 0 | public abstract class AwardBase extends JdbcPersistent { |
22 | ||
23 | ||
24 | /** | |
25 | * Retrieves the Database object. | |
26 | * | |
27 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
28 | * @return the database | |
29 | */ | |
30 | public JammyjoesDatabaseTables getJammyjoesDatabaseTables() { | |
31 | 0 | return (JammyjoesDatabaseTables)getDatabase(); |
32 | } | |
33 | ||
34 | ||
35 | /** | |
36 | * Retrieves the <code>AwardTable</code> table | |
37 | * which this <code>Persistent</code> is from. | |
38 | * | |
39 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
40 | * @return the AwardTable | |
41 | */ | |
42 | public AwardTable getAwardTable() { | |
43 | 0 | return (AwardTable)getTable(); |
44 | } | |
45 | ||
46 | private AwardTable _getAwardTable() { | |
47 | 0 | return (AwardTable)getTable(); |
48 | } | |
49 | ||
50 | // Fields in this table | |
51 | /** | |
52 | * id | |
53 | */ | |
54 | protected Integer id; | |
55 | /** | |
56 | * Title | |
57 | */ | |
58 | protected String title; | |
59 | /** | |
60 | * Picture | |
61 | */ | |
62 | protected String picture; | |
63 | /** | |
64 | * Description | |
65 | */ | |
66 | protected String description; | |
67 | ||
68 | ||
69 | /** | |
70 | * Retrieves the <code>Id</code> value, without locking, | |
71 | * for this <code>Award</code> <code>Persistent</code>. | |
72 | * | |
73 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
74 | * @return the Integer id | |
75 | */ | |
76 | public Integer getId_unsafe() { | |
77 | 0 | return id; |
78 | } | |
79 | ||
80 | ||
81 | /** | |
82 | * Sets the <code>Id</code> value directly, without checking, | |
83 | * for this Award <code>Persistent</code>. | |
84 | * | |
85 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
86 | * @param cooked the pre-validated value to set | |
87 | */ | |
88 | public void setId_unsafe(Integer cooked) { | |
89 | 0 | id = cooked; |
90 | 0 | } |
91 | ||
92 | /** | |
93 | * Retrieves the Id value, with locking, for this | |
94 | * <code>Award</code> <code>Persistent</code>. | |
95 | * | |
96 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
97 | * @throws AccessPoemException | |
98 | * if the current <code>AccessToken</code> | |
99 | * does not confer write access rights | |
100 | * @return the value of the field <code>Id</code> for this | |
101 | * <code>Award</code> <code>Persistent</code> | |
102 | */ | |
103 | ||
104 | public Integer getId() | |
105 | throws AccessPoemException { | |
106 | 0 | readLock(); |
107 | 0 | return getId_unsafe(); |
108 | } | |
109 | ||
110 | ||
111 | /** | |
112 | * Sets the <code>Id</code> value, with checking, for this | |
113 | * <code>Award</code> <code>Persistent</code>. | |
114 | * | |
115 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
116 | * @param cooked a validated <code>int</code> | |
117 | * @throws AccessPoemException | |
118 | * if the current <code>AccessToken</code> | |
119 | * does not confer write access rights | |
120 | * @throws ValidationPoemException | |
121 | * if the value is not valid | |
122 | */ | |
123 | public void setId(Integer cooked) | |
124 | throws AccessPoemException, ValidationPoemException { | |
125 | 0 | _getAwardTable().getIdColumn(). |
126 | getType().assertValidCooked(cooked); | |
127 | 0 | writeLock(); |
128 | 0 | setId_unsafe(cooked); |
129 | 0 | } |
130 | ||
131 | /** | |
132 | * Sets the <code>Id</code> value, with checking, for this | |
133 | * <code>Award</code> <code>Persistent</code>. | |
134 | * | |
135 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
136 | * @param cooked a validated <code>int</code> | |
137 | * @throws AccessPoemException | |
138 | * if the current <code>AccessToken</code> | |
139 | * does not confer write access rights | |
140 | * @throws ValidationPoemException | |
141 | * if the value is not valid | |
142 | */ | |
143 | ||
144 | public final void setId(int cooked) | |
145 | throws AccessPoemException, ValidationPoemException { | |
146 | 0 | setId(new Integer(cooked)); |
147 | 0 | } |
148 | ||
149 | ||
150 | /** | |
151 | * Retrieves the <code>Id</code> value as a <code>Field</code> | |
152 | * from this <code>Award</code> <code>Persistent</code>. | |
153 | * | |
154 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
155 | * @throws AccessPoemException | |
156 | * if the current <code>AccessToken</code> | |
157 | * does not confer write access rights | |
158 | * @return the Integer id | |
159 | */ | |
160 | public Field getIdField() throws AccessPoemException { | |
161 | 0 | Column c = _getAwardTable().getIdColumn(); |
162 | 0 | return new Field(c.getRaw(this), c); |
163 | } | |
164 | ||
165 | ||
166 | /** | |
167 | * Retrieves the <code>Title</code> value, without locking, | |
168 | * for this <code>Award</code> <code>Persistent</code>. | |
169 | * | |
170 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
171 | * @return the String title | |
172 | */ | |
173 | public String getTitle_unsafe() { | |
174 | 0 | return title; |
175 | } | |
176 | ||
177 | ||
178 | /** | |
179 | * Sets the <code>Title</code> value directly, without checking, | |
180 | * for this Award <code>Persistent</code>. | |
181 | * | |
182 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
183 | * @param cooked the pre-validated value to set | |
184 | */ | |
185 | public void setTitle_unsafe(String cooked) { | |
186 | 0 | title = cooked; |
187 | 0 | } |
188 | ||
189 | /** | |
190 | * Retrieves the Title value, with locking, for this | |
191 | * <code>Award</code> <code>Persistent</code>. | |
192 | * | |
193 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
194 | * @throws AccessPoemException | |
195 | * if the current <code>AccessToken</code> | |
196 | * does not confer write access rights | |
197 | * @return the value of the field <code>Title</code> for this | |
198 | * <code>Award</code> <code>Persistent</code> | |
199 | */ | |
200 | ||
201 | public String getTitle() | |
202 | throws AccessPoemException { | |
203 | 0 | readLock(); |
204 | 0 | return getTitle_unsafe(); |
205 | } | |
206 | ||
207 | ||
208 | /** | |
209 | * Sets the <code>Title</code> value, with checking, for this | |
210 | * <code>Award</code> <code>Persistent</code>. | |
211 | * | |
212 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
213 | * @param cooked a validated <code>int</code> | |
214 | * @throws AccessPoemException | |
215 | * if the current <code>AccessToken</code> | |
216 | * does not confer write access rights | |
217 | * @throws ValidationPoemException | |
218 | * if the value is not valid | |
219 | */ | |
220 | public void setTitle(String cooked) | |
221 | throws AccessPoemException, ValidationPoemException { | |
222 | 0 | _getAwardTable().getTitleColumn(). |
223 | getType().assertValidCooked(cooked); | |
224 | 0 | writeLock(); |
225 | 0 | setTitle_unsafe(cooked); |
226 | 0 | } |
227 | ||
228 | ||
229 | /** | |
230 | * Retrieves the <code>Title</code> value as a <code>Field</code> | |
231 | * from this <code>Award</code> <code>Persistent</code>. | |
232 | * | |
233 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
234 | * @throws AccessPoemException | |
235 | * if the current <code>AccessToken</code> | |
236 | * does not confer write access rights | |
237 | * @return the String title | |
238 | */ | |
239 | public Field getTitleField() throws AccessPoemException { | |
240 | 0 | Column c = _getAwardTable().getTitleColumn(); |
241 | 0 | return new Field(c.getRaw(this), c); |
242 | } | |
243 | ||
244 | ||
245 | /** | |
246 | * Retrieves the <code>Picture</code> value, without locking, | |
247 | * for this <code>Award</code> <code>Persistent</code>. | |
248 | * | |
249 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
250 | * @return the String picture | |
251 | */ | |
252 | public String getPicture_unsafe() { | |
253 | 0 | return picture; |
254 | } | |
255 | ||
256 | ||
257 | /** | |
258 | * Sets the <code>Picture</code> value directly, without checking, | |
259 | * for this Award <code>Persistent</code>. | |
260 | * | |
261 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
262 | * @param cooked the pre-validated value to set | |
263 | */ | |
264 | public void setPicture_unsafe(String cooked) { | |
265 | 0 | picture = cooked; |
266 | 0 | } |
267 | ||
268 | /** | |
269 | * Retrieves the Picture value, with locking, for this | |
270 | * <code>Award</code> <code>Persistent</code>. | |
271 | * | |
272 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
273 | * @throws AccessPoemException | |
274 | * if the current <code>AccessToken</code> | |
275 | * does not confer write access rights | |
276 | * @return the value of the field <code>Picture</code> for this | |
277 | * <code>Award</code> <code>Persistent</code> | |
278 | */ | |
279 | ||
280 | public String getPicture() | |
281 | throws AccessPoemException { | |
282 | 0 | readLock(); |
283 | 0 | return getPicture_unsafe(); |
284 | } | |
285 | ||
286 | ||
287 | /** | |
288 | * Sets the <code>Picture</code> value, with checking, for this | |
289 | * <code>Award</code> <code>Persistent</code>. | |
290 | * | |
291 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
292 | * @param cooked a validated <code>int</code> | |
293 | * @throws AccessPoemException | |
294 | * if the current <code>AccessToken</code> | |
295 | * does not confer write access rights | |
296 | * @throws ValidationPoemException | |
297 | * if the value is not valid | |
298 | */ | |
299 | public void setPicture(String cooked) | |
300 | throws AccessPoemException, ValidationPoemException { | |
301 | 0 | _getAwardTable().getPictureColumn(). |
302 | getType().assertValidCooked(cooked); | |
303 | 0 | writeLock(); |
304 | 0 | setPicture_unsafe(cooked); |
305 | 0 | } |
306 | ||
307 | ||
308 | /** | |
309 | * Retrieves the <code>Picture</code> value as a <code>Field</code> | |
310 | * from this <code>Award</code> <code>Persistent</code>. | |
311 | * | |
312 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
313 | * @throws AccessPoemException | |
314 | * if the current <code>AccessToken</code> | |
315 | * does not confer write access rights | |
316 | * @return the String picture | |
317 | */ | |
318 | public Field getPictureField() throws AccessPoemException { | |
319 | 0 | Column c = _getAwardTable().getPictureColumn(); |
320 | 0 | return new Field(c.getRaw(this), c); |
321 | } | |
322 | ||
323 | ||
324 | /** | |
325 | * Retrieves the <code>Description</code> value, without locking, | |
326 | * for this <code>Award</code> <code>Persistent</code>. | |
327 | * | |
328 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
329 | * @return the String description | |
330 | */ | |
331 | public String getDescription_unsafe() { | |
332 | 0 | return description; |
333 | } | |
334 | ||
335 | ||
336 | /** | |
337 | * Sets the <code>Description</code> value directly, without checking, | |
338 | * for this Award <code>Persistent</code>. | |
339 | * | |
340 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
341 | * @param cooked the pre-validated value to set | |
342 | */ | |
343 | public void setDescription_unsafe(String cooked) { | |
344 | 0 | description = cooked; |
345 | 0 | } |
346 | ||
347 | /** | |
348 | * Retrieves the Description value, with locking, for this | |
349 | * <code>Award</code> <code>Persistent</code>. | |
350 | * | |
351 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
352 | * @throws AccessPoemException | |
353 | * if the current <code>AccessToken</code> | |
354 | * does not confer write access rights | |
355 | * @return the value of the field <code>Description</code> for this | |
356 | * <code>Award</code> <code>Persistent</code> | |
357 | */ | |
358 | ||
359 | public String getDescription() | |
360 | throws AccessPoemException { | |
361 | 0 | readLock(); |
362 | 0 | return getDescription_unsafe(); |
363 | } | |
364 | ||
365 | ||
366 | /** | |
367 | * Sets the <code>Description</code> value, with checking, for this | |
368 | * <code>Award</code> <code>Persistent</code>. | |
369 | * | |
370 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
371 | * @param cooked a validated <code>int</code> | |
372 | * @throws AccessPoemException | |
373 | * if the current <code>AccessToken</code> | |
374 | * does not confer write access rights | |
375 | * @throws ValidationPoemException | |
376 | * if the value is not valid | |
377 | */ | |
378 | public void setDescription(String cooked) | |
379 | throws AccessPoemException, ValidationPoemException { | |
380 | 0 | _getAwardTable().getDescriptionColumn(). |
381 | getType().assertValidCooked(cooked); | |
382 | 0 | writeLock(); |
383 | 0 | setDescription_unsafe(cooked); |
384 | 0 | } |
385 | ||
386 | ||
387 | /** | |
388 | * Retrieves the <code>Description</code> value as a <code>Field</code> | |
389 | * from this <code>Award</code> <code>Persistent</code>. | |
390 | * | |
391 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
392 | * @throws AccessPoemException | |
393 | * if the current <code>AccessToken</code> | |
394 | * does not confer write access rights | |
395 | * @return the String description | |
396 | */ | |
397 | public Field getDescriptionField() throws AccessPoemException { | |
398 | 0 | Column c = _getAwardTable().getDescriptionColumn(); |
399 | 0 | return new Field(c.getRaw(this), c); |
400 | } | |
401 | } | |
402 |