1 // Do not edit this file! It was generated by Melati POEM's DSD preprocessor.
2
3 package org.paneris.bibliomania.generated;
4
5
6 import java.sql.Timestamp;
7 import java.util.Collections;
8 import java.util.Enumeration;
9 import java.util.List;
10 import org.melati.poem.AccessPoemException;
11 import org.melati.poem.CachedSelection;
12 import org.melati.poem.Column;
13 import org.melati.poem.Field;
14 import org.melati.poem.GroupMembership;
15 import org.melati.poem.NoSuchRowPoemException;
16 import org.melati.poem.ValidationPoemException;
17 import org.melati.poem.util.EmptyEnumeration;
18 import org.paneris.bibliomania.BibliomaniaDatabaseTables;
19 import org.paneris.bibliomania.CampaignUser;
20 import org.paneris.bibliomania.Country;
21 import org.paneris.bibliomania.Currency;
22 import org.paneris.bibliomania.DownloadEvent;
23 import org.paneris.bibliomania.Sex;
24 import org.paneris.bibliomania.ShopOrder;
25 import org.paneris.bibliomania.ShopOrderItem;
26 // import org.paneris.bibliomania.User;
27 // import org.paneris.bibliomania.UserTable;
28 import org.paneris.melati.boards.model.Message;
29 import org.paneris.melati.boards.model.Subscription;
30 // import org.paneris.melati.boards.model.User;
31
32
33 /**
34 * Melati POEM generated abstract base class for a <code>Persistent</code>
35 * <code>User</code> Object.
36 *
37 * see org.melati.poem.prepro.TableDef#generatePersistentBaseJava
38 */
39 public abstract class UserBase extends org.paneris.melati.boards.model.User {
40
41
42 /**
43 * Retrieves the Database object.
44 *
45 * see org.melati.poem.prepro.TableDef#generatePersistentBaseJava
46 * @return the database
47 */
48 public BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() {
49 return (BibliomaniaDatabaseTables)getDatabase();
50 }
51
52
53 /**
54 * Retrieves the <code>UserTable</code> table
55 * which this <code>Persistent</code> is from.
56 *
57 * see org.melati.poem.prepro.TableDef#generatePersistentBaseJava
58 * @return the org.melati.poem.UserTable
59 */
60 @SuppressWarnings("unchecked")
61 public org.melati.poem.UserTable<org.melati.poem.User> getUserTable() {
62 return (org.melati.poem.UserTable<org.melati.poem.User>)getTable();
63 }
64
65 @SuppressWarnings("unchecked")
66 private org.paneris.bibliomania.UserTable<org.paneris.bibliomania.User> _getUserTable() {
67 return (org.paneris.bibliomania.UserTable<org.paneris.bibliomania.User>)getTable();
68 }
69
70 // Fields in this table
71 /**
72 * age - Your age
73 */
74 protected Integer age;
75 /**
76 * sex - Your sex
77 */
78 protected Integer sex;
79 /**
80 * country - The country where you live
81 */
82 protected Integer country;
83 /**
84 * Post/Zip code - Your postal code
85 */
86 protected String region;
87 /**
88 * Full time education - Whether you are in full-time education
89 */
90 protected Boolean fulltimeeducation;
91 /**
92 * Email alerts - Whether you want to receive email alerts
93 */
94 protected Boolean wantemailalerts;
95 /**
96 * Newsletter - Whether you want to receive the bibliomania.com newsletter
97 */
98 protected Boolean wantspam;
99 /**
100 * Dodgey Email - Whether this user has 'Dodgey' email address
101 */
102 protected Boolean dodgeyemail;
103 /**
104 * Address - Your address
105 */
106 protected String address;
107 /**
108 * Town / City - The town / city where you live
109 */
110 protected String town;
111 /**
112 * County / State - The county / state where you live
113 */
114 protected String county;
115 /**
116 * Telephone - Your telephone number
117 */
118 protected String tel;
119 /**
120 * currency - Your prefered currency
121 */
122 protected Integer currency;
123 /**
124 * Bookmark - An URL that this user has bookmarked
125 */
126 protected String bookmark;
127 /**
128 * Last emailed - When was this user last emailed?
129 */
130 protected Timestamp lastemailed;
131
132
133 /**
134 * Retrieves the <code>Age</code> value, without locking,
135 * for this <code>User</code> <code>Persistent</code>.
136 *
137 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
138 * @return the Integer age
139 */
140 public Integer getAge_unsafe() {
141 return age;
142 }
143
144
145 /**
146 * Sets the <code>Age</code> value directly, without checking,
147 * for this User <code>Persistent</code>.
148 *
149 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
150 * @param cooked the pre-validated value to set
151 */
152 public void setAge_unsafe(Integer cooked) {
153 age = cooked;
154 }
155
156 /**
157 * Retrieves the Age value, with locking, for this
158 * <code>User</code> <code>Persistent</code>.
159 * Field description:
160 * Your age
161 *
162 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
163 * @throws AccessPoemException
164 * if the current <code>AccessToken</code>
165 * does not confer write access rights
166 * @return the value of the field <code>Age</code> for this
167 * <code>User</code> <code>Persistent</code>
168 */
169
170 public Integer getAge()
171 throws AccessPoemException {
172 readLock();
173 return getAge_unsafe();
174 }
175
176
177 /**
178 * Sets the <code>Age</code> value, with checking, for this
179 * <code>User</code> <code>Persistent</code>.
180 * Field description:
181 * Your age
182 *
183 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
184 * @param cooked a validated <code>int</code>
185 * @throws AccessPoemException
186 * if the current <code>AccessToken</code>
187 * does not confer write access rights
188 * @throws ValidationPoemException
189 * if the value is not valid
190 */
191 public void setAge(Integer cooked)
192 throws AccessPoemException, ValidationPoemException {
193 _getUserTable().getAgeColumn().
194 getType().assertValidCooked(cooked);
195 writeLock();
196 setAge_unsafe(cooked);
197 }
198
199 /**
200 * Sets the <code>Age</code> value, with checking, for this
201 * <code>User</code> <code>Persistent</code>.
202 * Field description:
203 * Your age
204 *
205 *
206 * Generated by org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods
207 * @param cooked a validated <code>int</code>
208 * @throws AccessPoemException
209 * if the current <code>AccessToken</code>
210 * does not confer write access rights
211 * @throws ValidationPoemException
212 * if the value is not valid
213 */
214
215 public final void setAge(int cooked)
216 throws AccessPoemException, ValidationPoemException {
217 setAge(new Integer(cooked));
218 }
219
220
221 /**
222 * Retrieves the <code>Age</code> value as a <code>Field</code>
223 * from this <code>User</code> <code>Persistent</code>.
224 *
225 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
226 * @throws AccessPoemException
227 * if the current <code>AccessToken</code>
228 * does not confer write access rights
229 * @return the Integer age
230 */
231 public Field<Integer> getAgeField() throws AccessPoemException {
232 Column<Integer> c = _getUserTable().getAgeColumn();
233 return new Field<Integer>((Integer)c.getRaw(this), c);
234 }
235
236
237 /**
238 * Retrieves the <code>Sex</code> value, without locking,
239 * for this <code>User</code> <code>Persistent</code>.
240 *
241 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
242 * @return the Integer sex
243 */
244 public Integer getSex_unsafe() {
245 return sex;
246 }
247
248
249 /**
250 * Sets the <code>Sex</code> value directly, without checking,
251 * for this User <code>Persistent</code>.
252 *
253 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
254 * @param cooked the pre-validated value to set
255 */
256 public void setSex_unsafe(Integer cooked) {
257 sex = cooked;
258 }
259
260 /**
261 * Retrieves the Table Row Object ID.
262 *
263 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
264 * @throws AccessPoemException
265 * if the current <code>AccessToken</code>
266 * does not confer read access rights
267 * @return the TROID as an <code>Integer</code>
268 */
269
270 public Integer getSexTroid()
271 throws AccessPoemException {
272 readLock();
273 return getSex_unsafe();
274 }
275
276
277 /**
278 * Sets the Table Row Object ID.
279 *
280 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
281 * @param raw a Table Row Object Id
282 * @throws AccessPoemException
283 * if the current <code>AccessToken</code>
284 * does not confer write access rights
285 */
286 public void setSexTroid(Integer raw)
287 throws AccessPoemException {
288 setSex(raw == null ? null :
289 getBibliomaniaDatabaseTables().getSexTable().getSexObject(raw));
290 }
291
292
293 /**
294 * Retrieves the <code>Sex</code> object referred to.
295 *
296 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
297 * @throws AccessPoemException
298 * if the current <code>AccessToken</code>
299 * does not confer read access rights
300 * @throws NoSuchRowPoemException
301 * if the <code>Persistent</code> has yet to be allocated a TROID
302 * @return the <code>Sex</code> as a <code>Sex</code>
303 */
304 public Sex getSex()
305 throws AccessPoemException, NoSuchRowPoemException {
306 Integer troid = getSexTroid();
307 return troid == null ? null :
308 getBibliomaniaDatabaseTables().getSexTable().getSexObject(troid);
309 }
310
311
312 /**
313 * Set the Sex.
314 *
315 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
316 * @param cooked a validated <code>Sex</code>
317 * @throws AccessPoemException
318 * if the current <code>AccessToken</code>
319 * does not confer write access rights
320 */
321 public void setSex(Sex cooked)
322 throws AccessPoemException {
323 _getUserTable().
324 getSexColumn().
325 getType().assertValidCooked(cooked);
326 writeLock();
327 if (cooked == null)
328 setSex_unsafe(null);
329 else {
330 cooked.existenceLock();
331 setSex_unsafe(cooked.troid());
332 }
333 }
334
335
336 /**
337 * Retrieves the <code>Sex</code> value as a <code>Field</code>
338 * from this <code>User</code> <code>Persistent</code>.
339 *
340 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
341 * @throws AccessPoemException
342 * if the current <code>AccessToken</code>
343 * does not confer write access rights
344 * @return the Integer sex
345 */
346 public Field<Integer> getSexField() throws AccessPoemException {
347 Column<Integer> c = _getUserTable().getSexColumn();
348 return new Field<Integer>((Integer)c.getRaw(this), c);
349 }
350
351
352 /**
353 * Retrieves the <code>Country</code> value, without locking,
354 * for this <code>User</code> <code>Persistent</code>.
355 *
356 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
357 * @return the Integer country
358 */
359 public Integer getCountry_unsafe() {
360 return country;
361 }
362
363
364 /**
365 * Sets the <code>Country</code> value directly, without checking,
366 * for this User <code>Persistent</code>.
367 *
368 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
369 * @param cooked the pre-validated value to set
370 */
371 public void setCountry_unsafe(Integer cooked) {
372 country = cooked;
373 }
374
375 /**
376 * Retrieves the Table Row Object ID.
377 *
378 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
379 * @throws AccessPoemException
380 * if the current <code>AccessToken</code>
381 * does not confer read access rights
382 * @return the TROID as an <code>Integer</code>
383 */
384
385 public Integer getCountryTroid()
386 throws AccessPoemException {
387 readLock();
388 return getCountry_unsafe();
389 }
390
391
392 /**
393 * Sets the Table Row Object ID.
394 *
395 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
396 * @param raw a Table Row Object Id
397 * @throws AccessPoemException
398 * if the current <code>AccessToken</code>
399 * does not confer write access rights
400 */
401 public void setCountryTroid(Integer raw)
402 throws AccessPoemException {
403 setCountry(raw == null ? null :
404 getBibliomaniaDatabaseTables().getCountryTable().getCountryObject(raw));
405 }
406
407
408 /**
409 * Retrieves the <code>Country</code> object referred to.
410 *
411 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
412 * @throws AccessPoemException
413 * if the current <code>AccessToken</code>
414 * does not confer read access rights
415 * @throws NoSuchRowPoemException
416 * if the <code>Persistent</code> has yet to be allocated a TROID
417 * @return the <code>Country</code> as a <code>Country</code>
418 */
419 public Country getCountry()
420 throws AccessPoemException, NoSuchRowPoemException {
421 Integer troid = getCountryTroid();
422 return troid == null ? null :
423 getBibliomaniaDatabaseTables().getCountryTable().getCountryObject(troid);
424 }
425
426
427 /**
428 * Set the Country.
429 *
430 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
431 * @param cooked a validated <code>Country</code>
432 * @throws AccessPoemException
433 * if the current <code>AccessToken</code>
434 * does not confer write access rights
435 */
436 public void setCountry(Country cooked)
437 throws AccessPoemException {
438 _getUserTable().
439 getCountryColumn().
440 getType().assertValidCooked(cooked);
441 writeLock();
442 if (cooked == null)
443 setCountry_unsafe(null);
444 else {
445 cooked.existenceLock();
446 setCountry_unsafe(cooked.troid());
447 }
448 }
449
450
451 /**
452 * Retrieves the <code>Country</code> value as a <code>Field</code>
453 * from this <code>User</code> <code>Persistent</code>.
454 *
455 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
456 * @throws AccessPoemException
457 * if the current <code>AccessToken</code>
458 * does not confer write access rights
459 * @return the Integer country
460 */
461 public Field<Integer> getCountryField() throws AccessPoemException {
462 Column<Integer> c = _getUserTable().getCountryColumn();
463 return new Field<Integer>((Integer)c.getRaw(this), c);
464 }
465
466
467 /**
468 * Retrieves the <code>Region</code> value, without locking,
469 * for this <code>User</code> <code>Persistent</code>.
470 *
471 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
472 * @return the String region
473 */
474 public String getRegion_unsafe() {
475 return region;
476 }
477
478
479 /**
480 * Sets the <code>Region</code> value directly, without checking,
481 * for this User <code>Persistent</code>.
482 *
483 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
484 * @param cooked the pre-validated value to set
485 */
486 public void setRegion_unsafe(String cooked) {
487 region = cooked;
488 }
489
490 /**
491 * Retrieves the Region value, with locking, for this
492 * <code>User</code> <code>Persistent</code>.
493 * Field description:
494 * Your postal code
495 *
496 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
497 * @throws AccessPoemException
498 * if the current <code>AccessToken</code>
499 * does not confer write access rights
500 * @return the value of the field <code>Region</code> for this
501 * <code>User</code> <code>Persistent</code>
502 */
503
504 public String getRegion()
505 throws AccessPoemException {
506 readLock();
507 return getRegion_unsafe();
508 }
509
510
511 /**
512 * Sets the <code>Region</code> value, with checking, for this
513 * <code>User</code> <code>Persistent</code>.
514 * Field description:
515 * Your postal code
516 *
517 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
518 * @param cooked a validated <code>int</code>
519 * @throws AccessPoemException
520 * if the current <code>AccessToken</code>
521 * does not confer write access rights
522 * @throws ValidationPoemException
523 * if the value is not valid
524 */
525 public void setRegion(String cooked)
526 throws AccessPoemException, ValidationPoemException {
527 _getUserTable().getRegionColumn().
528 getType().assertValidCooked(cooked);
529 writeLock();
530 setRegion_unsafe(cooked);
531 }
532
533
534 /**
535 * Retrieves the <code>Region</code> value as a <code>Field</code>
536 * from this <code>User</code> <code>Persistent</code>.
537 *
538 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
539 * @throws AccessPoemException
540 * if the current <code>AccessToken</code>
541 * does not confer write access rights
542 * @return the String region
543 */
544 public Field<String> getRegionField() throws AccessPoemException {
545 Column<String> c = _getUserTable().getRegionColumn();
546 return new Field<String>((String)c.getRaw(this), c);
547 }
548
549
550 /**
551 * Retrieves the <code>Fulltimeeducation</code> value, without locking,
552 * for this <code>User</code> <code>Persistent</code>.
553 *
554 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
555 * @return the Boolean fulltimeeducation
556 */
557 public Boolean getFulltimeeducation_unsafe() {
558 return fulltimeeducation;
559 }
560
561
562 /**
563 * Sets the <code>Fulltimeeducation</code> value directly, without checking,
564 * for this User <code>Persistent</code>.
565 *
566 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
567 * @param cooked the pre-validated value to set
568 */
569 public void setFulltimeeducation_unsafe(Boolean cooked) {
570 fulltimeeducation = cooked;
571 }
572
573 /**
574 * Retrieves the Fulltimeeducation value, with locking, for this
575 * <code>User</code> <code>Persistent</code>.
576 * Field description:
577 * Whether you are in full-time education
578 *
579 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
580 * @throws AccessPoemException
581 * if the current <code>AccessToken</code>
582 * does not confer write access rights
583 * @return the value of the field <code>Fulltimeeducation</code> for this
584 * <code>User</code> <code>Persistent</code>
585 */
586
587 public Boolean getFulltimeeducation()
588 throws AccessPoemException {
589 readLock();
590 return getFulltimeeducation_unsafe();
591 }
592
593
594 /**
595 * Sets the <code>Fulltimeeducation</code> value, with checking, for this
596 * <code>User</code> <code>Persistent</code>.
597 * Field description:
598 * Whether you are in full-time education
599 *
600 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
601 * @param cooked a validated <code>int</code>
602 * @throws AccessPoemException
603 * if the current <code>AccessToken</code>
604 * does not confer write access rights
605 * @throws ValidationPoemException
606 * if the value is not valid
607 */
608 public void setFulltimeeducation(Boolean cooked)
609 throws AccessPoemException, ValidationPoemException {
610 _getUserTable().getFulltimeeducationColumn().
611 getType().assertValidCooked(cooked);
612 writeLock();
613 setFulltimeeducation_unsafe(cooked);
614 }
615
616 /**
617 * Sets the <code>Fulltimeeducation</code> value, with checking,
618 * from a <code>boolean</code>, for this
619 * <code>User</code> <code>Persistent</code>.
620 * Field description:
621 * Whether you are in full-time education
622 *
623 *
624 * Generated by org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods
625 * @param cooked a <code>boolean</code>
626 * @throws AccessPoemException
627 * if the current <code>AccessToken</code>
628 * does not confer write access rights
629 * @throws ValidationPoemException
630 * if the value is not valid
631 */
632
633 public final void setFulltimeeducation(boolean cooked)
634 throws AccessPoemException, ValidationPoemException {
635 setFulltimeeducation(cooked ? Boolean.TRUE : Boolean.FALSE);
636 }
637
638
639 /**
640 * Retrieves the <code>Fulltimeeducation</code> value as a <code>Field</code>
641 * from this <code>User</code> <code>Persistent</code>.
642 *
643 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
644 * @throws AccessPoemException
645 * if the current <code>AccessToken</code>
646 * does not confer write access rights
647 * @return the Boolean fulltimeeducation
648 */
649 public Field<Boolean> getFulltimeeducationField() throws AccessPoemException {
650 Column<Boolean> c = _getUserTable().getFulltimeeducationColumn();
651 return new Field<Boolean>((Boolean)c.getRaw(this), c);
652 }
653
654
655 /**
656 * Retrieves the <code>Wantemailalerts</code> value, without locking,
657 * for this <code>User</code> <code>Persistent</code>.
658 *
659 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
660 * @return the Boolean wantemailalerts
661 */
662 public Boolean getWantemailalerts_unsafe() {
663 return wantemailalerts;
664 }
665
666
667 /**
668 * Sets the <code>Wantemailalerts</code> value directly, without checking,
669 * for this User <code>Persistent</code>.
670 *
671 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
672 * @param cooked the pre-validated value to set
673 */
674 public void setWantemailalerts_unsafe(Boolean cooked) {
675 wantemailalerts = cooked;
676 }
677
678 /**
679 * Retrieves the Wantemailalerts value, with locking, for this
680 * <code>User</code> <code>Persistent</code>.
681 * Field description:
682 * Whether you want to receive email alerts
683 *
684 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
685 * @throws AccessPoemException
686 * if the current <code>AccessToken</code>
687 * does not confer write access rights
688 * @return the value of the field <code>Wantemailalerts</code> for this
689 * <code>User</code> <code>Persistent</code>
690 */
691
692 public Boolean getWantemailalerts()
693 throws AccessPoemException {
694 readLock();
695 return getWantemailalerts_unsafe();
696 }
697
698
699 /**
700 * Sets the <code>Wantemailalerts</code> value, with checking, for this
701 * <code>User</code> <code>Persistent</code>.
702 * Field description:
703 * Whether you want to receive email alerts
704 *
705 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
706 * @param cooked a validated <code>int</code>
707 * @throws AccessPoemException
708 * if the current <code>AccessToken</code>
709 * does not confer write access rights
710 * @throws ValidationPoemException
711 * if the value is not valid
712 */
713 public void setWantemailalerts(Boolean cooked)
714 throws AccessPoemException, ValidationPoemException {
715 _getUserTable().getWantemailalertsColumn().
716 getType().assertValidCooked(cooked);
717 writeLock();
718 setWantemailalerts_unsafe(cooked);
719 }
720
721 /**
722 * Sets the <code>Wantemailalerts</code> value, with checking,
723 * from a <code>boolean</code>, for this
724 * <code>User</code> <code>Persistent</code>.
725 * Field description:
726 * Whether you want to receive email alerts
727 *
728 *
729 * Generated by org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods
730 * @param cooked a <code>boolean</code>
731 * @throws AccessPoemException
732 * if the current <code>AccessToken</code>
733 * does not confer write access rights
734 * @throws ValidationPoemException
735 * if the value is not valid
736 */
737
738 public final void setWantemailalerts(boolean cooked)
739 throws AccessPoemException, ValidationPoemException {
740 setWantemailalerts(cooked ? Boolean.TRUE : Boolean.FALSE);
741 }
742
743
744 /**
745 * Retrieves the <code>Wantemailalerts</code> value as a <code>Field</code>
746 * from this <code>User</code> <code>Persistent</code>.
747 *
748 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
749 * @throws AccessPoemException
750 * if the current <code>AccessToken</code>
751 * does not confer write access rights
752 * @return the Boolean wantemailalerts
753 */
754 public Field<Boolean> getWantemailalertsField() throws AccessPoemException {
755 Column<Boolean> c = _getUserTable().getWantemailalertsColumn();
756 return new Field<Boolean>((Boolean)c.getRaw(this), c);
757 }
758
759
760 /**
761 * Retrieves the <code>Wantspam</code> value, without locking,
762 * for this <code>User</code> <code>Persistent</code>.
763 *
764 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
765 * @return the Boolean wantspam
766 */
767 public Boolean getWantspam_unsafe() {
768 return wantspam;
769 }
770
771
772 /**
773 * Sets the <code>Wantspam</code> value directly, without checking,
774 * for this User <code>Persistent</code>.
775 *
776 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
777 * @param cooked the pre-validated value to set
778 */
779 public void setWantspam_unsafe(Boolean cooked) {
780 wantspam = cooked;
781 }
782
783 /**
784 * Retrieves the Wantspam value, with locking, for this
785 * <code>User</code> <code>Persistent</code>.
786 * Field description:
787 * Whether you want to receive the bibliomania.com newsletter
788 *
789 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
790 * @throws AccessPoemException
791 * if the current <code>AccessToken</code>
792 * does not confer write access rights
793 * @return the value of the field <code>Wantspam</code> for this
794 * <code>User</code> <code>Persistent</code>
795 */
796
797 public Boolean getWantspam()
798 throws AccessPoemException {
799 readLock();
800 return getWantspam_unsafe();
801 }
802
803
804 /**
805 * Sets the <code>Wantspam</code> value, with checking, for this
806 * <code>User</code> <code>Persistent</code>.
807 * Field description:
808 * Whether you want to receive the bibliomania.com newsletter
809 *
810 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
811 * @param cooked a validated <code>int</code>
812 * @throws AccessPoemException
813 * if the current <code>AccessToken</code>
814 * does not confer write access rights
815 * @throws ValidationPoemException
816 * if the value is not valid
817 */
818 public void setWantspam(Boolean cooked)
819 throws AccessPoemException, ValidationPoemException {
820 _getUserTable().getWantspamColumn().
821 getType().assertValidCooked(cooked);
822 writeLock();
823 setWantspam_unsafe(cooked);
824 }
825
826 /**
827 * Sets the <code>Wantspam</code> value, with checking,
828 * from a <code>boolean</code>, for this
829 * <code>User</code> <code>Persistent</code>.
830 * Field description:
831 * Whether you want to receive the bibliomania.com newsletter
832 *
833 *
834 * Generated by org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods
835 * @param cooked a <code>boolean</code>
836 * @throws AccessPoemException
837 * if the current <code>AccessToken</code>
838 * does not confer write access rights
839 * @throws ValidationPoemException
840 * if the value is not valid
841 */
842
843 public final void setWantspam(boolean cooked)
844 throws AccessPoemException, ValidationPoemException {
845 setWantspam(cooked ? Boolean.TRUE : Boolean.FALSE);
846 }
847
848
849 /**
850 * Retrieves the <code>Wantspam</code> value as a <code>Field</code>
851 * from this <code>User</code> <code>Persistent</code>.
852 *
853 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
854 * @throws AccessPoemException
855 * if the current <code>AccessToken</code>
856 * does not confer write access rights
857 * @return the Boolean wantspam
858 */
859 public Field<Boolean> getWantspamField() throws AccessPoemException {
860 Column<Boolean> c = _getUserTable().getWantspamColumn();
861 return new Field<Boolean>((Boolean)c.getRaw(this), c);
862 }
863
864
865 /**
866 * Retrieves the <code>Dodgeyemail</code> value, without locking,
867 * for this <code>User</code> <code>Persistent</code>.
868 *
869 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
870 * @return the Boolean dodgeyemail
871 */
872 public Boolean getDodgeyemail_unsafe() {
873 return dodgeyemail;
874 }
875
876
877 /**
878 * Sets the <code>Dodgeyemail</code> value directly, without checking,
879 * for this User <code>Persistent</code>.
880 *
881 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
882 * @param cooked the pre-validated value to set
883 */
884 public void setDodgeyemail_unsafe(Boolean cooked) {
885 dodgeyemail = cooked;
886 }
887
888 /**
889 * Retrieves the Dodgeyemail value, with locking, for this
890 * <code>User</code> <code>Persistent</code>.
891 * Field description:
892 * Whether this user has 'Dodgey' email address
893 *
894 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
895 * @throws AccessPoemException
896 * if the current <code>AccessToken</code>
897 * does not confer write access rights
898 * @return the value of the field <code>Dodgeyemail</code> for this
899 * <code>User</code> <code>Persistent</code>
900 */
901
902 public Boolean getDodgeyemail()
903 throws AccessPoemException {
904 readLock();
905 return getDodgeyemail_unsafe();
906 }
907
908
909 /**
910 * Sets the <code>Dodgeyemail</code> value, with checking, for this
911 * <code>User</code> <code>Persistent</code>.
912 * Field description:
913 * Whether this user has 'Dodgey' email address
914 *
915 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
916 * @param cooked a validated <code>int</code>
917 * @throws AccessPoemException
918 * if the current <code>AccessToken</code>
919 * does not confer write access rights
920 * @throws ValidationPoemException
921 * if the value is not valid
922 */
923 public void setDodgeyemail(Boolean cooked)
924 throws AccessPoemException, ValidationPoemException {
925 _getUserTable().getDodgeyemailColumn().
926 getType().assertValidCooked(cooked);
927 writeLock();
928 setDodgeyemail_unsafe(cooked);
929 }
930
931 /**
932 * Sets the <code>Dodgeyemail</code> value, with checking,
933 * from a <code>boolean</code>, for this
934 * <code>User</code> <code>Persistent</code>.
935 * Field description:
936 * Whether this user has 'Dodgey' email address
937 *
938 *
939 * Generated by org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods
940 * @param cooked a <code>boolean</code>
941 * @throws AccessPoemException
942 * if the current <code>AccessToken</code>
943 * does not confer write access rights
944 * @throws ValidationPoemException
945 * if the value is not valid
946 */
947
948 public final void setDodgeyemail(boolean cooked)
949 throws AccessPoemException, ValidationPoemException {
950 setDodgeyemail(cooked ? Boolean.TRUE : Boolean.FALSE);
951 }
952
953
954 /**
955 * Retrieves the <code>Dodgeyemail</code> value as a <code>Field</code>
956 * from this <code>User</code> <code>Persistent</code>.
957 *
958 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
959 * @throws AccessPoemException
960 * if the current <code>AccessToken</code>
961 * does not confer write access rights
962 * @return the Boolean dodgeyemail
963 */
964 public Field<Boolean> getDodgeyemailField() throws AccessPoemException {
965 Column<Boolean> c = _getUserTable().getDodgeyemailColumn();
966 return new Field<Boolean>((Boolean)c.getRaw(this), c);
967 }
968
969
970 /**
971 * Retrieves the <code>Address</code> value, without locking,
972 * for this <code>User</code> <code>Persistent</code>.
973 *
974 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
975 * @return the String address
976 */
977 public String getAddress_unsafe() {
978 return address;
979 }
980
981
982 /**
983 * Sets the <code>Address</code> value directly, without checking,
984 * for this User <code>Persistent</code>.
985 *
986 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
987 * @param cooked the pre-validated value to set
988 */
989 public void setAddress_unsafe(String cooked) {
990 address = cooked;
991 }
992
993 /**
994 * Retrieves the Address value, with locking, for this
995 * <code>User</code> <code>Persistent</code>.
996 * Field description:
997 * Your address
998 *
999 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1000 * @throws AccessPoemException
1001 * if the current <code>AccessToken</code>
1002 * does not confer write access rights
1003 * @return the value of the field <code>Address</code> for this
1004 * <code>User</code> <code>Persistent</code>
1005 */
1006
1007 public String getAddress()
1008 throws AccessPoemException {
1009 readLock();
1010 return getAddress_unsafe();
1011 }
1012
1013
1014 /**
1015 * Sets the <code>Address</code> value, with checking, for this
1016 * <code>User</code> <code>Persistent</code>.
1017 * Field description:
1018 * Your address
1019 *
1020 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1021 * @param cooked a validated <code>int</code>
1022 * @throws AccessPoemException
1023 * if the current <code>AccessToken</code>
1024 * does not confer write access rights
1025 * @throws ValidationPoemException
1026 * if the value is not valid
1027 */
1028 public void setAddress(String cooked)
1029 throws AccessPoemException, ValidationPoemException {
1030 _getUserTable().getAddressColumn().
1031 getType().assertValidCooked(cooked);
1032 writeLock();
1033 setAddress_unsafe(cooked);
1034 }
1035
1036
1037 /**
1038 * Retrieves the <code>Address</code> value as a <code>Field</code>
1039 * from this <code>User</code> <code>Persistent</code>.
1040 *
1041 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
1042 * @throws AccessPoemException
1043 * if the current <code>AccessToken</code>
1044 * does not confer write access rights
1045 * @return the String address
1046 */
1047 public Field<String> getAddressField() throws AccessPoemException {
1048 Column<String> c = _getUserTable().getAddressColumn();
1049 return new Field<String>((String)c.getRaw(this), c);
1050 }
1051
1052
1053 /**
1054 * Retrieves the <code>Town</code> value, without locking,
1055 * for this <code>User</code> <code>Persistent</code>.
1056 *
1057 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1058 * @return the String town
1059 */
1060 public String getTown_unsafe() {
1061 return town;
1062 }
1063
1064
1065 /**
1066 * Sets the <code>Town</code> value directly, without checking,
1067 * for this User <code>Persistent</code>.
1068 *
1069 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1070 * @param cooked the pre-validated value to set
1071 */
1072 public void setTown_unsafe(String cooked) {
1073 town = cooked;
1074 }
1075
1076 /**
1077 * Retrieves the Town value, with locking, for this
1078 * <code>User</code> <code>Persistent</code>.
1079 * Field description:
1080 * The town / city where you live
1081 *
1082 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1083 * @throws AccessPoemException
1084 * if the current <code>AccessToken</code>
1085 * does not confer write access rights
1086 * @return the value of the field <code>Town</code> for this
1087 * <code>User</code> <code>Persistent</code>
1088 */
1089
1090 public String getTown()
1091 throws AccessPoemException {
1092 readLock();
1093 return getTown_unsafe();
1094 }
1095
1096
1097 /**
1098 * Sets the <code>Town</code> value, with checking, for this
1099 * <code>User</code> <code>Persistent</code>.
1100 * Field description:
1101 * The town / city where you live
1102 *
1103 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1104 * @param cooked a validated <code>int</code>
1105 * @throws AccessPoemException
1106 * if the current <code>AccessToken</code>
1107 * does not confer write access rights
1108 * @throws ValidationPoemException
1109 * if the value is not valid
1110 */
1111 public void setTown(String cooked)
1112 throws AccessPoemException, ValidationPoemException {
1113 _getUserTable().getTownColumn().
1114 getType().assertValidCooked(cooked);
1115 writeLock();
1116 setTown_unsafe(cooked);
1117 }
1118
1119
1120 /**
1121 * Retrieves the <code>Town</code> value as a <code>Field</code>
1122 * from this <code>User</code> <code>Persistent</code>.
1123 *
1124 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
1125 * @throws AccessPoemException
1126 * if the current <code>AccessToken</code>
1127 * does not confer write access rights
1128 * @return the String town
1129 */
1130 public Field<String> getTownField() throws AccessPoemException {
1131 Column<String> c = _getUserTable().getTownColumn();
1132 return new Field<String>((String)c.getRaw(this), c);
1133 }
1134
1135
1136 /**
1137 * Retrieves the <code>County</code> value, without locking,
1138 * for this <code>User</code> <code>Persistent</code>.
1139 *
1140 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1141 * @return the String county
1142 */
1143 public String getCounty_unsafe() {
1144 return county;
1145 }
1146
1147
1148 /**
1149 * Sets the <code>County</code> value directly, without checking,
1150 * for this User <code>Persistent</code>.
1151 *
1152 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1153 * @param cooked the pre-validated value to set
1154 */
1155 public void setCounty_unsafe(String cooked) {
1156 county = cooked;
1157 }
1158
1159 /**
1160 * Retrieves the County value, with locking, for this
1161 * <code>User</code> <code>Persistent</code>.
1162 * Field description:
1163 * The county / state where you live
1164 *
1165 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1166 * @throws AccessPoemException
1167 * if the current <code>AccessToken</code>
1168 * does not confer write access rights
1169 * @return the value of the field <code>County</code> for this
1170 * <code>User</code> <code>Persistent</code>
1171 */
1172
1173 public String getCounty()
1174 throws AccessPoemException {
1175 readLock();
1176 return getCounty_unsafe();
1177 }
1178
1179
1180 /**
1181 * Sets the <code>County</code> value, with checking, for this
1182 * <code>User</code> <code>Persistent</code>.
1183 * Field description:
1184 * The county / state where you live
1185 *
1186 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1187 * @param cooked a validated <code>int</code>
1188 * @throws AccessPoemException
1189 * if the current <code>AccessToken</code>
1190 * does not confer write access rights
1191 * @throws ValidationPoemException
1192 * if the value is not valid
1193 */
1194 public void setCounty(String cooked)
1195 throws AccessPoemException, ValidationPoemException {
1196 _getUserTable().getCountyColumn().
1197 getType().assertValidCooked(cooked);
1198 writeLock();
1199 setCounty_unsafe(cooked);
1200 }
1201
1202
1203 /**
1204 * Retrieves the <code>County</code> value as a <code>Field</code>
1205 * from this <code>User</code> <code>Persistent</code>.
1206 *
1207 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
1208 * @throws AccessPoemException
1209 * if the current <code>AccessToken</code>
1210 * does not confer write access rights
1211 * @return the String county
1212 */
1213 public Field<String> getCountyField() throws AccessPoemException {
1214 Column<String> c = _getUserTable().getCountyColumn();
1215 return new Field<String>((String)c.getRaw(this), c);
1216 }
1217
1218
1219 /**
1220 * Retrieves the <code>Tel</code> value, without locking,
1221 * for this <code>User</code> <code>Persistent</code>.
1222 *
1223 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1224 * @return the String tel
1225 */
1226 public String getTel_unsafe() {
1227 return tel;
1228 }
1229
1230
1231 /**
1232 * Sets the <code>Tel</code> value directly, without checking,
1233 * for this User <code>Persistent</code>.
1234 *
1235 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1236 * @param cooked the pre-validated value to set
1237 */
1238 public void setTel_unsafe(String cooked) {
1239 tel = cooked;
1240 }
1241
1242 /**
1243 * Retrieves the Tel value, with locking, for this
1244 * <code>User</code> <code>Persistent</code>.
1245 * Field description:
1246 * Your telephone number
1247 *
1248 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1249 * @throws AccessPoemException
1250 * if the current <code>AccessToken</code>
1251 * does not confer write access rights
1252 * @return the value of the field <code>Tel</code> for this
1253 * <code>User</code> <code>Persistent</code>
1254 */
1255
1256 public String getTel()
1257 throws AccessPoemException {
1258 readLock();
1259 return getTel_unsafe();
1260 }
1261
1262
1263 /**
1264 * Sets the <code>Tel</code> value, with checking, for this
1265 * <code>User</code> <code>Persistent</code>.
1266 * Field description:
1267 * Your telephone number
1268 *
1269 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1270 * @param cooked a validated <code>int</code>
1271 * @throws AccessPoemException
1272 * if the current <code>AccessToken</code>
1273 * does not confer write access rights
1274 * @throws ValidationPoemException
1275 * if the value is not valid
1276 */
1277 public void setTel(String cooked)
1278 throws AccessPoemException, ValidationPoemException {
1279 _getUserTable().getTelColumn().
1280 getType().assertValidCooked(cooked);
1281 writeLock();
1282 setTel_unsafe(cooked);
1283 }
1284
1285
1286 /**
1287 * Retrieves the <code>Tel</code> value as a <code>Field</code>
1288 * from this <code>User</code> <code>Persistent</code>.
1289 *
1290 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
1291 * @throws AccessPoemException
1292 * if the current <code>AccessToken</code>
1293 * does not confer write access rights
1294 * @return the String tel
1295 */
1296 public Field<String> getTelField() throws AccessPoemException {
1297 Column<String> c = _getUserTable().getTelColumn();
1298 return new Field<String>((String)c.getRaw(this), c);
1299 }
1300
1301
1302 /**
1303 * Retrieves the <code>Currency</code> value, without locking,
1304 * for this <code>User</code> <code>Persistent</code>.
1305 *
1306 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1307 * @return the Integer currency
1308 */
1309 public Integer getCurrency_unsafe() {
1310 return currency;
1311 }
1312
1313
1314 /**
1315 * Sets the <code>Currency</code> value directly, without checking,
1316 * for this User <code>Persistent</code>.
1317 *
1318 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1319 * @param cooked the pre-validated value to set
1320 */
1321 public void setCurrency_unsafe(Integer cooked) {
1322 currency = cooked;
1323 }
1324
1325 /**
1326 * Retrieves the Table Row Object ID.
1327 *
1328 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
1329 * @throws AccessPoemException
1330 * if the current <code>AccessToken</code>
1331 * does not confer read access rights
1332 * @return the TROID as an <code>Integer</code>
1333 */
1334
1335 public Integer getCurrencyTroid()
1336 throws AccessPoemException {
1337 readLock();
1338 return getCurrency_unsafe();
1339 }
1340
1341
1342 /**
1343 * Sets the Table Row Object ID.
1344 *
1345 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
1346 * @param raw a Table Row Object Id
1347 * @throws AccessPoemException
1348 * if the current <code>AccessToken</code>
1349 * does not confer write access rights
1350 */
1351 public void setCurrencyTroid(Integer raw)
1352 throws AccessPoemException {
1353 setCurrency(raw == null ? null :
1354 getBibliomaniaDatabaseTables().getCurrencyTable().getCurrencyObject(raw));
1355 }
1356
1357
1358 /**
1359 * Retrieves the <code>Currency</code> object referred to.
1360 *
1361 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
1362 * @throws AccessPoemException
1363 * if the current <code>AccessToken</code>
1364 * does not confer read access rights
1365 * @throws NoSuchRowPoemException
1366 * if the <code>Persistent</code> has yet to be allocated a TROID
1367 * @return the <code>Currency</code> as a <code>Currency</code>
1368 */
1369 public Currency getCurrency()
1370 throws AccessPoemException, NoSuchRowPoemException {
1371 Integer troid = getCurrencyTroid();
1372 return troid == null ? null :
1373 getBibliomaniaDatabaseTables().getCurrencyTable().getCurrencyObject(troid);
1374 }
1375
1376
1377 /**
1378 * Set the Currency.
1379 *
1380 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
1381 * @param cooked a validated <code>Currency</code>
1382 * @throws AccessPoemException
1383 * if the current <code>AccessToken</code>
1384 * does not confer write access rights
1385 */
1386 public void setCurrency(Currency cooked)
1387 throws AccessPoemException {
1388 _getUserTable().
1389 getCurrencyColumn().
1390 getType().assertValidCooked(cooked);
1391 writeLock();
1392 if (cooked == null)
1393 setCurrency_unsafe(null);
1394 else {
1395 cooked.existenceLock();
1396 setCurrency_unsafe(cooked.troid());
1397 }
1398 }
1399
1400
1401 /**
1402 * Retrieves the <code>Currency</code> value as a <code>Field</code>
1403 * from this <code>User</code> <code>Persistent</code>.
1404 *
1405 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
1406 * @throws AccessPoemException
1407 * if the current <code>AccessToken</code>
1408 * does not confer write access rights
1409 * @return the Integer currency
1410 */
1411 public Field<Integer> getCurrencyField() throws AccessPoemException {
1412 Column<Integer> c = _getUserTable().getCurrencyColumn();
1413 return new Field<Integer>((Integer)c.getRaw(this), c);
1414 }
1415
1416
1417 /**
1418 * Retrieves the <code>Bookmark</code> value, without locking,
1419 * for this <code>User</code> <code>Persistent</code>.
1420 *
1421 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1422 * @return the String bookmark
1423 */
1424 public String getBookmark_unsafe() {
1425 return bookmark;
1426 }
1427
1428
1429 /**
1430 * Sets the <code>Bookmark</code> value directly, without checking,
1431 * for this User <code>Persistent</code>.
1432 *
1433 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1434 * @param cooked the pre-validated value to set
1435 */
1436 public void setBookmark_unsafe(String cooked) {
1437 bookmark = cooked;
1438 }
1439
1440 /**
1441 * Retrieves the Bookmark value, with locking, for this
1442 * <code>User</code> <code>Persistent</code>.
1443 * Field description:
1444 * An URL that this user has bookmarked
1445 *
1446 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1447 * @throws AccessPoemException
1448 * if the current <code>AccessToken</code>
1449 * does not confer write access rights
1450 * @return the value of the field <code>Bookmark</code> for this
1451 * <code>User</code> <code>Persistent</code>
1452 */
1453
1454 public String getBookmark()
1455 throws AccessPoemException {
1456 readLock();
1457 return getBookmark_unsafe();
1458 }
1459
1460
1461 /**
1462 * Sets the <code>Bookmark</code> value, with checking, for this
1463 * <code>User</code> <code>Persistent</code>.
1464 * Field description:
1465 * An URL that this user has bookmarked
1466 *
1467 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1468 * @param cooked a validated <code>int</code>
1469 * @throws AccessPoemException
1470 * if the current <code>AccessToken</code>
1471 * does not confer write access rights
1472 * @throws ValidationPoemException
1473 * if the value is not valid
1474 */
1475 public void setBookmark(String cooked)
1476 throws AccessPoemException, ValidationPoemException {
1477 _getUserTable().getBookmarkColumn().
1478 getType().assertValidCooked(cooked);
1479 writeLock();
1480 setBookmark_unsafe(cooked);
1481 }
1482
1483
1484 /**
1485 * Retrieves the <code>Bookmark</code> value as a <code>Field</code>
1486 * from this <code>User</code> <code>Persistent</code>.
1487 *
1488 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
1489 * @throws AccessPoemException
1490 * if the current <code>AccessToken</code>
1491 * does not confer write access rights
1492 * @return the String bookmark
1493 */
1494 public Field<String> getBookmarkField() throws AccessPoemException {
1495 Column<String> c = _getUserTable().getBookmarkColumn();
1496 return new Field<String>((String)c.getRaw(this), c);
1497 }
1498
1499
1500 /**
1501 * Retrieves the <code>Lastemailed</code> value, without locking,
1502 * for this <code>User</code> <code>Persistent</code>.
1503 *
1504 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1505 * @return the Timestamp lastemailed
1506 */
1507 public Timestamp getLastemailed_unsafe() {
1508 return lastemailed;
1509 }
1510
1511
1512 /**
1513 * Sets the <code>Lastemailed</code> value directly, without checking,
1514 * for this User <code>Persistent</code>.
1515 *
1516 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
1517 * @param cooked the pre-validated value to set
1518 */
1519 public void setLastemailed_unsafe(Timestamp cooked) {
1520 lastemailed = cooked;
1521 }
1522
1523 /**
1524 * Retrieves the Lastemailed value, with locking, for this
1525 * <code>User</code> <code>Persistent</code>.
1526 * Field description:
1527 * When was this user last emailed?
1528 *
1529 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1530 * @throws AccessPoemException
1531 * if the current <code>AccessToken</code>
1532 * does not confer write access rights
1533 * @return the value of the field <code>Lastemailed</code> for this
1534 * <code>User</code> <code>Persistent</code>
1535 */
1536
1537 public Timestamp getLastemailed()
1538 throws AccessPoemException {
1539 readLock();
1540 return getLastemailed_unsafe();
1541 }
1542
1543
1544 /**
1545 * Sets the <code>Lastemailed</code> value, with checking, for this
1546 * <code>User</code> <code>Persistent</code>.
1547 * Field description:
1548 * When was this user last emailed?
1549 *
1550 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
1551 * @param cooked a validated <code>int</code>
1552 * @throws AccessPoemException
1553 * if the current <code>AccessToken</code>
1554 * does not confer write access rights
1555 * @throws ValidationPoemException
1556 * if the value is not valid
1557 */
1558 public void setLastemailed(Timestamp cooked)
1559 throws AccessPoemException, ValidationPoemException {
1560 _getUserTable().getLastemailedColumn().
1561 getType().assertValidCooked(cooked);
1562 writeLock();
1563 setLastemailed_unsafe(cooked);
1564 }
1565
1566
1567 /**
1568 * Retrieves the <code>Lastemailed</code> value as a <code>Field</code>
1569 * from this <code>User</code> <code>Persistent</code>.
1570 *
1571 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
1572 * @throws AccessPoemException
1573 * if the current <code>AccessToken</code>
1574 * does not confer write access rights
1575 * @return the Timestamp lastemailed
1576 */
1577 public Field<Timestamp> getLastemailedField() throws AccessPoemException {
1578 Column<Timestamp> c = _getUserTable().getLastemailedColumn();
1579 return new Field<Timestamp>((Timestamp)c.getRaw(this), c);
1580 }
1581
1582 private CachedSelection<GroupMembership> userGroupMemberships = null;
1583 /** References to this User in the GroupMembership table via its user field.*/
1584 @SuppressWarnings("unchecked")
1585 public Enumeration<GroupMembership> getUserGroupMemberships() {
1586 if (getTroid() == null)
1587 return new EmptyEnumeration<GroupMembership>();
1588 else {
1589 if (userGroupMemberships == null)
1590 userGroupMemberships =
1591 getBibliomaniaDatabaseTables().getGroupMembershipTable().getUserColumn().cachedSelectionWhereEq(getTroid());
1592 return userGroupMemberships.objects();
1593 }
1594 }
1595
1596
1597 /** References to this User in the GroupMembership table via its user field, as a List.*/
1598 public List<GroupMembership> getUserGroupMembershipList() {
1599 return Collections.list(getUserGroupMemberships());
1600 }
1601
1602
1603
1604 private CachedSelection<Subscription> userSubscriptions = null;
1605 /** References to this User in the Subscription table via its user field.*/
1606 @SuppressWarnings("unchecked")
1607 public Enumeration<Subscription> getUserSubscriptions() {
1608 if (getTroid() == null)
1609 return new EmptyEnumeration<Subscription>();
1610 else {
1611 if (userSubscriptions == null)
1612 userSubscriptions =
1613 getBibliomaniaDatabaseTables().getSubscriptionTable().getUserColumn().cachedSelectionWhereEq(getTroid());
1614 return userSubscriptions.objects();
1615 }
1616 }
1617
1618
1619 /** References to this User in the Subscription table via its user field, as a List.*/
1620 public List<Subscription> getUserSubscriptionList() {
1621 return Collections.list(getUserSubscriptions());
1622 }
1623
1624
1625
1626 private CachedSelection<Message> authorMessages = null;
1627 /** References to this User in the Message table via its author field.*/
1628 @SuppressWarnings("unchecked")
1629 public Enumeration<Message> getAuthorMessages() {
1630 if (getTroid() == null)
1631 return new EmptyEnumeration<Message>();
1632 else {
1633 if (authorMessages == null)
1634 authorMessages =
1635 getBibliomaniaDatabaseTables().getMessageTable().getAuthorColumn().cachedSelectionWhereEq(getTroid());
1636 return authorMessages.objects();
1637 }
1638 }
1639
1640
1641 /** References to this User in the Message table via its author field, as a List.*/
1642 public List<Message> getAuthorMessageList() {
1643 return Collections.list(getAuthorMessages());
1644 }
1645
1646
1647
1648 private CachedSelection<DownloadEvent> userDownloadEvents = null;
1649 /** References to this User in the DownloadEvent table via its user field.*/
1650 @SuppressWarnings("unchecked")
1651 public Enumeration<DownloadEvent> getUserDownloadEvents() {
1652 if (getTroid() == null)
1653 return new EmptyEnumeration<DownloadEvent>();
1654 else {
1655 if (userDownloadEvents == null)
1656 userDownloadEvents =
1657 getBibliomaniaDatabaseTables().getDownloadEventTable().getUserColumn().cachedSelectionWhereEq(getTroid());
1658 return userDownloadEvents.objects();
1659 }
1660 }
1661
1662
1663 /** References to this User in the DownloadEvent table via its user field, as a List.*/
1664 public List<DownloadEvent> getUserDownloadEventList() {
1665 return Collections.list(getUserDownloadEvents());
1666 }
1667
1668
1669
1670 private CachedSelection<ShopOrder> userShopOrders = null;
1671 /** References to this User in the ShopOrder table via its user field.*/
1672 @SuppressWarnings("unchecked")
1673 public Enumeration<ShopOrder> getUserShopOrders() {
1674 if (getTroid() == null)
1675 return new EmptyEnumeration<ShopOrder>();
1676 else {
1677 if (userShopOrders == null)
1678 userShopOrders =
1679 getBibliomaniaDatabaseTables().getShopOrderTable().getUserColumn().cachedSelectionWhereEq(getTroid());
1680 return userShopOrders.objects();
1681 }
1682 }
1683
1684
1685 /** References to this User in the ShopOrder table via its user field, as a List.*/
1686 public List<ShopOrder> getUserShopOrderList() {
1687 return Collections.list(getUserShopOrders());
1688 }
1689
1690
1691
1692 private CachedSelection<ShopOrderItem> userShopOrderItems = null;
1693 /** References to this User in the ShopOrderItem table via its user field.*/
1694 @SuppressWarnings("unchecked")
1695 public Enumeration<ShopOrderItem> getUserShopOrderItems() {
1696 if (getTroid() == null)
1697 return new EmptyEnumeration<ShopOrderItem>();
1698 else {
1699 if (userShopOrderItems == null)
1700 userShopOrderItems =
1701 getBibliomaniaDatabaseTables().getShopOrderItemTable().getUserColumn().cachedSelectionWhereEq(getTroid());
1702 return userShopOrderItems.objects();
1703 }
1704 }
1705
1706
1707 /** References to this User in the ShopOrderItem table via its user field, as a List.*/
1708 public List<ShopOrderItem> getUserShopOrderItemList() {
1709 return Collections.list(getUserShopOrderItems());
1710 }
1711
1712
1713
1714 private CachedSelection<CampaignUser> userCampaignUsers = null;
1715 /** References to this User in the CampaignUser table via its user field.*/
1716 @SuppressWarnings("unchecked")
1717 public Enumeration<CampaignUser> getUserCampaignUsers() {
1718 if (getTroid() == null)
1719 return new EmptyEnumeration<CampaignUser>();
1720 else {
1721 if (userCampaignUsers == null)
1722 userCampaignUsers =
1723 getBibliomaniaDatabaseTables().getCampaignUserTable().getUserColumn().cachedSelectionWhereEq(getTroid());
1724 return userCampaignUsers.objects();
1725 }
1726 }
1727
1728
1729 /** References to this User in the CampaignUser table via its user field, as a List.*/
1730 public List<CampaignUser> getUserCampaignUserList() {
1731 return Collections.list(getUserCampaignUsers());
1732 }
1733
1734
1735
1736 }
1737