1
2
3 package org.paneris.rimauresq.model.generated;
4
5 import org.melati.poem.AccessPoemException;
6 import org.melati.poem.BooleanPoemType;
7 import org.melati.poem.Column;
8 import org.melati.poem.Database;
9 import org.melati.poem.DefinitionSource;
10 import org.melati.poem.DisplayLevel;
11 import org.melati.poem.Field;
12 import org.melati.poem.JdbcPersistent;
13 import org.melati.poem.Persistent;
14 import org.melati.poem.PoemException;
15 import org.melati.poem.Searchability;
16 import org.melati.poem.StringPoemType;
17 import org.melati.poem.UserTable;
18 import org.melati.poem.ValidationPoemException;
19 import org.paneris.rimauresq.model.RimauresqDatabaseTables;
20 import org.paneris.rimauresq.model.User;
21
22
23
24
25
26
27
28
29
30 public class UserTableBase extends UserTable {
31
32 private Column col_email = null;
33 private Column col_title = null;
34 private Column col_address = null;
35 private Column col_town = null;
36 private Column col_postcode = null;
37 private Column col_country = null;
38 private Column col_tel = null;
39 private Column col_fax = null;
40 private Column col_mobile = null;
41 private Column col_news = null;
42
43
44
45
46
47
48
49
50
51
52
53 public UserTableBase(
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 RimauresqDatabaseTables getRimauresqDatabaseTables() {
67 return (RimauresqDatabaseTables)getDatabase();
68 }
69
70 public void init() throws PoemException {
71 super.init();
72 defineColumn(col_email =
73 new Column(this, "email",
74 new StringPoemType(false, -1),
75 DefinitionSource.dsd) {
76 public Object getCooked(Persistent g)
77 throws AccessPoemException, PoemException {
78 return ((User)g).getEmail();
79 }
80
81 public void setCooked(Persistent g, Object cooked)
82 throws AccessPoemException, ValidationPoemException {
83 ((User)g).setEmail((String)cooked);
84 }
85
86 public Field asField(Persistent g) {
87 return ((User)g).getEmailField();
88 }
89
90 protected DisplayLevel defaultDisplayLevel() {
91 return DisplayLevel.summary;
92 }
93
94 protected Searchability defaultSearchability() {
95 return Searchability.yes;
96 }
97
98 protected int defaultDisplayOrder() {
99 return 50;
100 }
101
102 protected String defaultDescription() {
103 return "The user's email address";
104 }
105
106 protected int defaultWidth() {
107 return 40;
108 }
109
110 public Object getRaw_unsafe(Persistent g)
111 throws AccessPoemException {
112 return ((User)g).getEmail_unsafe();
113 }
114
115 public void setRaw_unsafe(Persistent g, Object raw)
116 throws AccessPoemException {
117 ((User)g).setEmail_unsafe((String)raw);
118 }
119
120 public Object getRaw(Persistent g)
121 throws AccessPoemException {
122 return ((User)g).getEmail();
123 }
124
125 public void setRaw(Persistent g, Object raw)
126 throws AccessPoemException {
127 ((User)g).setEmail((String)raw);
128 }
129 });
130
131 defineColumn(col_title =
132 new Column(this, "title",
133 new StringPoemType(true, -1),
134 DefinitionSource.dsd) {
135 public Object getCooked(Persistent g)
136 throws AccessPoemException, PoemException {
137 return ((User)g).getTitle();
138 }
139
140 public void setCooked(Persistent g, Object cooked)
141 throws AccessPoemException, ValidationPoemException {
142 ((User)g).setTitle((String)cooked);
143 }
144
145 public Field asField(Persistent g) {
146 return ((User)g).getTitleField();
147 }
148
149 protected DisplayLevel defaultDisplayLevel() {
150 return DisplayLevel.detail;
151 }
152
153 protected String defaultDisplayName() {
154 return "Title";
155 }
156
157 protected int defaultDisplayOrder() {
158 return 51;
159 }
160
161 protected String defaultDescription() {
162 return "User's title or role";
163 }
164
165 protected int defaultWidth() {
166 return 80;
167 }
168
169 public Object getRaw_unsafe(Persistent g)
170 throws AccessPoemException {
171 return ((User)g).getTitle_unsafe();
172 }
173
174 public void setRaw_unsafe(Persistent g, Object raw)
175 throws AccessPoemException {
176 ((User)g).setTitle_unsafe((String)raw);
177 }
178
179 public Object getRaw(Persistent g)
180 throws AccessPoemException {
181 return ((User)g).getTitle();
182 }
183
184 public void setRaw(Persistent g, Object raw)
185 throws AccessPoemException {
186 ((User)g).setTitle((String)raw);
187 }
188 });
189
190 defineColumn(col_address =
191 new Column(this, "address",
192 new StringPoemType(true, -1),
193 DefinitionSource.dsd) {
194 public Object getCooked(Persistent g)
195 throws AccessPoemException, PoemException {
196 return ((User)g).getAddress();
197 }
198
199 public void setCooked(Persistent g, Object cooked)
200 throws AccessPoemException, ValidationPoemException {
201 ((User)g).setAddress((String)cooked);
202 }
203
204 public Field asField(Persistent g) {
205 return ((User)g).getAddressField();
206 }
207
208 protected DisplayLevel defaultDisplayLevel() {
209 return DisplayLevel.record;
210 }
211
212 protected String defaultDisplayName() {
213 return "Address";
214 }
215
216 protected int defaultDisplayOrder() {
217 return 52;
218 }
219
220 protected int defaultWidth() {
221 return 30;
222 }
223
224 protected int defaultHeight() {
225 return 4;
226 }
227
228 public Object getRaw_unsafe(Persistent g)
229 throws AccessPoemException {
230 return ((User)g).getAddress_unsafe();
231 }
232
233 public void setRaw_unsafe(Persistent g, Object raw)
234 throws AccessPoemException {
235 ((User)g).setAddress_unsafe((String)raw);
236 }
237
238 public Object getRaw(Persistent g)
239 throws AccessPoemException {
240 return ((User)g).getAddress();
241 }
242
243 public void setRaw(Persistent g, Object raw)
244 throws AccessPoemException {
245 ((User)g).setAddress((String)raw);
246 }
247 });
248
249 defineColumn(col_town =
250 new Column(this, "town",
251 new StringPoemType(true, -1),
252 DefinitionSource.dsd) {
253 public Object getCooked(Persistent g)
254 throws AccessPoemException, PoemException {
255 return ((User)g).getTown();
256 }
257
258 public void setCooked(Persistent g, Object cooked)
259 throws AccessPoemException, ValidationPoemException {
260 ((User)g).setTown((String)cooked);
261 }
262
263 public Field asField(Persistent g) {
264 return ((User)g).getTownField();
265 }
266
267 protected DisplayLevel defaultDisplayLevel() {
268 return DisplayLevel.record;
269 }
270
271 protected String defaultDisplayName() {
272 return "Town / City";
273 }
274
275 protected int defaultDisplayOrder() {
276 return 53;
277 }
278
279 protected int defaultWidth() {
280 return 30;
281 }
282
283 public Object getRaw_unsafe(Persistent g)
284 throws AccessPoemException {
285 return ((User)g).getTown_unsafe();
286 }
287
288 public void setRaw_unsafe(Persistent g, Object raw)
289 throws AccessPoemException {
290 ((User)g).setTown_unsafe((String)raw);
291 }
292
293 public Object getRaw(Persistent g)
294 throws AccessPoemException {
295 return ((User)g).getTown();
296 }
297
298 public void setRaw(Persistent g, Object raw)
299 throws AccessPoemException {
300 ((User)g).setTown((String)raw);
301 }
302 });
303
304 defineColumn(col_postcode =
305 new Column(this, "postcode",
306 new StringPoemType(true, -1),
307 DefinitionSource.dsd) {
308 public Object getCooked(Persistent g)
309 throws AccessPoemException, PoemException {
310 return ((User)g).getPostcode();
311 }
312
313 public void setCooked(Persistent g, Object cooked)
314 throws AccessPoemException, ValidationPoemException {
315 ((User)g).setPostcode((String)cooked);
316 }
317
318 public Field asField(Persistent g) {
319 return ((User)g).getPostcodeField();
320 }
321
322 protected DisplayLevel defaultDisplayLevel() {
323 return DisplayLevel.record;
324 }
325
326 protected String defaultDisplayName() {
327 return "Postcode";
328 }
329
330 protected int defaultDisplayOrder() {
331 return 54;
332 }
333
334 protected String defaultDescription() {
335 return "Order postcode";
336 }
337
338 public Object getRaw_unsafe(Persistent g)
339 throws AccessPoemException {
340 return ((User)g).getPostcode_unsafe();
341 }
342
343 public void setRaw_unsafe(Persistent g, Object raw)
344 throws AccessPoemException {
345 ((User)g).setPostcode_unsafe((String)raw);
346 }
347
348 public Object getRaw(Persistent g)
349 throws AccessPoemException {
350 return ((User)g).getPostcode();
351 }
352
353 public void setRaw(Persistent g, Object raw)
354 throws AccessPoemException {
355 ((User)g).setPostcode((String)raw);
356 }
357 });
358
359 defineColumn(col_country =
360 new Column(this, "country",
361 new StringPoemType(true, -1),
362 DefinitionSource.dsd) {
363 public Object getCooked(Persistent g)
364 throws AccessPoemException, PoemException {
365 return ((User)g).getCountry();
366 }
367
368 public void setCooked(Persistent g, Object cooked)
369 throws AccessPoemException, ValidationPoemException {
370 ((User)g).setCountry((String)cooked);
371 }
372
373 public Field asField(Persistent g) {
374 return ((User)g).getCountryField();
375 }
376
377 protected DisplayLevel defaultDisplayLevel() {
378 return DisplayLevel.record;
379 }
380
381 protected Searchability defaultSearchability() {
382 return Searchability.yes;
383 }
384
385 protected String defaultDisplayName() {
386 return "Country";
387 }
388
389 protected int defaultDisplayOrder() {
390 return 55;
391 }
392
393 public Object getRaw_unsafe(Persistent g)
394 throws AccessPoemException {
395 return ((User)g).getCountry_unsafe();
396 }
397
398 public void setRaw_unsafe(Persistent g, Object raw)
399 throws AccessPoemException {
400 ((User)g).setCountry_unsafe((String)raw);
401 }
402
403 public Object getRaw(Persistent g)
404 throws AccessPoemException {
405 return ((User)g).getCountry();
406 }
407
408 public void setRaw(Persistent g, Object raw)
409 throws AccessPoemException {
410 ((User)g).setCountry((String)raw);
411 }
412 });
413
414 defineColumn(col_tel =
415 new Column(this, "tel",
416 new StringPoemType(true, -1),
417 DefinitionSource.dsd) {
418 public Object getCooked(Persistent g)
419 throws AccessPoemException, PoemException {
420 return ((User)g).getTel();
421 }
422
423 public void setCooked(Persistent g, Object cooked)
424 throws AccessPoemException, ValidationPoemException {
425 ((User)g).setTel((String)cooked);
426 }
427
428 public Field asField(Persistent g) {
429 return ((User)g).getTelField();
430 }
431
432 protected DisplayLevel defaultDisplayLevel() {
433 return DisplayLevel.record;
434 }
435
436 protected String defaultDisplayName() {
437 return "Telephone";
438 }
439
440 protected int defaultDisplayOrder() {
441 return 64;
442 }
443
444 protected String defaultDescription() {
445 return "User's telephone number";
446 }
447
448 public Object getRaw_unsafe(Persistent g)
449 throws AccessPoemException {
450 return ((User)g).getTel_unsafe();
451 }
452
453 public void setRaw_unsafe(Persistent g, Object raw)
454 throws AccessPoemException {
455 ((User)g).setTel_unsafe((String)raw);
456 }
457
458 public Object getRaw(Persistent g)
459 throws AccessPoemException {
460 return ((User)g).getTel();
461 }
462
463 public void setRaw(Persistent g, Object raw)
464 throws AccessPoemException {
465 ((User)g).setTel((String)raw);
466 }
467 });
468
469 defineColumn(col_fax =
470 new Column(this, "fax",
471 new StringPoemType(true, -1),
472 DefinitionSource.dsd) {
473 public Object getCooked(Persistent g)
474 throws AccessPoemException, PoemException {
475 return ((User)g).getFax();
476 }
477
478 public void setCooked(Persistent g, Object cooked)
479 throws AccessPoemException, ValidationPoemException {
480 ((User)g).setFax((String)cooked);
481 }
482
483 public Field asField(Persistent g) {
484 return ((User)g).getFaxField();
485 }
486
487 protected DisplayLevel defaultDisplayLevel() {
488 return DisplayLevel.record;
489 }
490
491 protected int defaultDisplayOrder() {
492 return 65;
493 }
494
495 protected String defaultDescription() {
496 return "User's fax number";
497 }
498
499 public Object getRaw_unsafe(Persistent g)
500 throws AccessPoemException {
501 return ((User)g).getFax_unsafe();
502 }
503
504 public void setRaw_unsafe(Persistent g, Object raw)
505 throws AccessPoemException {
506 ((User)g).setFax_unsafe((String)raw);
507 }
508
509 public Object getRaw(Persistent g)
510 throws AccessPoemException {
511 return ((User)g).getFax();
512 }
513
514 public void setRaw(Persistent g, Object raw)
515 throws AccessPoemException {
516 ((User)g).setFax((String)raw);
517 }
518 });
519
520 defineColumn(col_mobile =
521 new Column(this, "mobile",
522 new StringPoemType(true, -1),
523 DefinitionSource.dsd) {
524 public Object getCooked(Persistent g)
525 throws AccessPoemException, PoemException {
526 return ((User)g).getMobile();
527 }
528
529 public void setCooked(Persistent g, Object cooked)
530 throws AccessPoemException, ValidationPoemException {
531 ((User)g).setMobile((String)cooked);
532 }
533
534 public Field asField(Persistent g) {
535 return ((User)g).getMobileField();
536 }
537
538 protected DisplayLevel defaultDisplayLevel() {
539 return DisplayLevel.record;
540 }
541
542 protected String defaultDisplayName() {
543 return "Mobile";
544 }
545
546 protected int defaultDisplayOrder() {
547 return 66;
548 }
549
550 protected String defaultDescription() {
551 return "User's mobile number";
552 }
553
554 public Object getRaw_unsafe(Persistent g)
555 throws AccessPoemException {
556 return ((User)g).getMobile_unsafe();
557 }
558
559 public void setRaw_unsafe(Persistent g, Object raw)
560 throws AccessPoemException {
561 ((User)g).setMobile_unsafe((String)raw);
562 }
563
564 public Object getRaw(Persistent g)
565 throws AccessPoemException {
566 return ((User)g).getMobile();
567 }
568
569 public void setRaw(Persistent g, Object raw)
570 throws AccessPoemException {
571 ((User)g).setMobile((String)raw);
572 }
573 });
574
575 defineColumn(col_news =
576 new Column(this, "news",
577 new BooleanPoemType(false),
578 DefinitionSource.dsd) {
579 public Object getCooked(Persistent g)
580 throws AccessPoemException, PoemException {
581 return ((User)g).getNews();
582 }
583
584 public void setCooked(Persistent g, Object cooked)
585 throws AccessPoemException, ValidationPoemException {
586 ((User)g).setNews((Boolean)cooked);
587 }
588
589 public Field asField(Persistent g) {
590 return ((User)g).getNewsField();
591 }
592
593 protected DisplayLevel defaultDisplayLevel() {
594 return DisplayLevel.summary;
595 }
596
597 protected Searchability defaultSearchability() {
598 return Searchability.no;
599 }
600
601 protected String defaultDisplayName() {
602 return "Receive Newsletter?";
603 }
604
605 protected int defaultDisplayOrder() {
606 return 67;
607 }
608
609 protected String defaultDescription() {
610 return "Does the user want to receive the email newsletter?";
611 }
612
613 public Object getRaw_unsafe(Persistent g)
614 throws AccessPoemException {
615 return ((User)g).getNews_unsafe();
616 }
617
618 public void setRaw_unsafe(Persistent g, Object raw)
619 throws AccessPoemException {
620 ((User)g).setNews_unsafe((Boolean)raw);
621 }
622
623 public Object getRaw(Persistent g)
624 throws AccessPoemException {
625 return ((User)g).getNews();
626 }
627
628 public void setRaw(Persistent g, Object raw)
629 throws AccessPoemException {
630 ((User)g).setNews((Boolean)raw);
631 }
632 });
633 }
634
635
636
637
638
639
640
641
642
643 public final Column getEmailColumn() {
644 return col_email;
645 }
646
647
648
649
650
651
652
653
654
655 public final Column getTitleColumn() {
656 return col_title;
657 }
658
659
660
661
662
663
664
665
666
667 public final Column getAddressColumn() {
668 return col_address;
669 }
670
671
672
673
674
675
676
677
678
679 public final Column getTownColumn() {
680 return col_town;
681 }
682
683
684
685
686
687
688
689
690
691 public final Column getPostcodeColumn() {
692 return col_postcode;
693 }
694
695
696
697
698
699
700
701
702
703 public final Column getCountryColumn() {
704 return col_country;
705 }
706
707
708
709
710
711
712
713
714
715 public final Column getTelColumn() {
716 return col_tel;
717 }
718
719
720
721
722
723
724
725
726
727 public final Column getFaxColumn() {
728 return col_fax;
729 }
730
731
732
733
734
735
736
737
738
739 public final Column getMobileColumn() {
740 return col_mobile;
741 }
742
743
744
745
746
747
748
749
750
751 public final Column getNewsColumn() {
752 return col_news;
753 }
754
755
756
757
758
759
760
761
762
763 public org.melati.poem.User getUserObject(Integer troid) {
764 return (org.melati.poem.User)getObject(troid);
765 }
766
767
768
769
770
771
772
773
774
775 public org.melati.poem.User getUserObject(int troid) {
776 return (org.melati.poem.User)getObject(troid);
777 }
778
779 protected JdbcPersistent _newPersistent() {
780 return new User();
781 }
782 protected String defaultDescription() {
783 return "A WVM User";
784 }
785
786 protected String defaultCategory() {
787 return "User";
788 }
789
790 protected int defaultDisplayOrder() {
791 return 2010;
792 }
793 }
794