1
2
3 package org.paneris.bibliomania.generated;
4
5
6 import org.melati.poem.AccessPoemException;
7 import org.melati.poem.BooleanPoemType;
8 import org.melati.poem.Column;
9 import org.melati.poem.Database;
10 import org.melati.poem.DefinitionSource;
11 import org.melati.poem.DisplayLevel;
12 import org.melati.poem.Field;
13 import org.melati.poem.JdbcPersistent;
14 import org.melati.poem.Persistent;
15 import org.melati.poem.PoemException;
16 import org.melati.poem.StringPoemType;
17 import org.melati.poem.TroidPoemType;
18 import org.melati.poem.ValidationPoemException;
19 import org.paneris.bibliomania.BibliomaniaDatabaseTables;
20 import org.paneris.bibliomania.SectionGroup;
21 import org.paneris.bibliomania.UnitTable;
22
23
24
25
26
27
28
29
30 public class SectionGroupTableBase<T extends SectionGroup> extends UnitTable<T> {
31
32 private Column<Integer> col_id = null;
33 private Column<String> col_displayname = null;
34 private Column<Boolean> col_generic = null;
35 private Column<String> col_urlprefix = null;
36 private Column<String> col_subtext = null;
37 private Column<String> col_themecolour = null;
38 private Column<String> col_imagename = null;
39 private Column<String> col_image1file = null;
40 private Column<String> col_image2file = null;
41 private Column<String> col_imagenum = null;
42
43
44
45
46
47
48
49
50
51
52
53 public SectionGroupTableBase(
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 BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() {
67 return (BibliomaniaDatabaseTables)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 ((SectionGroup)g).getId();
85 }
86
87 public void setCooked(Persistent g, Object cooked)
88 throws AccessPoemException, ValidationPoemException {
89 ((SectionGroup)g).setId((Integer)cooked);
90 }
91
92 public Field<Integer> asField(Persistent g) {
93 return ((SectionGroup)g).getIdField();
94 }
95
96 public boolean defaultUserEditable() {
97 return false;
98 }
99
100 public boolean defaultUserCreateable() {
101 return false;
102 }
103
104 public int defaultDisplayOrder() {
105 return 0;
106 }
107
108 public Object getRaw_unsafe(Persistent g)
109 throws AccessPoemException {
110 return ((SectionGroup)g).getId_unsafe();
111 }
112
113 public void setRaw_unsafe(Persistent g, Object raw)
114 throws AccessPoemException {
115 ((SectionGroup)g).setId_unsafe((Integer)raw);
116 }
117
118 public Object getRaw(Persistent g)
119 throws AccessPoemException {
120 return ((SectionGroup)g).getId();
121 }
122
123 public void setRaw(Persistent g, Object raw)
124 throws AccessPoemException {
125 ((SectionGroup)g).setId((Integer)raw);
126 }
127 });
128
129 defineColumn(col_displayname =
130 new Column<String>(this, "displayname",
131 new StringPoemType(false, -1),
132 DefinitionSource.dsd) {
133 public Object getCooked(Persistent g)
134 throws AccessPoemException, PoemException {
135 return ((SectionGroup)g).getDisplayname();
136 }
137
138 public void setCooked(Persistent g, Object cooked)
139 throws AccessPoemException, ValidationPoemException {
140 ((SectionGroup)g).setDisplayname((String)cooked);
141 }
142
143 public Field<String> asField(Persistent g) {
144 return ((SectionGroup)g).getDisplaynameField();
145 }
146
147 public DisplayLevel defaultDisplayLevel() {
148 return DisplayLevel.primary;
149 }
150
151 public String defaultDisplayName() {
152 return "Display name";
153 }
154
155 public int defaultDisplayOrder() {
156 return 1;
157 }
158
159 public boolean defaultUnique() {
160 return true;
161 }
162
163 public Object getRaw_unsafe(Persistent g)
164 throws AccessPoemException {
165 return ((SectionGroup)g).getDisplayname_unsafe();
166 }
167
168 public void setRaw_unsafe(Persistent g, Object raw)
169 throws AccessPoemException {
170 ((SectionGroup)g).setDisplayname_unsafe((String)raw);
171 }
172
173 public Object getRaw(Persistent g)
174 throws AccessPoemException {
175 return ((SectionGroup)g).getDisplayname();
176 }
177
178 public void setRaw(Persistent g, Object raw)
179 throws AccessPoemException {
180 ((SectionGroup)g).setDisplayname((String)raw);
181 }
182 });
183
184 defineColumn(col_generic =
185 new Column<Boolean>(this, "generic",
186 new BooleanPoemType(false),
187 DefinitionSource.dsd) {
188 public Object getCooked(Persistent g)
189 throws AccessPoemException, PoemException {
190 return ((SectionGroup)g).getGeneric();
191 }
192
193 public void setCooked(Persistent g, Object cooked)
194 throws AccessPoemException, ValidationPoemException {
195 ((SectionGroup)g).setGeneric((Boolean)cooked);
196 }
197
198 public Field<Boolean> asField(Persistent g) {
199 return ((SectionGroup)g).getGenericField();
200 }
201
202 public DisplayLevel defaultDisplayLevel() {
203 return DisplayLevel.record;
204 }
205
206 public int defaultDisplayOrder() {
207 return 2;
208 }
209
210 public String defaultDescription() {
211 return "Whether the group is generic";
212 }
213
214 public Object getRaw_unsafe(Persistent g)
215 throws AccessPoemException {
216 return ((SectionGroup)g).getGeneric_unsafe();
217 }
218
219 public void setRaw_unsafe(Persistent g, Object raw)
220 throws AccessPoemException {
221 ((SectionGroup)g).setGeneric_unsafe((Boolean)raw);
222 }
223
224 public Object getRaw(Persistent g)
225 throws AccessPoemException {
226 return ((SectionGroup)g).getGeneric();
227 }
228
229 public void setRaw(Persistent g, Object raw)
230 throws AccessPoemException {
231 ((SectionGroup)g).setGeneric((Boolean)raw);
232 }
233 });
234
235 defineColumn(col_urlprefix =
236 new Column<String>(this, "urlprefix",
237 new StringPoemType(true, -1),
238 DefinitionSource.dsd) {
239 public Object getCooked(Persistent g)
240 throws AccessPoemException, PoemException {
241 return ((SectionGroup)g).getUrlprefix();
242 }
243
244 public void setCooked(Persistent g, Object cooked)
245 throws AccessPoemException, ValidationPoemException {
246 ((SectionGroup)g).setUrlprefix((String)cooked);
247 }
248
249 public Field<String> asField(Persistent g) {
250 return ((SectionGroup)g).getUrlprefixField();
251 }
252
253 public DisplayLevel defaultDisplayLevel() {
254 return DisplayLevel.record;
255 }
256
257 public int defaultDisplayOrder() {
258 return 3;
259 }
260
261 public String defaultDescription() {
262 return "Prefix for URLs in the group";
263 }
264
265 public Object getRaw_unsafe(Persistent g)
266 throws AccessPoemException {
267 return ((SectionGroup)g).getUrlprefix_unsafe();
268 }
269
270 public void setRaw_unsafe(Persistent g, Object raw)
271 throws AccessPoemException {
272 ((SectionGroup)g).setUrlprefix_unsafe((String)raw);
273 }
274
275 public Object getRaw(Persistent g)
276 throws AccessPoemException {
277 return ((SectionGroup)g).getUrlprefix();
278 }
279
280 public void setRaw(Persistent g, Object raw)
281 throws AccessPoemException {
282 ((SectionGroup)g).setUrlprefix((String)raw);
283 }
284 });
285
286 defineColumn(col_subtext =
287 new Column<String>(this, "subtext",
288 new StringPoemType(true, -1),
289 DefinitionSource.dsd) {
290 public Object getCooked(Persistent g)
291 throws AccessPoemException, PoemException {
292 return ((SectionGroup)g).getSubtext();
293 }
294
295 public void setCooked(Persistent g, Object cooked)
296 throws AccessPoemException, ValidationPoemException {
297 ((SectionGroup)g).setSubtext((String)cooked);
298 }
299
300 public Field<String> asField(Persistent g) {
301 return ((SectionGroup)g).getSubtextField();
302 }
303
304 public DisplayLevel defaultDisplayLevel() {
305 return DisplayLevel.record;
306 }
307
308 public int defaultDisplayOrder() {
309 return 4;
310 }
311
312 public Object getRaw_unsafe(Persistent g)
313 throws AccessPoemException {
314 return ((SectionGroup)g).getSubtext_unsafe();
315 }
316
317 public void setRaw_unsafe(Persistent g, Object raw)
318 throws AccessPoemException {
319 ((SectionGroup)g).setSubtext_unsafe((String)raw);
320 }
321
322 public Object getRaw(Persistent g)
323 throws AccessPoemException {
324 return ((SectionGroup)g).getSubtext();
325 }
326
327 public void setRaw(Persistent g, Object raw)
328 throws AccessPoemException {
329 ((SectionGroup)g).setSubtext((String)raw);
330 }
331 });
332
333 defineColumn(col_themecolour =
334 new Column<String>(this, "themecolour",
335 new StringPoemType(false, -1),
336 DefinitionSource.dsd) {
337 public Object getCooked(Persistent g)
338 throws AccessPoemException, PoemException {
339 return ((SectionGroup)g).getThemecolour();
340 }
341
342 public void setCooked(Persistent g, Object cooked)
343 throws AccessPoemException, ValidationPoemException {
344 ((SectionGroup)g).setThemecolour((String)cooked);
345 }
346
347 public Field<String> asField(Persistent g) {
348 return ((SectionGroup)g).getThemecolourField();
349 }
350
351 public DisplayLevel defaultDisplayLevel() {
352 return DisplayLevel.record;
353 }
354
355 public String defaultDisplayName() {
356 return "Theme colour";
357 }
358
359 public int defaultDisplayOrder() {
360 return 5;
361 }
362
363 public String defaultDescription() {
364 return "The area's thematic colour";
365 }
366
367 public Object getRaw_unsafe(Persistent g)
368 throws AccessPoemException {
369 return ((SectionGroup)g).getThemecolour_unsafe();
370 }
371
372 public void setRaw_unsafe(Persistent g, Object raw)
373 throws AccessPoemException {
374 ((SectionGroup)g).setThemecolour_unsafe((String)raw);
375 }
376
377 public Object getRaw(Persistent g)
378 throws AccessPoemException {
379 return ((SectionGroup)g).getThemecolour();
380 }
381
382 public void setRaw(Persistent g, Object raw)
383 throws AccessPoemException {
384 ((SectionGroup)g).setThemecolour((String)raw);
385 }
386 });
387
388 defineColumn(col_imagename =
389 new Column<String>(this, "imagename",
390 new StringPoemType(false, -1),
391 DefinitionSource.dsd) {
392 public Object getCooked(Persistent g)
393 throws AccessPoemException, PoemException {
394 return ((SectionGroup)g).getImagename();
395 }
396
397 public void setCooked(Persistent g, Object cooked)
398 throws AccessPoemException, ValidationPoemException {
399 ((SectionGroup)g).setImagename((String)cooked);
400 }
401
402 public Field<String> asField(Persistent g) {
403 return ((SectionGroup)g).getImagenameField();
404 }
405
406 public DisplayLevel defaultDisplayLevel() {
407 return DisplayLevel.record;
408 }
409
410 public int defaultDisplayOrder() {
411 return 6;
412 }
413
414 public Object getRaw_unsafe(Persistent g)
415 throws AccessPoemException {
416 return ((SectionGroup)g).getImagename_unsafe();
417 }
418
419 public void setRaw_unsafe(Persistent g, Object raw)
420 throws AccessPoemException {
421 ((SectionGroup)g).setImagename_unsafe((String)raw);
422 }
423
424 public Object getRaw(Persistent g)
425 throws AccessPoemException {
426 return ((SectionGroup)g).getImagename();
427 }
428
429 public void setRaw(Persistent g, Object raw)
430 throws AccessPoemException {
431 ((SectionGroup)g).setImagename((String)raw);
432 }
433 });
434
435 defineColumn(col_image1file =
436 new Column<String>(this, "image1file",
437 new StringPoemType(false, -1),
438 DefinitionSource.dsd) {
439 public Object getCooked(Persistent g)
440 throws AccessPoemException, PoemException {
441 return ((SectionGroup)g).getImage1file();
442 }
443
444 public void setCooked(Persistent g, Object cooked)
445 throws AccessPoemException, ValidationPoemException {
446 ((SectionGroup)g).setImage1file((String)cooked);
447 }
448
449 public Field<String> asField(Persistent g) {
450 return ((SectionGroup)g).getImage1fileField();
451 }
452
453 public DisplayLevel defaultDisplayLevel() {
454 return DisplayLevel.record;
455 }
456
457 public int defaultDisplayOrder() {
458 return 7;
459 }
460
461 public Object getRaw_unsafe(Persistent g)
462 throws AccessPoemException {
463 return ((SectionGroup)g).getImage1file_unsafe();
464 }
465
466 public void setRaw_unsafe(Persistent g, Object raw)
467 throws AccessPoemException {
468 ((SectionGroup)g).setImage1file_unsafe((String)raw);
469 }
470
471 public Object getRaw(Persistent g)
472 throws AccessPoemException {
473 return ((SectionGroup)g).getImage1file();
474 }
475
476 public void setRaw(Persistent g, Object raw)
477 throws AccessPoemException {
478 ((SectionGroup)g).setImage1file((String)raw);
479 }
480 });
481
482 defineColumn(col_image2file =
483 new Column<String>(this, "image2file",
484 new StringPoemType(false, -1),
485 DefinitionSource.dsd) {
486 public Object getCooked(Persistent g)
487 throws AccessPoemException, PoemException {
488 return ((SectionGroup)g).getImage2file();
489 }
490
491 public void setCooked(Persistent g, Object cooked)
492 throws AccessPoemException, ValidationPoemException {
493 ((SectionGroup)g).setImage2file((String)cooked);
494 }
495
496 public Field<String> asField(Persistent g) {
497 return ((SectionGroup)g).getImage2fileField();
498 }
499
500 public DisplayLevel defaultDisplayLevel() {
501 return DisplayLevel.record;
502 }
503
504 public int defaultDisplayOrder() {
505 return 8;
506 }
507
508 public Object getRaw_unsafe(Persistent g)
509 throws AccessPoemException {
510 return ((SectionGroup)g).getImage2file_unsafe();
511 }
512
513 public void setRaw_unsafe(Persistent g, Object raw)
514 throws AccessPoemException {
515 ((SectionGroup)g).setImage2file_unsafe((String)raw);
516 }
517
518 public Object getRaw(Persistent g)
519 throws AccessPoemException {
520 return ((SectionGroup)g).getImage2file();
521 }
522
523 public void setRaw(Persistent g, Object raw)
524 throws AccessPoemException {
525 ((SectionGroup)g).setImage2file((String)raw);
526 }
527 });
528
529 defineColumn(col_imagenum =
530 new Column<String>(this, "imagenum",
531 new StringPoemType(false, -1),
532 DefinitionSource.dsd) {
533 public Object getCooked(Persistent g)
534 throws AccessPoemException, PoemException {
535 return ((SectionGroup)g).getImagenum();
536 }
537
538 public void setCooked(Persistent g, Object cooked)
539 throws AccessPoemException, ValidationPoemException {
540 ((SectionGroup)g).setImagenum((String)cooked);
541 }
542
543 public Field<String> asField(Persistent g) {
544 return ((SectionGroup)g).getImagenumField();
545 }
546
547 public DisplayLevel defaultDisplayLevel() {
548 return DisplayLevel.record;
549 }
550
551 public int defaultDisplayOrder() {
552 return 9;
553 }
554
555 public Object getRaw_unsafe(Persistent g)
556 throws AccessPoemException {
557 return ((SectionGroup)g).getImagenum_unsafe();
558 }
559
560 public void setRaw_unsafe(Persistent g, Object raw)
561 throws AccessPoemException {
562 ((SectionGroup)g).setImagenum_unsafe((String)raw);
563 }
564
565 public Object getRaw(Persistent g)
566 throws AccessPoemException {
567 return ((SectionGroup)g).getImagenum();
568 }
569
570 public void setRaw(Persistent g, Object raw)
571 throws AccessPoemException {
572 ((SectionGroup)g).setImagenum((String)raw);
573 }
574 });
575 }
576
577
578
579
580
581
582
583
584
585 public final Column<Integer> getIdColumn() {
586 return col_id;
587 }
588
589
590
591
592
593
594
595
596
597 public final Column<String> getDisplaynameColumn() {
598 return col_displayname;
599 }
600
601
602
603
604
605
606
607
608
609 public final Column<Boolean> getGenericColumn() {
610 return col_generic;
611 }
612
613
614
615
616
617
618
619
620
621 public final Column<String> getUrlprefixColumn() {
622 return col_urlprefix;
623 }
624
625
626
627
628
629
630
631
632
633 public final Column<String> getSubtextColumn() {
634 return col_subtext;
635 }
636
637
638
639
640
641
642
643
644
645 public final Column<String> getThemecolourColumn() {
646 return col_themecolour;
647 }
648
649
650
651
652
653
654
655
656
657 public final Column<String> getImagenameColumn() {
658 return col_imagename;
659 }
660
661
662
663
664
665
666
667
668
669 public final Column<String> getImage1fileColumn() {
670 return col_image1file;
671 }
672
673
674
675
676
677
678
679
680
681 public final Column<String> getImage2fileColumn() {
682 return col_image2file;
683 }
684
685
686
687
688
689
690
691
692
693 public final Column<String> getImagenumColumn() {
694 return col_imagenum;
695 }
696
697
698
699
700
701
702
703
704
705 public SectionGroup getSectionGroupObject(Integer troid) {
706 return (SectionGroup)getObject(troid);
707 }
708
709
710
711
712
713
714
715
716
717 public SectionGroup getSectionGroupObject(int troid) {
718 return (SectionGroup)getObject(troid);
719 }
720
721 protected JdbcPersistent _newPersistent() {
722 return new SectionGroup();
723 }
724 public String defaultDisplayName() {
725 return "Section group";
726 }
727
728 public String defaultDescription() {
729 return "A group into which a section can be brought";
730 }
731
732 public boolean defaultRememberAllTroids() {
733 return true;
734 }
735
736 public int defaultDisplayOrder() {
737 return 100;
738 }
739 }
740