1
2
3 package org.melati.poem.test.generated;
4
5
6 import org.melati.poem.AccessPoemException;
7 import org.melati.poem.Column;
8 import org.melati.poem.Database;
9 import org.melati.poem.DefinitionSource;
10 import org.melati.poem.DisplayLevel;
11 import org.melati.poem.Field;
12 import org.melati.poem.JdbcPersistent;
13 import org.melati.poem.PasswordPoemType;
14 import org.melati.poem.Persistent;
15 import org.melati.poem.PoemException;
16 import org.melati.poem.Searchability;
17 import org.melati.poem.StringPoemType;
18 import org.melati.poem.TroidPoemType;
19 import org.melati.poem.ValidationPoemException;
20 import org.melati.poem.test.EverythingDatabaseTables;
21 import org.melati.poem.test.EverythingTable;
22 import org.melati.poem.test.PasswordField;
23
24
25
26
27
28
29
30
31 public class PasswordFieldTableBase<T extends PasswordField> extends EverythingTable<T> {
32
33 private Column<Integer> col_id = null;
34 private Column<String> col_passwordfield = null;
35
36
37
38
39
40
41
42
43
44
45
46 public PasswordFieldTableBase(
47 Database database, String name,
48 DefinitionSource definitionSource) throws PoemException {
49 super(database, name, definitionSource);
50 }
51
52
53
54
55
56
57
58
59 public EverythingDatabaseTables getEverythingDatabaseTables() {
60 return (EverythingDatabaseTables)getDatabase();
61 }
62
63
64
65
66
67
68
69 public void init() throws PoemException {
70 super.init();
71 defineColumn(col_id =
72 new Column<Integer>(this, "id",
73 new TroidPoemType(),
74 DefinitionSource.dsd) {
75 public Object getCooked(Persistent g)
76 throws AccessPoemException, PoemException {
77 return ((PasswordField)g).getId();
78 }
79
80 public void setCooked(Persistent g, Object cooked)
81 throws AccessPoemException, ValidationPoemException {
82 ((PasswordField)g).setId((Integer)cooked);
83 }
84
85 public Field<Integer> asField(Persistent g) {
86 return ((PasswordField)g).getIdField();
87 }
88
89 public boolean defaultUserEditable() {
90 return false;
91 }
92
93 public boolean defaultUserCreateable() {
94 return false;
95 }
96
97 public DisplayLevel defaultDisplayLevel() {
98 return DisplayLevel.summary;
99 }
100
101 public Searchability defaultSearchability() {
102 return Searchability.yes;
103 }
104
105 public String defaultDisplayName() {
106 return "Id";
107 }
108
109 public int defaultDisplayOrder() {
110 return 0;
111 }
112
113 public boolean defaultIndexed() {
114 return true;
115 }
116
117 public boolean defaultUnique() {
118 return true;
119 }
120
121 public int defaultWidth() {
122 return 20;
123 }
124
125 public int defaultHeight() {
126 return 1;
127 }
128
129 public Object getRaw_unsafe(Persistent g)
130 throws AccessPoemException {
131 return ((PasswordField)g).getId_unsafe();
132 }
133
134 public void setRaw_unsafe(Persistent g, Object raw)
135 throws AccessPoemException {
136 ((PasswordField)g).setId_unsafe((Integer)raw);
137 }
138
139 public Object getRaw(Persistent g)
140 throws AccessPoemException {
141 return ((PasswordField)g).getId();
142 }
143
144 public void setRaw(Persistent g, Object raw)
145 throws AccessPoemException {
146 ((PasswordField)g).setId((Integer)raw);
147 }
148 });
149
150 defineColumn(col_passwordfield =
151 new Column<String>(this, "passwordfield",
152 new PasswordPoemType(true, 23),
153 DefinitionSource.dsd) {
154 public Object getCooked(Persistent g)
155 throws AccessPoemException, PoemException {
156 return ((PasswordField)g).getPasswordfield();
157 }
158
159 public void setCooked(Persistent g, Object cooked)
160 throws AccessPoemException, ValidationPoemException {
161 ((PasswordField)g).setPasswordfield((String)cooked);
162 }
163
164 public Field<String> asField(Persistent g) {
165 return ((PasswordField)g).getPasswordfieldField();
166 }
167
168 public DisplayLevel defaultDisplayLevel() {
169 return DisplayLevel.summary;
170 }
171
172 public Searchability defaultSearchability() {
173 return Searchability.yes;
174 }
175
176 public String defaultDisplayName() {
177 return "Password Field";
178 }
179
180 public int defaultDisplayOrder() {
181 return 3;
182 }
183
184 public int defaultWidth() {
185 return 20;
186 }
187
188 public int defaultHeight() {
189 return 3;
190 }
191
192 public Object getRaw_unsafe(Persistent g)
193 throws AccessPoemException {
194 return ((PasswordField)g).getPasswordfield_unsafe();
195 }
196
197 public void setRaw_unsafe(Persistent g, Object raw)
198 throws AccessPoemException {
199 ((PasswordField)g).setPasswordfield_unsafe((String)raw);
200 }
201
202 public Object getRaw(Persistent g)
203 throws AccessPoemException {
204 return ((PasswordField)g).getPasswordfield();
205 }
206
207 public void setRaw(Persistent g, Object raw)
208 throws AccessPoemException {
209 ((PasswordField)g).setPasswordfield((String)raw);
210 }
211 });
212 }
213
214
215
216
217
218
219
220
221
222 public final Column<Integer> getIdColumn() {
223 return col_id;
224 }
225
226
227
228
229
230
231
232
233
234 public final Column<String> getPasswordfieldColumn() {
235 return col_passwordfield;
236 }
237
238
239
240
241
242
243
244
245
246 public PasswordField getPasswordFieldObject(Integer troid) {
247 return (PasswordField)getObject(troid);
248 }
249
250
251
252
253
254
255
256
257
258 public PasswordField getPasswordFieldObject(int troid) {
259 return (PasswordField)getObject(troid);
260 }
261
262 protected JdbcPersistent _newPersistent() {
263 return new PasswordField();
264 }
265 public String defaultDisplayName() {
266 return "Password Field";
267 }
268
269 public String defaultDescription() {
270 return "A table with only a password field in it";
271 }
272
273 public Integer defaultCacheLimit() {
274 return new Integer(100);
275 }
276
277 public String defaultCategory() {
278 return "Normal";
279 }
280
281 public int defaultDisplayOrder() {
282 return 15;
283 }
284 }
285