1
2
3 package org.paneris.bibliomania.generated;
4
5
6 import java.util.Collections;
7 import java.util.Enumeration;
8 import java.util.List;
9 import org.melati.poem.CachedSelection;
10 import org.melati.poem.util.EmptyEnumeration;
11 import org.paneris.bibliomania.BibliomaniaDatabaseTables;
12
13
14
15 import org.paneris.melati.boards.model.Message;
16 import org.paneris.melati.boards.model.Subscription;
17
18
19
20
21
22
23
24
25 public abstract class BoardBase extends org.paneris.melati.boards.model.Board {
26
27
28
29
30
31
32
33
34 public BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() {
35 return (BibliomaniaDatabaseTables)getDatabase();
36 }
37
38
39
40
41
42
43
44
45
46 @SuppressWarnings("unchecked")
47 public org.paneris.melati.boards.model.BoardTable<org.paneris.melati.boards.model.Board> getBoardTable() {
48 return (org.paneris.melati.boards.model.BoardTable<org.paneris.melati.boards.model.Board>)getTable();
49 }
50
51
52
53 private CachedSelection<Subscription> boardSubscriptions = null;
54
55 @SuppressWarnings("unchecked")
56 public Enumeration<Subscription> getBoardSubscriptions() {
57 if (getTroid() == null)
58 return new EmptyEnumeration<Subscription>();
59 else {
60 if (boardSubscriptions == null)
61 boardSubscriptions =
62 getBibliomaniaDatabaseTables().getSubscriptionTable().getBoardColumn().cachedSelectionWhereEq(getTroid());
63 return boardSubscriptions.objects();
64 }
65 }
66
67
68
69 public List<Subscription> getBoardSubscriptionList() {
70 return Collections.list(getBoardSubscriptions());
71 }
72
73
74
75 private CachedSelection<Message> boardMessages = null;
76
77 @SuppressWarnings("unchecked")
78 public Enumeration<Message> getBoardMessages() {
79 if (getTroid() == null)
80 return new EmptyEnumeration<Message>();
81 else {
82 if (boardMessages == null)
83 boardMessages =
84 getBibliomaniaDatabaseTables().getMessageTable().getBoardColumn().cachedSelectionWhereEq(getTroid());
85 return boardMessages.objects();
86 }
87 }
88
89
90
91 public List<Message> getBoardMessageList() {
92 return Collections.list(getBoardMessages());
93 }
94
95
96
97 }
98