1 // Do not edit this file! It was generated by Melati POEM's DSD preprocessor.
2
3 package org.melati.example.contacts.generated;
4
5
6 import java.sql.Date;
7 import java.util.Collections;
8 import java.util.Enumeration;
9 import java.util.List;
10 import org.melati.example.contacts.Contact;
11 import org.melati.example.contacts.ContactCategory;
12 import org.melati.example.contacts.ContactTable;
13 import org.melati.example.contacts.ContactsDatabaseTables;
14 import org.melati.poem.AccessPoemException;
15 import org.melati.poem.CachedSelection;
16 import org.melati.poem.Column;
17 import org.melati.poem.Field;
18 import org.melati.poem.JdbcPersistent;
19 import org.melati.poem.NoSuchRowPoemException;
20 import org.melati.poem.User;
21 import org.melati.poem.ValidationPoemException;
22 import org.melati.poem.util.EmptyEnumeration;
23
24
25 /**
26 * Melati POEM generated abstract base class for a <code>Persistent</code>
27 * <code>Contact</code> Object.
28 *
29 * See org.melati.poem.prepro.TableDef#generatePersistentBaseJava
30 */
31 public abstract class ContactBase extends JdbcPersistent {
32
33
34 /**
35 * Retrieves the Database object.
36 *
37 * See org.melati.poem.prepro.TableDef#generatePersistentBaseJava
38 * @return the database
39 */
40 public ContactsDatabaseTables getContactsDatabaseTables() {
41 return (ContactsDatabaseTables)getDatabase();
42 }
43
44
45 /**
46 * Retrieves the <code>ContactTable</code> table
47 * which this <code>Persistent</code> is from.
48 *
49 * See org.melati.poem.prepro.TableDef#generatePersistentBaseJava
50 * @return the ContactTable
51 */
52 @SuppressWarnings("unchecked")
53 public ContactTable<Contact> getContactTable() {
54 return (ContactTable<Contact>)getTable();
55 }
56
57 @SuppressWarnings("unchecked")
58 private ContactTable<Contact> _getContactTable() {
59 return (ContactTable<Contact>)getTable();
60 }
61
62 // Fields in this table
63 /**
64 * id
65 */
66 protected Integer id;
67 /**
68 * name - Contact Name
69 */
70 protected String name;
71 /**
72 * owner - Contact who owns this contact
73 */
74 protected Integer owner;
75 /**
76 * address - Contact Address
77 */
78 protected String address;
79 /**
80 * updates - How many times has this record been updated?
81 */
82 protected Integer updates;
83 /**
84 * lastupdated - When was this last updated?
85 */
86 protected Date lastupdated;
87 /**
88 * lastupdateuser - Who last updated this?
89 */
90 protected Integer lastupdateuser;
91
92
93 /**
94 * Retrieves the <code>Id</code> value, without locking,
95 * for this <code>Contact</code> <code>Persistent</code>.
96 *
97 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
98 * @return the Integer id
99 */
100 public Integer getId_unsafe() {
101 return id;
102 }
103
104
105 /**
106 * Sets the <code>Id</code> value directly, without checking,
107 * for this Contact <code>Persistent</code>.
108 *
109 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
110 * @param cooked the pre-validated value to set
111 */
112 public void setId_unsafe(Integer cooked) {
113 id = cooked;
114 }
115
116 /**
117 * Retrieves the Id value, with locking, for this
118 * <code>Contact</code> <code>Persistent</code>.
119 *
120 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
121 * @throws AccessPoemException
122 * if the current <code>AccessToken</code>
123 * does not confer write access rights
124 * @return the value of the field <code>Id</code> for this
125 * <code>Contact</code> <code>Persistent</code>
126 */
127
128 public Integer getId()
129 throws AccessPoemException {
130 readLock();
131 return getId_unsafe();
132 }
133
134
135 /**
136 * Sets the <code>Id</code> value, with checking, for this
137 * <code>Contact</code> <code>Persistent</code>.
138 *
139 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
140 * @param cooked a validated <code>int</code>
141 * @throws AccessPoemException
142 * if the current <code>AccessToken</code>
143 * does not confer write access rights
144 * @throws ValidationPoemException
145 * if the value is not valid
146 */
147 public void setId(Integer cooked)
148 throws AccessPoemException, ValidationPoemException {
149 _getContactTable().getIdColumn().
150 getType().assertValidCooked(cooked);
151 writeLock();
152 setId_unsafe(cooked);
153 }
154
155 /**
156 * Sets the <code>Id</code> value, with checking, for this
157 * <code>Contact</code> <code>Persistent</code>.
158 *
159 * Generated by org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods
160 * @param cooked a validated <code>int</code>
161 * @throws AccessPoemException
162 * if the current <code>AccessToken</code>
163 * does not confer write access rights
164 * @throws ValidationPoemException
165 * if the value is not valid
166 */
167
168 public final void setId(int cooked)
169 throws AccessPoemException, ValidationPoemException {
170 setId(new Integer(cooked));
171 }
172
173
174 /**
175 * Retrieves the <code>Id</code> value as a <code>Field</code>
176 * from this <code>Contact</code> <code>Persistent</code>.
177 *
178 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
179 * @throws AccessPoemException
180 * if the current <code>AccessToken</code>
181 * does not confer write access rights
182 * @return the Integer id
183 */
184 public Field<Integer> getIdField() throws AccessPoemException {
185 Column<Integer> c = _getContactTable().getIdColumn();
186 return new Field<Integer>((Integer)c.getRaw(this), c);
187 }
188
189
190 /**
191 * Retrieves the <code>Name</code> value, without locking,
192 * for this <code>Contact</code> <code>Persistent</code>.
193 *
194 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
195 * @return the String name
196 */
197 public String getName_unsafe() {
198 return name;
199 }
200
201
202 /**
203 * Sets the <code>Name</code> value directly, without checking,
204 * for this Contact <code>Persistent</code>.
205 *
206 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
207 * @param cooked the pre-validated value to set
208 */
209 public void setName_unsafe(String cooked) {
210 name = cooked;
211 }
212
213 /**
214 * Retrieves the Name value, with locking, for this
215 * <code>Contact</code> <code>Persistent</code>.
216 * Field description:
217 * Contact Name
218 *
219 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
220 * @throws AccessPoemException
221 * if the current <code>AccessToken</code>
222 * does not confer write access rights
223 * @return the value of the field <code>Name</code> for this
224 * <code>Contact</code> <code>Persistent</code>
225 */
226
227 public String getName()
228 throws AccessPoemException {
229 readLock();
230 return getName_unsafe();
231 }
232
233
234 /**
235 * Sets the <code>Name</code> value, with checking, for this
236 * <code>Contact</code> <code>Persistent</code>.
237 * Field description:
238 * Contact Name
239 *
240 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
241 * @param cooked a validated <code>int</code>
242 * @throws AccessPoemException
243 * if the current <code>AccessToken</code>
244 * does not confer write access rights
245 * @throws ValidationPoemException
246 * if the value is not valid
247 */
248 public void setName(String cooked)
249 throws AccessPoemException, ValidationPoemException {
250 _getContactTable().getNameColumn().
251 getType().assertValidCooked(cooked);
252 writeLock();
253 setName_unsafe(cooked);
254 }
255
256
257 /**
258 * Retrieves the <code>Name</code> value as a <code>Field</code>
259 * from this <code>Contact</code> <code>Persistent</code>.
260 *
261 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
262 * @throws AccessPoemException
263 * if the current <code>AccessToken</code>
264 * does not confer write access rights
265 * @return the String name
266 */
267 public Field<String> getNameField() throws AccessPoemException {
268 Column<String> c = _getContactTable().getNameColumn();
269 return new Field<String>((String)c.getRaw(this), c);
270 }
271
272
273 /**
274 * Retrieves the <code>Owner</code> value, without locking,
275 * for this <code>Contact</code> <code>Persistent</code>.
276 *
277 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
278 * @return the Integer owner
279 */
280 public Integer getOwner_unsafe() {
281 return owner;
282 }
283
284
285 /**
286 * Sets the <code>Owner</code> value directly, without checking,
287 * for this Contact <code>Persistent</code>.
288 *
289 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
290 * @param cooked the pre-validated value to set
291 */
292 public void setOwner_unsafe(Integer cooked) {
293 owner = cooked;
294 }
295
296 /**
297 * Retrieves the Table Row Object ID.
298 *
299 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
300 * @throws AccessPoemException
301 * if the current <code>AccessToken</code>
302 * does not confer read access rights
303 * @return the TROID as an <code>Integer</code>
304 */
305
306 public Integer getOwnerTroid()
307 throws AccessPoemException {
308 readLock();
309 return getOwner_unsafe();
310 }
311
312
313 /**
314 * Sets the Table Row Object ID.
315 *
316 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
317 * @param raw a Table Row Object Id
318 * @throws AccessPoemException
319 * if the current <code>AccessToken</code>
320 * does not confer write access rights
321 */
322 public void setOwnerTroid(Integer raw)
323 throws AccessPoemException {
324 setOwner(raw == null ? null :
325 getContactsDatabaseTables().getContactTable().getContactObject(raw));
326 }
327
328
329 /**
330 * Retrieves the <code>Owner</code> object referred to.
331 *
332 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
333 * @throws AccessPoemException
334 * if the current <code>AccessToken</code>
335 * does not confer read access rights
336 * @throws NoSuchRowPoemException
337 * if the <code>Persistent</code> has yet to be allocated a TROID
338 * @return the <code>Owner</code> as a <code>Contact</code>
339 */
340 public Contact getOwner()
341 throws AccessPoemException, NoSuchRowPoemException {
342 Integer troid = getOwnerTroid();
343 return troid == null ? null :
344 getContactsDatabaseTables().getContactTable().getContactObject(troid);
345 }
346
347
348 /**
349 * Set the Owner.
350 *
351 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
352 * @param cooked a validated <code>Contact</code>
353 * @throws AccessPoemException
354 * if the current <code>AccessToken</code>
355 * does not confer write access rights
356 */
357 public void setOwner(Contact cooked)
358 throws AccessPoemException {
359 _getContactTable().
360 getOwnerColumn().
361 getType().assertValidCooked(cooked);
362 writeLock();
363 if (cooked == null)
364 setOwner_unsafe(null);
365 else {
366 cooked.existenceLock();
367 setOwner_unsafe(cooked.troid());
368 }
369 }
370
371
372 /**
373 * Retrieves the <code>Owner</code> value as a <code>Field</code>
374 * from this <code>Contact</code> <code>Persistent</code>.
375 *
376 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
377 * @throws AccessPoemException
378 * if the current <code>AccessToken</code>
379 * does not confer write access rights
380 * @return the Integer owner
381 */
382 public Field<Integer> getOwnerField() throws AccessPoemException {
383 Column<Integer> c = _getContactTable().getOwnerColumn();
384 return new Field<Integer>((Integer)c.getRaw(this), c);
385 }
386
387
388 /**
389 * Retrieves the <code>Address</code> value, without locking,
390 * for this <code>Contact</code> <code>Persistent</code>.
391 *
392 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
393 * @return the String address
394 */
395 public String getAddress_unsafe() {
396 return address;
397 }
398
399
400 /**
401 * Sets the <code>Address</code> value directly, without checking,
402 * for this Contact <code>Persistent</code>.
403 *
404 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
405 * @param cooked the pre-validated value to set
406 */
407 public void setAddress_unsafe(String cooked) {
408 address = cooked;
409 }
410
411 /**
412 * Retrieves the Address value, with locking, for this
413 * <code>Contact</code> <code>Persistent</code>.
414 * Field description:
415 * Contact Address
416 *
417 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
418 * @throws AccessPoemException
419 * if the current <code>AccessToken</code>
420 * does not confer write access rights
421 * @return the value of the field <code>Address</code> for this
422 * <code>Contact</code> <code>Persistent</code>
423 */
424
425 public String getAddress()
426 throws AccessPoemException {
427 readLock();
428 return getAddress_unsafe();
429 }
430
431
432 /**
433 * Sets the <code>Address</code> value, with checking, for this
434 * <code>Contact</code> <code>Persistent</code>.
435 * Field description:
436 * Contact Address
437 *
438 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
439 * @param cooked a validated <code>int</code>
440 * @throws AccessPoemException
441 * if the current <code>AccessToken</code>
442 * does not confer write access rights
443 * @throws ValidationPoemException
444 * if the value is not valid
445 */
446 public void setAddress(String cooked)
447 throws AccessPoemException, ValidationPoemException {
448 _getContactTable().getAddressColumn().
449 getType().assertValidCooked(cooked);
450 writeLock();
451 setAddress_unsafe(cooked);
452 }
453
454
455 /**
456 * Retrieves the <code>Address</code> value as a <code>Field</code>
457 * from this <code>Contact</code> <code>Persistent</code>.
458 *
459 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
460 * @throws AccessPoemException
461 * if the current <code>AccessToken</code>
462 * does not confer write access rights
463 * @return the String address
464 */
465 public Field<String> getAddressField() throws AccessPoemException {
466 Column<String> c = _getContactTable().getAddressColumn();
467 return new Field<String>((String)c.getRaw(this), c);
468 }
469
470
471 /**
472 * Retrieves the <code>Updates</code> value, without locking,
473 * for this <code>Contact</code> <code>Persistent</code>.
474 *
475 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
476 * @return the Integer updates
477 */
478 public Integer getUpdates_unsafe() {
479 return updates;
480 }
481
482
483 /**
484 * Sets the <code>Updates</code> value directly, without checking,
485 * for this Contact <code>Persistent</code>.
486 *
487 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
488 * @param cooked the pre-validated value to set
489 */
490 public void setUpdates_unsafe(Integer cooked) {
491 updates = cooked;
492 }
493
494 /**
495 * Retrieves the Updates value, with locking, for this
496 * <code>Contact</code> <code>Persistent</code>.
497 * Field description:
498 * How many times has this record been updated?
499 *
500 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
501 * @throws AccessPoemException
502 * if the current <code>AccessToken</code>
503 * does not confer write access rights
504 * @return the value of the field <code>Updates</code> for this
505 * <code>Contact</code> <code>Persistent</code>
506 */
507
508 public Integer getUpdates()
509 throws AccessPoemException {
510 readLock();
511 return getUpdates_unsafe();
512 }
513
514
515 /**
516 * Sets the <code>Updates</code> value, with checking, for this
517 * <code>Contact</code> <code>Persistent</code>.
518 * Field description:
519 * How many times has this record been updated?
520 *
521 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
522 * @param cooked a validated <code>int</code>
523 * @throws AccessPoemException
524 * if the current <code>AccessToken</code>
525 * does not confer write access rights
526 * @throws ValidationPoemException
527 * if the value is not valid
528 */
529 public void setUpdates(Integer cooked)
530 throws AccessPoemException, ValidationPoemException {
531 _getContactTable().getUpdatesColumn().
532 getType().assertValidCooked(cooked);
533 writeLock();
534 setUpdates_unsafe(cooked);
535 }
536
537 /**
538 * Sets the <code>Updates</code> value, with checking, for this
539 * <code>Contact</code> <code>Persistent</code>.
540 * Field description:
541 * How many times has this record been updated?
542 *
543 *
544 * Generated by org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods
545 * @param cooked a validated <code>int</code>
546 * @throws AccessPoemException
547 * if the current <code>AccessToken</code>
548 * does not confer write access rights
549 * @throws ValidationPoemException
550 * if the value is not valid
551 */
552
553 public final void setUpdates(int cooked)
554 throws AccessPoemException, ValidationPoemException {
555 setUpdates(new Integer(cooked));
556 }
557
558
559 /**
560 * Retrieves the <code>Updates</code> value as a <code>Field</code>
561 * from this <code>Contact</code> <code>Persistent</code>.
562 *
563 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
564 * @throws AccessPoemException
565 * if the current <code>AccessToken</code>
566 * does not confer write access rights
567 * @return the Integer updates
568 */
569 public Field<Integer> getUpdatesField() throws AccessPoemException {
570 Column<Integer> c = _getContactTable().getUpdatesColumn();
571 return new Field<Integer>((Integer)c.getRaw(this), c);
572 }
573
574
575 /**
576 * Retrieves the <code>Lastupdated</code> value, without locking,
577 * for this <code>Contact</code> <code>Persistent</code>.
578 *
579 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
580 * @return the Date lastupdated
581 */
582 public Date getLastupdated_unsafe() {
583 return lastupdated;
584 }
585
586
587 /**
588 * Sets the <code>Lastupdated</code> value directly, without checking,
589 * for this Contact <code>Persistent</code>.
590 *
591 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
592 * @param cooked the pre-validated value to set
593 */
594 public void setLastupdated_unsafe(Date cooked) {
595 lastupdated = cooked;
596 }
597
598 /**
599 * Retrieves the Lastupdated value, with locking, for this
600 * <code>Contact</code> <code>Persistent</code>.
601 * Field description:
602 * When was this last updated?
603 *
604 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
605 * @throws AccessPoemException
606 * if the current <code>AccessToken</code>
607 * does not confer write access rights
608 * @return the value of the field <code>Lastupdated</code> for this
609 * <code>Contact</code> <code>Persistent</code>
610 */
611
612 public Date getLastupdated()
613 throws AccessPoemException {
614 readLock();
615 return getLastupdated_unsafe();
616 }
617
618
619 /**
620 * Sets the <code>Lastupdated</code> value, with checking, for this
621 * <code>Contact</code> <code>Persistent</code>.
622 * Field description:
623 * When was this last updated?
624 *
625 * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
626 * @param cooked a validated <code>int</code>
627 * @throws AccessPoemException
628 * if the current <code>AccessToken</code>
629 * does not confer write access rights
630 * @throws ValidationPoemException
631 * if the value is not valid
632 */
633 public void setLastupdated(Date cooked)
634 throws AccessPoemException, ValidationPoemException {
635 _getContactTable().getLastupdatedColumn().
636 getType().assertValidCooked(cooked);
637 writeLock();
638 setLastupdated_unsafe(cooked);
639 }
640
641
642 /**
643 * Retrieves the <code>Lastupdated</code> value as a <code>Field</code>
644 * from this <code>Contact</code> <code>Persistent</code>.
645 *
646 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
647 * @throws AccessPoemException
648 * if the current <code>AccessToken</code>
649 * does not confer write access rights
650 * @return the Date lastupdated
651 */
652 public Field<Date> getLastupdatedField() throws AccessPoemException {
653 Column<Date> c = _getContactTable().getLastupdatedColumn();
654 return new Field<Date>((Date)c.getRaw(this), c);
655 }
656
657
658 /**
659 * Retrieves the <code>Lastupdateuser</code> value, without locking,
660 * for this <code>Contact</code> <code>Persistent</code>.
661 *
662 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
663 * @return the Integer lastupdateuser
664 */
665 public Integer getLastupdateuser_unsafe() {
666 return lastupdateuser;
667 }
668
669
670 /**
671 * Sets the <code>Lastupdateuser</code> value directly, without checking,
672 * for this Contact <code>Persistent</code>.
673 *
674 * see org.melati.poem.prepro.FieldDef#generateBaseMethods
675 * @param cooked the pre-validated value to set
676 */
677 public void setLastupdateuser_unsafe(Integer cooked) {
678 lastupdateuser = cooked;
679 }
680
681 /**
682 * Retrieves the Table Row Object ID.
683 *
684 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
685 * @throws AccessPoemException
686 * if the current <code>AccessToken</code>
687 * does not confer read access rights
688 * @return the TROID as an <code>Integer</code>
689 */
690
691 public Integer getLastupdateuserTroid()
692 throws AccessPoemException {
693 readLock();
694 return getLastupdateuser_unsafe();
695 }
696
697
698 /**
699 * Sets the Table Row Object ID.
700 *
701 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
702 * @param raw a Table Row Object Id
703 * @throws AccessPoemException
704 * if the current <code>AccessToken</code>
705 * does not confer write access rights
706 */
707 public void setLastupdateuserTroid(Integer raw)
708 throws AccessPoemException {
709 setLastupdateuser(raw == null ? null :
710 getContactsDatabaseTables().getUserTable().getUserObject(raw));
711 }
712
713
714 /**
715 * Retrieves the <code>Lastupdateuser</code> object referred to.
716 *
717 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
718 * @throws AccessPoemException
719 * if the current <code>AccessToken</code>
720 * does not confer read access rights
721 * @throws NoSuchRowPoemException
722 * if the <code>Persistent</code> has yet to be allocated a TROID
723 * @return the <code>Lastupdateuser</code> as a <code>User</code>
724 */
725 public User getLastupdateuser()
726 throws AccessPoemException, NoSuchRowPoemException {
727 Integer troid = getLastupdateuserTroid();
728 return troid == null ? null :
729 getContactsDatabaseTables().getUserTable().getUserObject(troid);
730 }
731
732
733 /**
734 * Set the Lastupdateuser.
735 *
736 * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
737 * @param cooked a validated <code>User</code>
738 * @throws AccessPoemException
739 * if the current <code>AccessToken</code>
740 * does not confer write access rights
741 */
742 public void setLastupdateuser(User cooked)
743 throws AccessPoemException {
744 _getContactTable().
745 getLastupdateuserColumn().
746 getType().assertValidCooked(cooked);
747 writeLock();
748 if (cooked == null)
749 setLastupdateuser_unsafe(null);
750 else {
751 cooked.existenceLock();
752 setLastupdateuser_unsafe(cooked.troid());
753 }
754 }
755
756
757 /**
758 * Retrieves the <code>Lastupdateuser</code> value as a <code>Field</code>
759 * from this <code>Contact</code> <code>Persistent</code>.
760 *
761 * see org.melati.poem.prepro.FieldDef#generateFieldCreator
762 * @throws AccessPoemException
763 * if the current <code>AccessToken</code>
764 * does not confer write access rights
765 * @return the Integer lastupdateuser
766 */
767 public Field<Integer> getLastupdateuserField() throws AccessPoemException {
768 Column<Integer> c = _getContactTable().getLastupdateuserColumn();
769 return new Field<Integer>((Integer)c.getRaw(this), c);
770 }
771
772 private CachedSelection<Contact> ownerContacts = null;
773 /** References to this Contact in the Contact table via its owner field.*/
774 @SuppressWarnings("unchecked")
775 public Enumeration<Contact> getOwnerContacts() {
776 if (getTroid() == null)
777 return new EmptyEnumeration<Contact>();
778 else {
779 if (ownerContacts == null)
780 ownerContacts =
781 getContactsDatabaseTables().getContactTable().getOwnerColumn().cachedSelectionWhereEq(getTroid());
782 return ownerContacts.objects();
783 }
784 }
785
786
787 /** References to this Contact in the Contact table via its owner field, as a List.*/
788 public List<Contact> getOwnerContactList() {
789 return Collections.list(getOwnerContacts());
790 }
791
792
793
794 private CachedSelection<ContactCategory> contactContactCategorys = null;
795 /** References to this Contact in the ContactCategory table via its contact field.*/
796 @SuppressWarnings("unchecked")
797 public Enumeration<ContactCategory> getContactContactCategorys() {
798 if (getTroid() == null)
799 return new EmptyEnumeration<ContactCategory>();
800 else {
801 if (contactContactCategorys == null)
802 contactContactCategorys =
803 getContactsDatabaseTables().getContactCategoryTable().getContactColumn().cachedSelectionWhereEq(getTroid());
804 return contactContactCategorys.objects();
805 }
806 }
807
808
809 /** References to this Contact in the ContactCategory table via its contact field, as a List.*/
810 public List<ContactCategory> getContactContactCategoryList() {
811 return Collections.list(getContactContactCategorys());
812 }
813
814
815
816 }
817