1
2
3 package org.melati.poem.test.generated;
4
5
6 import java.math.BigDecimal;
7 import java.sql.Date;
8 import java.sql.Timestamp;
9 import org.melati.poem.AccessPoemException;
10 import org.melati.poem.BigDecimalPoemType;
11 import org.melati.poem.BinaryPoemType;
12 import org.melati.poem.BooleanPoemType;
13 import org.melati.poem.Column;
14 import org.melati.poem.Database;
15 import org.melati.poem.DatePoemType;
16 import org.melati.poem.DefinitionSource;
17 import org.melati.poem.DisplayLevel;
18 import org.melati.poem.DoublePoemType;
19 import org.melati.poem.Field;
20 import org.melati.poem.IntegerPoemType;
21 import org.melati.poem.LongPoemType;
22 import org.melati.poem.PasswordPoemType;
23 import org.melati.poem.Persistent;
24 import org.melati.poem.PoemException;
25 import org.melati.poem.Searchability;
26 import org.melati.poem.StringPoemType;
27 import org.melati.poem.TimestampPoemType;
28 import org.melati.poem.ValidationPoemException;
29 import org.melati.poem.test.EverythingAbstract;
30 import org.melati.poem.test.EverythingDatabaseTables;
31 import org.melati.poem.test.EverythingTable;
32
33
34
35
36
37
38
39
40 public class EverythingAbstractTableBase<T extends EverythingAbstract> extends EverythingTable<T> {
41
42 private Column<byte[]> col_binaryfield = null;
43 private Column<String> col_stringfield = null;
44 private Column<String> col_passwordfield = null;
45 private Column<Boolean> col_booleanfield = null;
46 private Column<Date> col_datefield = null;
47 private Column<Double> col_doublefield = null;
48 private Column<Integer> col_integerfield = null;
49 private Column<Long> col_longfield = null;
50 private Column<BigDecimal> col_bigdecimalfield = null;
51 private Column<Timestamp> col_timestampfield = null;
52
53
54
55
56
57
58
59
60
61
62
63 public EverythingAbstractTableBase(
64 Database database, String name,
65 DefinitionSource definitionSource) throws PoemException {
66 super(database, name, definitionSource);
67 }
68
69
70
71
72
73
74
75
76 public EverythingDatabaseTables getEverythingDatabaseTables() {
77 return (EverythingDatabaseTables)getDatabase();
78 }
79
80
81
82
83
84
85
86 public void init() throws PoemException {
87 super.init();
88 defineColumn(col_binaryfield =
89 new Column<byte[]>(this, "binaryfield",
90 new BinaryPoemType(true, 13),
91 DefinitionSource.dsd) {
92 public Object getCooked(Persistent g)
93 throws AccessPoemException, PoemException {
94 return ((EverythingAbstract)g).getBinaryfield();
95 }
96
97 public void setCooked(Persistent g, Object cooked)
98 throws AccessPoemException, ValidationPoemException {
99 ((EverythingAbstract)g).setBinaryfield((byte[])cooked);
100 }
101
102 public Field<byte[]> asField(Persistent g) {
103 return ((EverythingAbstract)g).getBinaryfieldField();
104 }
105
106 public boolean defaultUserEditable() {
107 return false;
108 }
109
110 public boolean defaultUserCreateable() {
111 return false;
112 }
113
114 public DisplayLevel defaultDisplayLevel() {
115 return DisplayLevel.summary;
116 }
117
118 public Searchability defaultSearchability() {
119 return Searchability.no;
120 }
121
122 public String defaultDisplayName() {
123 return "Binaryfield";
124 }
125
126 public int defaultDisplayOrder() {
127 return 1;
128 }
129
130 public int defaultWidth() {
131 return 20;
132 }
133
134 public int defaultHeight() {
135 return 1;
136 }
137
138 public Object getRaw_unsafe(Persistent g)
139 throws AccessPoemException {
140 return ((EverythingAbstract)g).getBinaryfield_unsafe();
141 }
142
143 public void setRaw_unsafe(Persistent g, Object raw)
144 throws AccessPoemException {
145 ((EverythingAbstract)g).setBinaryfield_unsafe((byte[])raw);
146 }
147
148 public Object getRaw(Persistent g)
149 throws AccessPoemException {
150 return ((EverythingAbstract)g).getBinaryfield();
151 }
152
153 public void setRaw(Persistent g, Object raw)
154 throws AccessPoemException {
155 ((EverythingAbstract)g).setBinaryfield((byte[])raw);
156 }
157 });
158
159 defineColumn(col_stringfield =
160 new Column<String>(this, "stringfield",
161 new StringPoemType(true, 23),
162 DefinitionSource.dsd) {
163 public Object getCooked(Persistent g)
164 throws AccessPoemException, PoemException {
165 return ((EverythingAbstract)g).getStringfield();
166 }
167
168 public void setCooked(Persistent g, Object cooked)
169 throws AccessPoemException, ValidationPoemException {
170 ((EverythingAbstract)g).setStringfield((String)cooked);
171 }
172
173 public Field<String> asField(Persistent g) {
174 return ((EverythingAbstract)g).getStringfieldField();
175 }
176
177 public DisplayLevel defaultDisplayLevel() {
178 return DisplayLevel.summary;
179 }
180
181 public Searchability defaultSearchability() {
182 return Searchability.yes;
183 }
184
185 public String defaultDisplayName() {
186 return "String Field";
187 }
188
189 public int defaultDisplayOrder() {
190 return 2;
191 }
192
193 public int defaultWidth() {
194 return 20;
195 }
196
197 public int defaultHeight() {
198 return 3;
199 }
200
201 public Object getRaw_unsafe(Persistent g)
202 throws AccessPoemException {
203 return ((EverythingAbstract)g).getStringfield_unsafe();
204 }
205
206 public void setRaw_unsafe(Persistent g, Object raw)
207 throws AccessPoemException {
208 ((EverythingAbstract)g).setStringfield_unsafe((String)raw);
209 }
210
211 public Object getRaw(Persistent g)
212 throws AccessPoemException {
213 return ((EverythingAbstract)g).getStringfield();
214 }
215
216 public void setRaw(Persistent g, Object raw)
217 throws AccessPoemException {
218 ((EverythingAbstract)g).setStringfield((String)raw);
219 }
220 });
221
222 defineColumn(col_passwordfield =
223 new Column<String>(this, "passwordfield",
224 new PasswordPoemType(true, 23),
225 DefinitionSource.dsd) {
226 public Object getCooked(Persistent g)
227 throws AccessPoemException, PoemException {
228 return ((EverythingAbstract)g).getPasswordfield();
229 }
230
231 public void setCooked(Persistent g, Object cooked)
232 throws AccessPoemException, ValidationPoemException {
233 ((EverythingAbstract)g).setPasswordfield((String)cooked);
234 }
235
236 public Field<String> asField(Persistent g) {
237 return ((EverythingAbstract)g).getPasswordfieldField();
238 }
239
240 public DisplayLevel defaultDisplayLevel() {
241 return DisplayLevel.summary;
242 }
243
244 public Searchability defaultSearchability() {
245 return Searchability.yes;
246 }
247
248 public String defaultDisplayName() {
249 return "Password Field";
250 }
251
252 public int defaultDisplayOrder() {
253 return 3;
254 }
255
256 public int defaultWidth() {
257 return 20;
258 }
259
260 public int defaultHeight() {
261 return 3;
262 }
263
264 public Object getRaw_unsafe(Persistent g)
265 throws AccessPoemException {
266 return ((EverythingAbstract)g).getPasswordfield_unsafe();
267 }
268
269 public void setRaw_unsafe(Persistent g, Object raw)
270 throws AccessPoemException {
271 ((EverythingAbstract)g).setPasswordfield_unsafe((String)raw);
272 }
273
274 public Object getRaw(Persistent g)
275 throws AccessPoemException {
276 return ((EverythingAbstract)g).getPasswordfield();
277 }
278
279 public void setRaw(Persistent g, Object raw)
280 throws AccessPoemException {
281 ((EverythingAbstract)g).setPasswordfield((String)raw);
282 }
283 });
284
285 defineColumn(col_booleanfield =
286 new Column<Boolean>(this, "booleanfield",
287 new BooleanPoemType(true),
288 DefinitionSource.dsd) {
289 public Object getCooked(Persistent g)
290 throws AccessPoemException, PoemException {
291 return ((EverythingAbstract)g).getBooleanfield();
292 }
293
294 public void setCooked(Persistent g, Object cooked)
295 throws AccessPoemException, ValidationPoemException {
296 ((EverythingAbstract)g).setBooleanfield((Boolean)cooked);
297 }
298
299 public Field<Boolean> asField(Persistent g) {
300 return ((EverythingAbstract)g).getBooleanfieldField();
301 }
302
303 public DisplayLevel defaultDisplayLevel() {
304 return DisplayLevel.summary;
305 }
306
307 public Searchability defaultSearchability() {
308 return Searchability.yes;
309 }
310
311 public String defaultDisplayName() {
312 return "Boolean Field";
313 }
314
315 public int defaultDisplayOrder() {
316 return 4;
317 }
318
319 public int defaultWidth() {
320 return 20;
321 }
322
323 public int defaultHeight() {
324 return 1;
325 }
326
327 public Object getRaw_unsafe(Persistent g)
328 throws AccessPoemException {
329 return ((EverythingAbstract)g).getBooleanfield_unsafe();
330 }
331
332 public void setRaw_unsafe(Persistent g, Object raw)
333 throws AccessPoemException {
334 ((EverythingAbstract)g).setBooleanfield_unsafe((Boolean)raw);
335 }
336
337 public Object getRaw(Persistent g)
338 throws AccessPoemException {
339 return ((EverythingAbstract)g).getBooleanfield();
340 }
341
342 public void setRaw(Persistent g, Object raw)
343 throws AccessPoemException {
344 ((EverythingAbstract)g).setBooleanfield((Boolean)raw);
345 }
346 });
347
348 defineColumn(col_datefield =
349 new Column<Date>(this, "datefield",
350 new DatePoemType(true),
351 DefinitionSource.dsd) {
352 public Object getCooked(Persistent g)
353 throws AccessPoemException, PoemException {
354 return ((EverythingAbstract)g).getDatefield();
355 }
356
357 public void setCooked(Persistent g, Object cooked)
358 throws AccessPoemException, ValidationPoemException {
359 ((EverythingAbstract)g).setDatefield((Date)cooked);
360 }
361
362 public Field<Date> asField(Persistent g) {
363 return ((EverythingAbstract)g).getDatefieldField();
364 }
365
366 public DisplayLevel defaultDisplayLevel() {
367 return DisplayLevel.summary;
368 }
369
370 public Searchability defaultSearchability() {
371 return Searchability.yes;
372 }
373
374 public String defaultDisplayName() {
375 return "Date Field";
376 }
377
378 public int defaultDisplayOrder() {
379 return 5;
380 }
381
382 public int defaultWidth() {
383 return 20;
384 }
385
386 public int defaultHeight() {
387 return 1;
388 }
389
390 public Object getRaw_unsafe(Persistent g)
391 throws AccessPoemException {
392 return ((EverythingAbstract)g).getDatefield_unsafe();
393 }
394
395 public void setRaw_unsafe(Persistent g, Object raw)
396 throws AccessPoemException {
397 ((EverythingAbstract)g).setDatefield_unsafe((Date)raw);
398 }
399
400 public Object getRaw(Persistent g)
401 throws AccessPoemException {
402 return ((EverythingAbstract)g).getDatefield();
403 }
404
405 public void setRaw(Persistent g, Object raw)
406 throws AccessPoemException {
407 ((EverythingAbstract)g).setDatefield((Date)raw);
408 }
409 });
410
411 defineColumn(col_doublefield =
412 new Column<Double>(this, "doublefield",
413 new DoublePoemType(true),
414 DefinitionSource.dsd) {
415 public Object getCooked(Persistent g)
416 throws AccessPoemException, PoemException {
417 return ((EverythingAbstract)g).getDoublefield();
418 }
419
420 public void setCooked(Persistent g, Object cooked)
421 throws AccessPoemException, ValidationPoemException {
422 ((EverythingAbstract)g).setDoublefield((Double)cooked);
423 }
424
425 public Field<Double> asField(Persistent g) {
426 return ((EverythingAbstract)g).getDoublefieldField();
427 }
428
429 public DisplayLevel defaultDisplayLevel() {
430 return DisplayLevel.summary;
431 }
432
433 public Searchability defaultSearchability() {
434 return Searchability.yes;
435 }
436
437 public String defaultDisplayName() {
438 return "Double Field";
439 }
440
441 public int defaultDisplayOrder() {
442 return 6;
443 }
444
445 public int defaultWidth() {
446 return 20;
447 }
448
449 public int defaultHeight() {
450 return 1;
451 }
452
453 public Object getRaw_unsafe(Persistent g)
454 throws AccessPoemException {
455 return ((EverythingAbstract)g).getDoublefield_unsafe();
456 }
457
458 public void setRaw_unsafe(Persistent g, Object raw)
459 throws AccessPoemException {
460 ((EverythingAbstract)g).setDoublefield_unsafe((Double)raw);
461 }
462
463 public Object getRaw(Persistent g)
464 throws AccessPoemException {
465 return ((EverythingAbstract)g).getDoublefield();
466 }
467
468 public void setRaw(Persistent g, Object raw)
469 throws AccessPoemException {
470 ((EverythingAbstract)g).setDoublefield((Double)raw);
471 }
472 });
473
474 defineColumn(col_integerfield =
475 new Column<Integer>(this, "integerfield",
476 new IntegerPoemType(true),
477 DefinitionSource.dsd) {
478 public Object getCooked(Persistent g)
479 throws AccessPoemException, PoemException {
480 return ((EverythingAbstract)g).getIntegerfield();
481 }
482
483 public void setCooked(Persistent g, Object cooked)
484 throws AccessPoemException, ValidationPoemException {
485 ((EverythingAbstract)g).setIntegerfield((Integer)cooked);
486 }
487
488 public Field<Integer> asField(Persistent g) {
489 return ((EverythingAbstract)g).getIntegerfieldField();
490 }
491
492 public DisplayLevel defaultDisplayLevel() {
493 return DisplayLevel.summary;
494 }
495
496 public Searchability defaultSearchability() {
497 return Searchability.yes;
498 }
499
500 public String defaultDisplayName() {
501 return "Integer Field";
502 }
503
504 public int defaultDisplayOrder() {
505 return 7;
506 }
507
508 public int defaultWidth() {
509 return 20;
510 }
511
512 public int defaultHeight() {
513 return 1;
514 }
515
516 public Object getRaw_unsafe(Persistent g)
517 throws AccessPoemException {
518 return ((EverythingAbstract)g).getIntegerfield_unsafe();
519 }
520
521 public void setRaw_unsafe(Persistent g, Object raw)
522 throws AccessPoemException {
523 ((EverythingAbstract)g).setIntegerfield_unsafe((Integer)raw);
524 }
525
526 public Object getRaw(Persistent g)
527 throws AccessPoemException {
528 return ((EverythingAbstract)g).getIntegerfield();
529 }
530
531 public void setRaw(Persistent g, Object raw)
532 throws AccessPoemException {
533 ((EverythingAbstract)g).setIntegerfield((Integer)raw);
534 }
535 });
536
537 defineColumn(col_longfield =
538 new Column<Long>(this, "longfield",
539 new LongPoemType(true),
540 DefinitionSource.dsd) {
541 public Object getCooked(Persistent g)
542 throws AccessPoemException, PoemException {
543 return ((EverythingAbstract)g).getLongfield();
544 }
545
546 public void setCooked(Persistent g, Object cooked)
547 throws AccessPoemException, ValidationPoemException {
548 ((EverythingAbstract)g).setLongfield((Long)cooked);
549 }
550
551 public Field<Long> asField(Persistent g) {
552 return ((EverythingAbstract)g).getLongfieldField();
553 }
554
555 public DisplayLevel defaultDisplayLevel() {
556 return DisplayLevel.summary;
557 }
558
559 public Searchability defaultSearchability() {
560 return Searchability.yes;
561 }
562
563 public String defaultDisplayName() {
564 return "Long Field";
565 }
566
567 public int defaultDisplayOrder() {
568 return 8;
569 }
570
571 public int defaultWidth() {
572 return 20;
573 }
574
575 public int defaultHeight() {
576 return 1;
577 }
578
579 public Object getRaw_unsafe(Persistent g)
580 throws AccessPoemException {
581 return ((EverythingAbstract)g).getLongfield_unsafe();
582 }
583
584 public void setRaw_unsafe(Persistent g, Object raw)
585 throws AccessPoemException {
586 ((EverythingAbstract)g).setLongfield_unsafe((Long)raw);
587 }
588
589 public Object getRaw(Persistent g)
590 throws AccessPoemException {
591 return ((EverythingAbstract)g).getLongfield();
592 }
593
594 public void setRaw(Persistent g, Object raw)
595 throws AccessPoemException {
596 ((EverythingAbstract)g).setLongfield((Long)raw);
597 }
598 });
599
600 defineColumn(col_bigdecimalfield =
601 new Column<BigDecimal>(this, "bigdecimalfield",
602 new BigDecimalPoemType(true, 22, 2),
603 DefinitionSource.dsd) {
604 public Object getCooked(Persistent g)
605 throws AccessPoemException, PoemException {
606 return ((EverythingAbstract)g).getBigdecimalfield();
607 }
608
609 public void setCooked(Persistent g, Object cooked)
610 throws AccessPoemException, ValidationPoemException {
611 ((EverythingAbstract)g).setBigdecimalfield((BigDecimal)cooked);
612 }
613
614 public Field<BigDecimal> asField(Persistent g) {
615 return ((EverythingAbstract)g).getBigdecimalfieldField();
616 }
617
618 public DisplayLevel defaultDisplayLevel() {
619 return DisplayLevel.summary;
620 }
621
622 public Searchability defaultSearchability() {
623 return Searchability.yes;
624 }
625
626 public String defaultDisplayName() {
627 return "BigDecimal Field";
628 }
629
630 public int defaultDisplayOrder() {
631 return 9;
632 }
633
634 public int defaultWidth() {
635 return 20;
636 }
637
638 public int defaultHeight() {
639 return 1;
640 }
641
642 public Object getRaw_unsafe(Persistent g)
643 throws AccessPoemException {
644 return ((EverythingAbstract)g).getBigdecimalfield_unsafe();
645 }
646
647 public void setRaw_unsafe(Persistent g, Object raw)
648 throws AccessPoemException {
649 ((EverythingAbstract)g).setBigdecimalfield_unsafe((BigDecimal)raw);
650 }
651
652 public Object getRaw(Persistent g)
653 throws AccessPoemException {
654 return ((EverythingAbstract)g).getBigdecimalfield();
655 }
656
657 public void setRaw(Persistent g, Object raw)
658 throws AccessPoemException {
659 ((EverythingAbstract)g).setBigdecimalfield((BigDecimal)raw);
660 }
661 });
662
663 defineColumn(col_timestampfield =
664 new Column<Timestamp>(this, "timestampfield",
665 new TimestampPoemType(true),
666 DefinitionSource.dsd) {
667 public Object getCooked(Persistent g)
668 throws AccessPoemException, PoemException {
669 return ((EverythingAbstract)g).getTimestampfield();
670 }
671
672 public void setCooked(Persistent g, Object cooked)
673 throws AccessPoemException, ValidationPoemException {
674 ((EverythingAbstract)g).setTimestampfield((Timestamp)cooked);
675 }
676
677 public Field<Timestamp> asField(Persistent g) {
678 return ((EverythingAbstract)g).getTimestampfieldField();
679 }
680
681 public DisplayLevel defaultDisplayLevel() {
682 return DisplayLevel.summary;
683 }
684
685 public Searchability defaultSearchability() {
686 return Searchability.yes;
687 }
688
689 public String defaultDisplayName() {
690 return "Timestamp Field";
691 }
692
693 public int defaultDisplayOrder() {
694 return 10;
695 }
696
697 public int defaultWidth() {
698 return 20;
699 }
700
701 public int defaultHeight() {
702 return 1;
703 }
704
705 public Object getRaw_unsafe(Persistent g)
706 throws AccessPoemException {
707 return ((EverythingAbstract)g).getTimestampfield_unsafe();
708 }
709
710 public void setRaw_unsafe(Persistent g, Object raw)
711 throws AccessPoemException {
712 ((EverythingAbstract)g).setTimestampfield_unsafe((Timestamp)raw);
713 }
714
715 public Object getRaw(Persistent g)
716 throws AccessPoemException {
717 return ((EverythingAbstract)g).getTimestampfield();
718 }
719
720 public void setRaw(Persistent g, Object raw)
721 throws AccessPoemException {
722 ((EverythingAbstract)g).setTimestampfield((Timestamp)raw);
723 }
724 });
725 }
726
727
728
729
730
731
732
733
734
735 public final Column<byte[]> getBinaryfieldColumn() {
736 return col_binaryfield;
737 }
738
739
740
741
742
743
744
745
746
747 public final Column<String> getStringfieldColumn() {
748 return col_stringfield;
749 }
750
751
752
753
754
755
756
757
758
759 public final Column<String> getPasswordfieldColumn() {
760 return col_passwordfield;
761 }
762
763
764
765
766
767
768
769
770
771 public final Column<Boolean> getBooleanfieldColumn() {
772 return col_booleanfield;
773 }
774
775
776
777
778
779
780
781
782
783 public final Column<Date> getDatefieldColumn() {
784 return col_datefield;
785 }
786
787
788
789
790
791
792
793
794
795 public final Column<Double> getDoublefieldColumn() {
796 return col_doublefield;
797 }
798
799
800
801
802
803
804
805
806
807 public final Column<Integer> getIntegerfieldColumn() {
808 return col_integerfield;
809 }
810
811
812
813
814
815
816
817
818
819 public final Column<Long> getLongfieldColumn() {
820 return col_longfield;
821 }
822
823
824
825
826
827
828
829
830
831 public final Column<BigDecimal> getBigdecimalfieldColumn() {
832 return col_bigdecimalfield;
833 }
834
835
836
837
838
839
840
841
842
843 public final Column<Timestamp> getTimestampfieldColumn() {
844 return col_timestampfield;
845 }
846
847
848
849
850
851
852
853
854
855 public EverythingAbstract getEverythingAbstractObject(Integer troid) {
856 return (EverythingAbstract)getObject(troid);
857 }
858
859
860
861
862
863
864
865
866
867 public EverythingAbstract getEverythingAbstractObject(int troid) {
868 return (EverythingAbstract)getObject(troid);
869 }
870 public String defaultDisplayName() {
871 return "EverythingAbstract";
872 }
873
874 public String defaultDescription() {
875 return "Every datatype in one abstract table";
876 }
877
878 public Integer defaultCacheLimit() {
879 return new Integer(100);
880 }
881
882 public String defaultCategory() {
883 return "Normal";
884 }
885
886 public int defaultDisplayOrder() {
887 return 55;
888 }
889 }
890