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 | 0 | public abstract class BoardBase extends org.paneris.melati.boards.model.Board { |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
public BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() { |
35 | 0 | 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 | 0 | return (org.paneris.melati.boards.model.BoardTable<org.paneris.melati.boards.model.Board>)getTable(); |
49 | |
} |
50 | |
|
51 | |
|
52 | |
|
53 | 0 | private CachedSelection<Subscription> boardSubscriptions = null; |
54 | |
|
55 | |
@SuppressWarnings("unchecked") |
56 | |
public Enumeration<Subscription> getBoardSubscriptions() { |
57 | 0 | if (getTroid() == null) |
58 | 0 | return new EmptyEnumeration<Subscription>(); |
59 | |
else { |
60 | 0 | if (boardSubscriptions == null) |
61 | 0 | boardSubscriptions = |
62 | |
getBibliomaniaDatabaseTables().getSubscriptionTable().getBoardColumn().cachedSelectionWhereEq(getTroid()); |
63 | 0 | return boardSubscriptions.objects(); |
64 | |
} |
65 | |
} |
66 | |
|
67 | |
|
68 | |
|
69 | |
public List<Subscription> getBoardSubscriptionList() { |
70 | 0 | return Collections.list(getBoardSubscriptions()); |
71 | |
} |
72 | |
|
73 | |
|
74 | |
|
75 | 0 | private CachedSelection<Message> boardMessages = null; |
76 | |
|
77 | |
@SuppressWarnings("unchecked") |
78 | |
public Enumeration<Message> getBoardMessages() { |
79 | 0 | if (getTroid() == null) |
80 | 0 | return new EmptyEnumeration<Message>(); |
81 | |
else { |
82 | 0 | if (boardMessages == null) |
83 | 0 | boardMessages = |
84 | |
getBibliomaniaDatabaseTables().getMessageTable().getBoardColumn().cachedSelectionWhereEq(getTroid()); |
85 | 0 | return boardMessages.objects(); |
86 | |
} |
87 | |
} |
88 | |
|
89 | |
|
90 | |
|
91 | |
public List<Message> getBoardMessageList() { |
92 | 0 | return Collections.list(getBoardMessages()); |
93 | |
} |
94 | |
|
95 | |
|
96 | |
|
97 | |
} |
98 | |
|