1
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.AdminTestTable;
10 import org.melati.admin.test.UploadedFile;
11 import org.melati.poem.AccessPoemException;
12 import org.melati.poem.Column;
13 import org.melati.poem.Database;
14 import org.melati.poem.DatePoemType;
15 import org.melati.poem.DefinitionSource;
16 import org.melati.poem.DisplayLevel;
17 import org.melati.poem.Field;
18 import org.melati.poem.JdbcPersistent;
19 import org.melati.poem.Persistent;
20 import org.melati.poem.PoemException;
21 import org.melati.poem.Searchability;
22 import org.melati.poem.StringPoemType;
23 import org.melati.poem.TimestampPoemType;
24 import org.melati.poem.TroidPoemType;
25 import org.melati.poem.ValidationPoemException;
26
27
28
29
30
31
32
33
34 public class UploadedFileTableBase<T extends UploadedFile> extends AdminTestTable<T> {
35
36 private Column<Integer> col_id = null;
37 private Column<String> col_filename = null;
38 private Column<Date> col_datefield = null;
39 private Column<Date> col_datefielddropdown = null;
40 private Column<Date> col_datefieldmydropdown = null;
41 private Column<Timestamp> col_timestampfield = null;
42
43
44
45
46
47
48
49
50
51
52
53 public UploadedFileTableBase(
54 Database database, String name,
55 DefinitionSource definitionSource) throws PoemException {
56 super(database, name, definitionSource);
57 }
58
59
60
61
62
63
64
65
66 public AdminTestDatabaseTables getAdminTestDatabaseTables() {
67 return (AdminTestDatabaseTables)getDatabase();
68 }
69
70
71
72
73
74
75
76 public void init() throws PoemException {
77 super.init();
78 defineColumn(col_id =
79 new Column<Integer>(this, "id",
80 new TroidPoemType(),
81 DefinitionSource.dsd) {
82 public Object getCooked(Persistent g)
83 throws AccessPoemException, PoemException {
84 return ((UploadedFile)g).getId();
85 }
86
87 public void setCooked(Persistent g, Object cooked)
88 throws AccessPoemException, ValidationPoemException {
89 ((UploadedFile)g).setId((Integer)cooked);
90 }
91
92 public Field<Integer> asField(Persistent g) {
93 return ((UploadedFile)g).getIdField();
94 }
95
96 public boolean defaultUserEditable() {
97 return false;
98 }
99
100 public boolean defaultUserCreateable() {
101 return false;
102 }
103
104 public DisplayLevel defaultDisplayLevel() {
105 return DisplayLevel.summary;
106 }
107
108 public boolean defaultSortDescending() {
109 return true;
110 }
111
112 public int defaultDisplayOrder() {
113 return 0;
114 }
115
116 public Object getRaw_unsafe(Persistent g)
117 throws AccessPoemException {
118 return ((UploadedFile)g).getId_unsafe();
119 }
120
121 public void setRaw_unsafe(Persistent g, Object raw)
122 throws AccessPoemException {
123 ((UploadedFile)g).setId_unsafe((Integer)raw);
124 }
125
126 public Object getRaw(Persistent g)
127 throws AccessPoemException {
128 return ((UploadedFile)g).getId();
129 }
130
131 public void setRaw(Persistent g, Object raw)
132 throws AccessPoemException {
133 ((UploadedFile)g).setId((Integer)raw);
134 }
135 });
136
137 defineColumn(col_filename =
138 new Column<String>(this, "filename",
139 new StringPoemType(false, -1),
140 DefinitionSource.dsd) {
141 public Object getCooked(Persistent g)
142 throws AccessPoemException, PoemException {
143 return ((UploadedFile)g).getFilename();
144 }
145
146 public void setCooked(Persistent g, Object cooked)
147 throws AccessPoemException, ValidationPoemException {
148 ((UploadedFile)g).setFilename((String)cooked);
149 }
150
151 public Field<String> asField(Persistent g) {
152 return ((UploadedFile)g).getFilenameField();
153 }
154
155 public DisplayLevel defaultDisplayLevel() {
156 return DisplayLevel.primary;
157 }
158
159 public Searchability defaultSearchability() {
160 return Searchability.yes;
161 }
162
163 public Integer defaultDisplayOrderPriority() {
164 return new Integer(0);
165 }
166
167 public int defaultDisplayOrder() {
168 return 1;
169 }
170
171 public String defaultDescription() {
172 return "The path name of the file, relative to the server root";
173 }
174
175 public int defaultWidth() {
176 return 40;
177 }
178
179 public String defaultRenderinfo() {
180 return "UploadURL";
181 }
182
183 public Object getRaw_unsafe(Persistent g)
184 throws AccessPoemException {
185 return ((UploadedFile)g).getFilename_unsafe();
186 }
187
188 public void setRaw_unsafe(Persistent g, Object raw)
189 throws AccessPoemException {
190 ((UploadedFile)g).setFilename_unsafe((String)raw);
191 }
192
193 public Object getRaw(Persistent g)
194 throws AccessPoemException {
195 return ((UploadedFile)g).getFilename();
196 }
197
198 public void setRaw(Persistent g, Object raw)
199 throws AccessPoemException {
200 ((UploadedFile)g).setFilename((String)raw);
201 }
202 });
203
204 defineColumn(col_datefield =
205 new Column<Date>(this, "datefield",
206 new DatePoemType(true),
207 DefinitionSource.dsd) {
208 public Object getCooked(Persistent g)
209 throws AccessPoemException, PoemException {
210 return ((UploadedFile)g).getDatefield();
211 }
212
213 public void setCooked(Persistent g, Object cooked)
214 throws AccessPoemException, ValidationPoemException {
215 ((UploadedFile)g).setDatefield((Date)cooked);
216 }
217
218 public Field<Date> asField(Persistent g) {
219 return ((UploadedFile)g).getDatefieldField();
220 }
221
222 public DisplayLevel defaultDisplayLevel() {
223 return DisplayLevel.summary;
224 }
225
226 public Searchability defaultSearchability() {
227 return Searchability.yes;
228 }
229
230 public String defaultDisplayName() {
231 return "Date Field";
232 }
233
234 public int defaultDisplayOrder() {
235 return 5;
236 }
237
238 public int defaultWidth() {
239 return 20;
240 }
241
242 public int defaultHeight() {
243 return 1;
244 }
245
246 public Object getRaw_unsafe(Persistent g)
247 throws AccessPoemException {
248 return ((UploadedFile)g).getDatefield_unsafe();
249 }
250
251 public void setRaw_unsafe(Persistent g, Object raw)
252 throws AccessPoemException {
253 ((UploadedFile)g).setDatefield_unsafe((Date)raw);
254 }
255
256 public Object getRaw(Persistent g)
257 throws AccessPoemException {
258 return ((UploadedFile)g).getDatefield();
259 }
260
261 public void setRaw(Persistent g, Object raw)
262 throws AccessPoemException {
263 ((UploadedFile)g).setDatefield((Date)raw);
264 }
265 });
266
267 defineColumn(col_datefielddropdown =
268 new Column<Date>(this, "datefielddropdown",
269 new DatePoemType(true),
270 DefinitionSource.dsd) {
271 public Object getCooked(Persistent g)
272 throws AccessPoemException, PoemException {
273 return ((UploadedFile)g).getDatefielddropdown();
274 }
275
276 public void setCooked(Persistent g, Object cooked)
277 throws AccessPoemException, ValidationPoemException {
278 ((UploadedFile)g).setDatefielddropdown((Date)cooked);
279 }
280
281 public Field<Date> asField(Persistent g) {
282 return ((UploadedFile)g).getDatefielddropdownField();
283 }
284
285 public DisplayLevel defaultDisplayLevel() {
286 return DisplayLevel.summary;
287 }
288
289 public Searchability defaultSearchability() {
290 return Searchability.yes;
291 }
292
293 public String defaultDisplayName() {
294 return "Date Field";
295 }
296
297 public int defaultDisplayOrder() {
298 return 5;
299 }
300
301 public int defaultWidth() {
302 return 20;
303 }
304
305 public int defaultHeight() {
306 return 1;
307 }
308
309 public String defaultRenderinfo() {
310 return "dropdown";
311 }
312
313 public Object getRaw_unsafe(Persistent g)
314 throws AccessPoemException {
315 return ((UploadedFile)g).getDatefielddropdown_unsafe();
316 }
317
318 public void setRaw_unsafe(Persistent g, Object raw)
319 throws AccessPoemException {
320 ((UploadedFile)g).setDatefielddropdown_unsafe((Date)raw);
321 }
322
323 public Object getRaw(Persistent g)
324 throws AccessPoemException {
325 return ((UploadedFile)g).getDatefielddropdown();
326 }
327
328 public void setRaw(Persistent g, Object raw)
329 throws AccessPoemException {
330 ((UploadedFile)g).setDatefielddropdown((Date)raw);
331 }
332 });
333
334 defineColumn(col_datefieldmydropdown =
335 new Column<Date>(this, "datefieldmydropdown",
336 new DatePoemType(true),
337 DefinitionSource.dsd) {
338 public Object getCooked(Persistent g)
339 throws AccessPoemException, PoemException {
340 return ((UploadedFile)g).getDatefieldmydropdown();
341 }
342
343 public void setCooked(Persistent g, Object cooked)
344 throws AccessPoemException, ValidationPoemException {
345 ((UploadedFile)g).setDatefieldmydropdown((Date)cooked);
346 }
347
348 public Field<Date> asField(Persistent g) {
349 return ((UploadedFile)g).getDatefieldmydropdownField();
350 }
351
352 public DisplayLevel defaultDisplayLevel() {
353 return DisplayLevel.summary;
354 }
355
356 public Searchability defaultSearchability() {
357 return Searchability.yes;
358 }
359
360 public String defaultDisplayName() {
361 return "Date Field";
362 }
363
364 public int defaultDisplayOrder() {
365 return 5;
366 }
367
368 public int defaultWidth() {
369 return 20;
370 }
371
372 public int defaultHeight() {
373 return 1;
374 }
375
376 public String defaultRenderinfo() {
377 return "monthyeardropdown";
378 }
379
380 public Object getRaw_unsafe(Persistent g)
381 throws AccessPoemException {
382 return ((UploadedFile)g).getDatefieldmydropdown_unsafe();
383 }
384
385 public void setRaw_unsafe(Persistent g, Object raw)
386 throws AccessPoemException {
387 ((UploadedFile)g).setDatefieldmydropdown_unsafe((Date)raw);
388 }
389
390 public Object getRaw(Persistent g)
391 throws AccessPoemException {
392 return ((UploadedFile)g).getDatefieldmydropdown();
393 }
394
395 public void setRaw(Persistent g, Object raw)
396 throws AccessPoemException {
397 ((UploadedFile)g).setDatefieldmydropdown((Date)raw);
398 }
399 });
400
401 defineColumn(col_timestampfield =
402 new Column<Timestamp>(this, "timestampfield",
403 new TimestampPoemType(true),
404 DefinitionSource.dsd) {
405 public Object getCooked(Persistent g)
406 throws AccessPoemException, PoemException {
407 return ((UploadedFile)g).getTimestampfield();
408 }
409
410 public void setCooked(Persistent g, Object cooked)
411 throws AccessPoemException, ValidationPoemException {
412 ((UploadedFile)g).setTimestampfield((Timestamp)cooked);
413 }
414
415 public Field<Timestamp> asField(Persistent g) {
416 return ((UploadedFile)g).getTimestampfieldField();
417 }
418
419 public DisplayLevel defaultDisplayLevel() {
420 return DisplayLevel.summary;
421 }
422
423 public Searchability defaultSearchability() {
424 return Searchability.yes;
425 }
426
427 public String defaultDisplayName() {
428 return "Timestamp Field";
429 }
430
431 public int defaultDisplayOrder() {
432 return 10;
433 }
434
435 public int defaultWidth() {
436 return 20;
437 }
438
439 public int defaultHeight() {
440 return 1;
441 }
442
443 public String defaultRenderinfo() {
444 return "dropdown";
445 }
446
447 public Object getRaw_unsafe(Persistent g)
448 throws AccessPoemException {
449 return ((UploadedFile)g).getTimestampfield_unsafe();
450 }
451
452 public void setRaw_unsafe(Persistent g, Object raw)
453 throws AccessPoemException {
454 ((UploadedFile)g).setTimestampfield_unsafe((Timestamp)raw);
455 }
456
457 public Object getRaw(Persistent g)
458 throws AccessPoemException {
459 return ((UploadedFile)g).getTimestampfield();
460 }
461
462 public void setRaw(Persistent g, Object raw)
463 throws AccessPoemException {
464 ((UploadedFile)g).setTimestampfield((Timestamp)raw);
465 }
466 });
467 }
468
469
470
471
472
473
474
475
476
477 public final Column<Integer> getIdColumn() {
478 return col_id;
479 }
480
481
482
483
484
485
486
487
488
489 public final Column<String> getFilenameColumn() {
490 return col_filename;
491 }
492
493
494
495
496
497
498
499
500
501 public final Column<Date> getDatefieldColumn() {
502 return col_datefield;
503 }
504
505
506
507
508
509
510
511
512
513 public final Column<Date> getDatefielddropdownColumn() {
514 return col_datefielddropdown;
515 }
516
517
518
519
520
521
522
523
524
525 public final Column<Date> getDatefieldmydropdownColumn() {
526 return col_datefieldmydropdown;
527 }
528
529
530
531
532
533
534
535
536
537 public final Column<Timestamp> getTimestampfieldColumn() {
538 return col_timestampfield;
539 }
540
541
542
543
544
545
546
547
548
549 public UploadedFile getUploadedFileObject(Integer troid) {
550 return (UploadedFile)getObject(troid);
551 }
552
553
554
555
556
557
558
559
560
561 public UploadedFile getUploadedFileObject(int troid) {
562 return (UploadedFile)getObject(troid);
563 }
564
565 protected JdbcPersistent _newPersistent() {
566 return new UploadedFile();
567 }
568 public String defaultDisplayName() {
569 return "Uploaded File";
570 }
571
572 public String defaultDescription() {
573 return "A file uploaded by a user";
574 }
575
576 public boolean defaultRememberAllTroids() {
577 return true;
578 }
579
580 public Integer defaultCacheLimit() {
581 return new Integer(999999999);
582 }
583
584 public String defaultCategory() {
585 return "Data";
586 }
587
588 public int defaultDisplayOrder() {
589 return 0;
590 }
591 }
592