1 // Do not edit this file! It was generated by Melati POEM's DSD preprocessor.
2
3 package org.melati.admin.test.generated;
4
5
6 import java.sql.Date;
7 import java.sql.Timestamp;
8 import org.melati.admin.test.AdminTestDatabaseTables;
9 import org.melati.admin.test.UploadedFile;
10 import org.melati.admin.test.UploadedFileTable;
11 import org.melati.poem.AccessPoemException;
12 import org.melati.poem.Column;
13 import org.melati.poem.Field;
14 import org.melati.poem.JdbcPersistent;
15 import org.melati.poem.ValidationPoemException;
16
17
18 /**
19 * Melati POEM generated abstract base class for a <code>Persistent</code>
20 * <code>UploadedFile</code> Object.
21 *
22 * See org.melati.poem.prepro.TableDef#generatePersistentBaseJava
23 */
24 public abstract class UploadedFileBase extends JdbcPersistent {
25
26
27 /**
28 * Retrieves the Database object.
29 *
30 * See org.melati.poem.prepro.TableDef#generatePersistentBaseJava
31 * @return the database
32 */
33 public AdminTestDatabaseTables getAdminTestDatabaseTables() {
34 return (AdminTestDatabaseTables)getDatabase();
35 }
36
37
38 /**
39 * Retrieves the <code>UploadedFileTable</code> table
40 * which this <code>Persistent</code> is from.
41 *
42 * See org.melati.poem.prepro.TableDef#generatePersistentBaseJava
43 * @return the UploadedFileTable
44 */
45 @SuppressWarnings("unchecked")
46 public UploadedFileTable<UploadedFile> getUploadedFileTable() {
47 return (UploadedFileTable<UploadedFile>)getTable();
48 }
49
50 @SuppressWarnings("unchecked")
51 private UploadedFileTable<UploadedFile> _getUploadedFileTable() {
52 return (UploadedFileTable<UploadedFile>)getTable();
53 }
54
55 // Fields in this table
56 /**
57 * id
58 */
59 protected Integer id;
60 /**
61 * filename - The path name of the file, relative to the server root
62 */
63 protected String filename;
64 /**
65 * Date Field
66 */
67 protected Date datefield;
68 /**
69 * Date Field
70 */
71 protected Date datefielddropdown;
72 /**
73 * Date Field
74 */
75 protected Date datefieldmydropdown;
76 /**
77 * Timestamp Field
78 */
79 protected Timestamp timestampfield;
80
81
82 /**
83 * Retrieves the <code>Id</code> value, without locking,
84 * for this <code>UploadedFile</code> <code>Persistent</code>.
85 *
86 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
87 * @return the Integer id
88 */
89 public Integer getId_unsafe() {
90 return id;
91 }
92
93
94 /**
95 * Sets the <code>Id</code> value directly, without checking,
96 * for this UploadedFile <code>Persistent</code>.
97 *
98 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
99 * @param cooked the pre-validated value to set
100 */
101 public void setId_unsafe(Integer cooked) {
102 id = cooked;
103 }
104
105 /**
106 * Retrieves the Id value, with locking, for this
107 * <code>UploadedFile</code> <code>Persistent</code>.
108 *
109 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
110 * @throws AccessPoemException
111 * if the current <code>AccessToken</code>
112 * does not confer write access rights
113 * @return the value of the field <code>Id</code> for this
114 * <code>UploadedFile</code> <code>Persistent</code>
115 */
116
117 public Integer getId()
118 throws AccessPoemException {
119 readLock();
120 return getId_unsafe();
121 }
122
123
124 /**
125 * Sets the <code>Id</code> value, with checking, for this
126 * <code>UploadedFile</code> <code>Persistent</code>.
127 *
128 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
129 * @param cooked a validated <code>int</code>
130 * @throws AccessPoemException
131 * if the current <code>AccessToken</code>
132 * does not confer write access rights
133 * @throws ValidationPoemException
134 * if the value is not valid
135 */
136 public void setId(Integer cooked)
137 throws AccessPoemException, ValidationPoemException {
138 _getUploadedFileTable().getIdColumn().
139 getType().assertValidCooked(cooked);
140 writeLock();
141 setId_unsafe(cooked);
142 }
143
144 /**
145 * Sets the <code>Id</code> value, with checking, for this
146 * <code>UploadedFile</code> <code>Persistent</code>.
147 *
148 * Generated by org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods
149 * @param cooked a validated <code>int</code>
150 * @throws AccessPoemException
151 * if the current <code>AccessToken</code>
152 * does not confer write access rights
153 * @throws ValidationPoemException
154 * if the value is not valid
155 */
156
157 public final void setId(int cooked)
158 throws AccessPoemException, ValidationPoemException {
159 setId(new Integer(cooked));
160 }
161
162
163 /**
164 * Retrieves the <code>Id</code> value as a <code>Field</code>
165 * from this <code>UploadedFile</code> <code>Persistent</code>.
166 *
167 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
168 * @throws AccessPoemException
169 * if the current <code>AccessToken</code>
170 * does not confer write access rights
171 * @return the Integer id
172 */
173 public Field<Integer> getIdField() throws AccessPoemException {
174 Column<Integer> c = _getUploadedFileTable().getIdColumn();
175 return new Field<Integer>((Integer)c.getRaw(this), c);
176 }
177
178
179 /**
180 * Retrieves the <code>Filename</code> value, without locking,
181 * for this <code>UploadedFile</code> <code>Persistent</code>.
182 *
183 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
184 * @return the String filename
185 */
186 public String getFilename_unsafe() {
187 return filename;
188 }
189
190
191 /**
192 * Sets the <code>Filename</code> value directly, without checking,
193 * for this UploadedFile <code>Persistent</code>.
194 *
195 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
196 * @param cooked the pre-validated value to set
197 */
198 public void setFilename_unsafe(String cooked) {
199 filename = cooked;
200 }
201
202 /**
203 * Retrieves the Filename value, with locking, for this
204 * <code>UploadedFile</code> <code>Persistent</code>.
205 * Field description:
206 * The path name of the file, relative to the server root
207 *
208 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
209 * @throws AccessPoemException
210 * if the current <code>AccessToken</code>
211 * does not confer write access rights
212 * @return the value of the field <code>Filename</code> for this
213 * <code>UploadedFile</code> <code>Persistent</code>
214 */
215
216 public String getFilename()
217 throws AccessPoemException {
218 readLock();
219 return getFilename_unsafe();
220 }
221
222
223 /**
224 * Sets the <code>Filename</code> value, with checking, for this
225 * <code>UploadedFile</code> <code>Persistent</code>.
226 * Field description:
227 * The path name of the file, relative to the server root
228 *
229 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
230 * @param cooked a validated <code>int</code>
231 * @throws AccessPoemException
232 * if the current <code>AccessToken</code>
233 * does not confer write access rights
234 * @throws ValidationPoemException
235 * if the value is not valid
236 */
237 public void setFilename(String cooked)
238 throws AccessPoemException, ValidationPoemException {
239 _getUploadedFileTable().getFilenameColumn().
240 getType().assertValidCooked(cooked);
241 writeLock();
242 setFilename_unsafe(cooked);
243 }
244
245
246 /**
247 * Retrieves the <code>Filename</code> value as a <code>Field</code>
248 * from this <code>UploadedFile</code> <code>Persistent</code>.
249 *
250 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
251 * @throws AccessPoemException
252 * if the current <code>AccessToken</code>
253 * does not confer write access rights
254 * @return the String filename
255 */
256 public Field<String> getFilenameField() throws AccessPoemException {
257 Column<String> c = _getUploadedFileTable().getFilenameColumn();
258 return new Field<String>((String)c.getRaw(this), c);
259 }
260
261
262 /**
263 * Retrieves the <code>Datefield</code> value, without locking,
264 * for this <code>UploadedFile</code> <code>Persistent</code>.
265 *
266 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
267 * @return the Date datefield
268 */
269 public Date getDatefield_unsafe() {
270 return datefield;
271 }
272
273
274 /**
275 * Sets the <code>Datefield</code> value directly, without checking,
276 * for this UploadedFile <code>Persistent</code>.
277 *
278 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
279 * @param cooked the pre-validated value to set
280 */
281 public void setDatefield_unsafe(Date cooked) {
282 datefield = cooked;
283 }
284
285 /**
286 * Retrieves the Datefield value, with locking, for this
287 * <code>UploadedFile</code> <code>Persistent</code>.
288 *
289 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
290 * @throws AccessPoemException
291 * if the current <code>AccessToken</code>
292 * does not confer write access rights
293 * @return the value of the field <code>Datefield</code> for this
294 * <code>UploadedFile</code> <code>Persistent</code>
295 */
296
297 public Date getDatefield()
298 throws AccessPoemException {
299 readLock();
300 return getDatefield_unsafe();
301 }
302
303
304 /**
305 * Sets the <code>Datefield</code> value, with checking, for this
306 * <code>UploadedFile</code> <code>Persistent</code>.
307 *
308 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
309 * @param cooked a validated <code>int</code>
310 * @throws AccessPoemException
311 * if the current <code>AccessToken</code>
312 * does not confer write access rights
313 * @throws ValidationPoemException
314 * if the value is not valid
315 */
316 public void setDatefield(Date cooked)
317 throws AccessPoemException, ValidationPoemException {
318 _getUploadedFileTable().getDatefieldColumn().
319 getType().assertValidCooked(cooked);
320 writeLock();
321 setDatefield_unsafe(cooked);
322 }
323
324
325 /**
326 * Retrieves the <code>Datefield</code> value as a <code>Field</code>
327 * from this <code>UploadedFile</code> <code>Persistent</code>.
328 *
329 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
330 * @throws AccessPoemException
331 * if the current <code>AccessToken</code>
332 * does not confer write access rights
333 * @return the Date datefield
334 */
335 public Field<Date> getDatefieldField() throws AccessPoemException {
336 Column<Date> c = _getUploadedFileTable().getDatefieldColumn();
337 return new Field<Date>((Date)c.getRaw(this), c);
338 }
339
340
341 /**
342 * Retrieves the <code>Datefielddropdown</code> value, without locking,
343 * for this <code>UploadedFile</code> <code>Persistent</code>.
344 *
345 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
346 * @return the Date datefielddropdown
347 */
348 public Date getDatefielddropdown_unsafe() {
349 return datefielddropdown;
350 }
351
352
353 /**
354 * Sets the <code>Datefielddropdown</code> value directly, without checking,
355 * for this UploadedFile <code>Persistent</code>.
356 *
357 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
358 * @param cooked the pre-validated value to set
359 */
360 public void setDatefielddropdown_unsafe(Date cooked) {
361 datefielddropdown = cooked;
362 }
363
364 /**
365 * Retrieves the Datefielddropdown value, with locking, for this
366 * <code>UploadedFile</code> <code>Persistent</code>.
367 *
368 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
369 * @throws AccessPoemException
370 * if the current <code>AccessToken</code>
371 * does not confer write access rights
372 * @return the value of the field <code>Datefielddropdown</code> for this
373 * <code>UploadedFile</code> <code>Persistent</code>
374 */
375
376 public Date getDatefielddropdown()
377 throws AccessPoemException {
378 readLock();
379 return getDatefielddropdown_unsafe();
380 }
381
382
383 /**
384 * Sets the <code>Datefielddropdown</code> value, with checking, for this
385 * <code>UploadedFile</code> <code>Persistent</code>.
386 *
387 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
388 * @param cooked a validated <code>int</code>
389 * @throws AccessPoemException
390 * if the current <code>AccessToken</code>
391 * does not confer write access rights
392 * @throws ValidationPoemException
393 * if the value is not valid
394 */
395 public void setDatefielddropdown(Date cooked)
396 throws AccessPoemException, ValidationPoemException {
397 _getUploadedFileTable().getDatefielddropdownColumn().
398 getType().assertValidCooked(cooked);
399 writeLock();
400 setDatefielddropdown_unsafe(cooked);
401 }
402
403
404 /**
405 * Retrieves the <code>Datefielddropdown</code> value as a <code>Field</code>
406 * from this <code>UploadedFile</code> <code>Persistent</code>.
407 *
408 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
409 * @throws AccessPoemException
410 * if the current <code>AccessToken</code>
411 * does not confer write access rights
412 * @return the Date datefielddropdown
413 */
414 public Field<Date> getDatefielddropdownField() throws AccessPoemException {
415 Column<Date> c = _getUploadedFileTable().getDatefielddropdownColumn();
416 return new Field<Date>((Date)c.getRaw(this), c);
417 }
418
419
420 /**
421 * Retrieves the <code>Datefieldmydropdown</code> value, without locking,
422 * for this <code>UploadedFile</code> <code>Persistent</code>.
423 *
424 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
425 * @return the Date datefieldmydropdown
426 */
427 public Date getDatefieldmydropdown_unsafe() {
428 return datefieldmydropdown;
429 }
430
431
432 /**
433 * Sets the <code>Datefieldmydropdown</code> value directly, without checking,
434 * for this UploadedFile <code>Persistent</code>.
435 *
436 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
437 * @param cooked the pre-validated value to set
438 */
439 public void setDatefieldmydropdown_unsafe(Date cooked) {
440 datefieldmydropdown = cooked;
441 }
442
443 /**
444 * Retrieves the Datefieldmydropdown value, with locking, for this
445 * <code>UploadedFile</code> <code>Persistent</code>.
446 *
447 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
448 * @throws AccessPoemException
449 * if the current <code>AccessToken</code>
450 * does not confer write access rights
451 * @return the value of the field <code>Datefieldmydropdown</code> for this
452 * <code>UploadedFile</code> <code>Persistent</code>
453 */
454
455 public Date getDatefieldmydropdown()
456 throws AccessPoemException {
457 readLock();
458 return getDatefieldmydropdown_unsafe();
459 }
460
461
462 /**
463 * Sets the <code>Datefieldmydropdown</code> value, with checking, for this
464 * <code>UploadedFile</code> <code>Persistent</code>.
465 *
466 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
467 * @param cooked a validated <code>int</code>
468 * @throws AccessPoemException
469 * if the current <code>AccessToken</code>
470 * does not confer write access rights
471 * @throws ValidationPoemException
472 * if the value is not valid
473 */
474 public void setDatefieldmydropdown(Date cooked)
475 throws AccessPoemException, ValidationPoemException {
476 _getUploadedFileTable().getDatefieldmydropdownColumn().
477 getType().assertValidCooked(cooked);
478 writeLock();
479 setDatefieldmydropdown_unsafe(cooked);
480 }
481
482
483 /**
484 * Retrieves the <code>Datefieldmydropdown</code> value as a <code>Field</code>
485 * from this <code>UploadedFile</code> <code>Persistent</code>.
486 *
487 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
488 * @throws AccessPoemException
489 * if the current <code>AccessToken</code>
490 * does not confer write access rights
491 * @return the Date datefieldmydropdown
492 */
493 public Field<Date> getDatefieldmydropdownField() throws AccessPoemException {
494 Column<Date> c = _getUploadedFileTable().getDatefieldmydropdownColumn();
495 return new Field<Date>((Date)c.getRaw(this), c);
496 }
497
498
499 /**
500 * Retrieves the <code>Timestampfield</code> value, without locking,
501 * for this <code>UploadedFile</code> <code>Persistent</code>.
502 *
503 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
504 * @return the Timestamp timestampfield
505 */
506 public Timestamp getTimestampfield_unsafe() {
507 return timestampfield;
508 }
509
510
511 /**
512 * Sets the <code>Timestampfield</code> value directly, without checking,
513 * for this UploadedFile <code>Persistent</code>.
514 *
515 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
516 * @param cooked the pre-validated value to set
517 */
518 public void setTimestampfield_unsafe(Timestamp cooked) {
519 timestampfield = cooked;
520 }
521
522 /**
523 * Retrieves the Timestampfield value, with locking, for this
524 * <code>UploadedFile</code> <code>Persistent</code>.
525 *
526 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
527 * @throws AccessPoemException
528 * if the current <code>AccessToken</code>
529 * does not confer write access rights
530 * @return the value of the field <code>Timestampfield</code> for this
531 * <code>UploadedFile</code> <code>Persistent</code>
532 */
533
534 public Timestamp getTimestampfield()
535 throws AccessPoemException {
536 readLock();
537 return getTimestampfield_unsafe();
538 }
539
540
541 /**
542 * Sets the <code>Timestampfield</code> value, with checking, for this
543 * <code>UploadedFile</code> <code>Persistent</code>.
544 *
545 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
546 * @param cooked a validated <code>int</code>
547 * @throws AccessPoemException
548 * if the current <code>AccessToken</code>
549 * does not confer write access rights
550 * @throws ValidationPoemException
551 * if the value is not valid
552 */
553 public void setTimestampfield(Timestamp cooked)
554 throws AccessPoemException, ValidationPoemException {
555 _getUploadedFileTable().getTimestampfieldColumn().
556 getType().assertValidCooked(cooked);
557 writeLock();
558 setTimestampfield_unsafe(cooked);
559 }
560
561
562 /**
563 * Retrieves the <code>Timestampfield</code> value as a <code>Field</code>
564 * from this <code>UploadedFile</code> <code>Persistent</code>.
565 *
566 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
567 * @throws AccessPoemException
568 * if the current <code>AccessToken</code>
569 * does not confer write access rights
570 * @return the Timestamp timestampfield
571 */
572 public Field<Timestamp> getTimestampfieldField() throws AccessPoemException {
573 Column<Timestamp> c = _getUploadedFileTable().getTimestampfieldColumn();
574 return new Field<Timestamp>((Timestamp)c.getRaw(this), c);
575 }
576
577 }
578