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