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 | |
import org.paneris.melati.boards.model.Board; |
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | 0 | public abstract class BoardTypeBase extends org.paneris.melati.boards.model.BoardType { |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() { |
34 | 0 | return (BibliomaniaDatabaseTables)getDatabase(); |
35 | |
} |
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
@SuppressWarnings("unchecked") |
46 | |
public org.paneris.melati.boards.model.BoardTypeTable<org.paneris.melati.boards.model.BoardType> getBoardTypeTable() { |
47 | 0 | return (org.paneris.melati.boards.model.BoardTypeTable<org.paneris.melati.boards.model.BoardType>)getTable(); |
48 | |
} |
49 | |
|
50 | |
|
51 | |
|
52 | 0 | private CachedSelection<Board> typeBoards = null; |
53 | |
|
54 | |
@SuppressWarnings("unchecked") |
55 | |
public Enumeration<Board> getTypeBoards() { |
56 | 0 | if (getTroid() == null) |
57 | 0 | return new EmptyEnumeration<Board>(); |
58 | |
else { |
59 | 0 | if (typeBoards == null) |
60 | 0 | typeBoards = |
61 | |
getBibliomaniaDatabaseTables().getBoardTable().getTypeColumn().cachedSelectionWhereEq(getTroid()); |
62 | 0 | return typeBoards.objects(); |
63 | |
} |
64 | |
} |
65 | |
|
66 | |
|
67 | |
|
68 | |
public List<Board> getTypeBoardList() { |
69 | 0 | return Collections.list(getTypeBoards()); |
70 | |
} |
71 | |
|
72 | |
|
73 | |
|
74 | |
} |
75 | |
|