1 | |
|
2 | |
|
3 | |
package org.paneris.jammyjoes.model.generated; |
4 | |
|
5 | |
import org.melati.poem.AccessPoemException; |
6 | |
import org.melati.poem.Column; |
7 | |
import org.melati.poem.Database; |
8 | |
import org.melati.poem.DefinitionSource; |
9 | |
import org.melati.poem.DisplayLevel; |
10 | |
import org.melati.poem.Field; |
11 | |
import org.melati.poem.IntegerPoemType; |
12 | |
import org.melati.poem.JdbcPersistent; |
13 | |
import org.melati.poem.Persistent; |
14 | |
import org.melati.poem.PoemException; |
15 | |
import org.melati.poem.Searchability; |
16 | |
import org.melati.poem.StringPoemType; |
17 | |
import org.melati.poem.TroidPoemType; |
18 | |
import org.melati.poem.ValidationPoemException; |
19 | |
import org.paneris.jammyjoes.model.Age; |
20 | |
import org.paneris.jammyjoes.model.JammyjoesDatabaseTables; |
21 | |
import org.paneris.jammyjoes.model.JammyjoesTable; |
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
public class AgeTableBase extends JammyjoesTable { |
32 | |
|
33 | 0 | private Column col_id = null; |
34 | 0 | private Column col_name = null; |
35 | 0 | private Column col_pluralName = null; |
36 | 0 | private Column col_minage = null; |
37 | 0 | private Column col_maxage = null; |
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
public AgeTableBase( |
50 | |
Database database, String name, |
51 | |
DefinitionSource definitionSource) throws PoemException { |
52 | 0 | super(database, name, definitionSource); |
53 | 0 | } |
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
public JammyjoesDatabaseTables getJammyjoesDatabaseTables() { |
63 | 0 | return (JammyjoesDatabaseTables)getDatabase(); |
64 | |
} |
65 | |
|
66 | |
public void init() throws PoemException { |
67 | 0 | super.init(); |
68 | 0 | defineColumn(col_id = |
69 | |
new Column(this, "id", |
70 | |
new TroidPoemType(), |
71 | |
DefinitionSource.dsd) { |
72 | |
public Object getCooked(Persistent g) |
73 | |
throws AccessPoemException, PoemException { |
74 | 0 | return ((Age)g).getId(); |
75 | |
} |
76 | |
|
77 | |
public void setCooked(Persistent g, Object cooked) |
78 | |
throws AccessPoemException, ValidationPoemException { |
79 | 0 | ((Age)g).setId((Integer)cooked); |
80 | 0 | } |
81 | |
|
82 | |
public Field asField(Persistent g) { |
83 | 0 | return ((Age)g).getIdField(); |
84 | |
} |
85 | |
|
86 | |
protected boolean defaultUserEditable() { |
87 | 0 | return false; |
88 | |
} |
89 | |
|
90 | |
protected boolean defaultUserCreateable() { |
91 | 0 | return false; |
92 | |
} |
93 | |
|
94 | |
protected DisplayLevel defaultDisplayLevel() { |
95 | 0 | return DisplayLevel.record; |
96 | |
} |
97 | |
|
98 | |
protected int defaultDisplayOrder() { |
99 | 0 | return 0; |
100 | |
} |
101 | |
|
102 | |
public Object getRaw_unsafe(Persistent g) |
103 | |
throws AccessPoemException { |
104 | 0 | return ((Age)g).getId_unsafe(); |
105 | |
} |
106 | |
|
107 | |
public void setRaw_unsafe(Persistent g, Object raw) |
108 | |
throws AccessPoemException { |
109 | 0 | ((Age)g).setId_unsafe((Integer)raw); |
110 | 0 | } |
111 | |
|
112 | |
public Object getRaw(Persistent g) |
113 | |
throws AccessPoemException { |
114 | 0 | return ((Age)g).getId(); |
115 | |
} |
116 | |
|
117 | 0 | public void setRaw(Persistent g, Object raw) |
118 | |
throws AccessPoemException { |
119 | 0 | ((Age)g).setId((Integer)raw); |
120 | 0 | } |
121 | |
}); |
122 | |
|
123 | 0 | defineColumn(col_name = |
124 | |
new Column(this, "name", |
125 | |
new StringPoemType(false, -1), |
126 | |
DefinitionSource.dsd) { |
127 | |
public Object getCooked(Persistent g) |
128 | |
throws AccessPoemException, PoemException { |
129 | 0 | return ((Age)g).getName(); |
130 | |
} |
131 | |
|
132 | |
public void setCooked(Persistent g, Object cooked) |
133 | |
throws AccessPoemException, ValidationPoemException { |
134 | 0 | ((Age)g).setName((String)cooked); |
135 | 0 | } |
136 | |
|
137 | |
public Field asField(Persistent g) { |
138 | 0 | return ((Age)g).getNameField(); |
139 | |
} |
140 | |
|
141 | |
protected DisplayLevel defaultDisplayLevel() { |
142 | 0 | return DisplayLevel.primary; |
143 | |
} |
144 | |
|
145 | |
protected Searchability defaultSearchability() { |
146 | 0 | return Searchability.primary; |
147 | |
} |
148 | |
|
149 | |
protected String defaultDisplayName() { |
150 | 0 | return "Age name (singular)"; |
151 | |
} |
152 | |
|
153 | |
protected int defaultDisplayOrder() { |
154 | 0 | return 1; |
155 | |
} |
156 | |
|
157 | |
protected String defaultDescription() { |
158 | 0 | return "Age name (singular)"; |
159 | |
} |
160 | |
|
161 | |
public Object getRaw_unsafe(Persistent g) |
162 | |
throws AccessPoemException { |
163 | 0 | return ((Age)g).getName_unsafe(); |
164 | |
} |
165 | |
|
166 | |
public void setRaw_unsafe(Persistent g, Object raw) |
167 | |
throws AccessPoemException { |
168 | 0 | ((Age)g).setName_unsafe((String)raw); |
169 | 0 | } |
170 | |
|
171 | |
public Object getRaw(Persistent g) |
172 | |
throws AccessPoemException { |
173 | 0 | return ((Age)g).getName(); |
174 | |
} |
175 | |
|
176 | 0 | public void setRaw(Persistent g, Object raw) |
177 | |
throws AccessPoemException { |
178 | 0 | ((Age)g).setName((String)raw); |
179 | 0 | } |
180 | |
}); |
181 | |
|
182 | 0 | defineColumn(col_pluralName = |
183 | |
new Column(this, "pluralName", |
184 | |
new StringPoemType(true, -1), |
185 | |
DefinitionSource.dsd) { |
186 | |
public Object getCooked(Persistent g) |
187 | |
throws AccessPoemException, PoemException { |
188 | 0 | return ((Age)g).getPluralName(); |
189 | |
} |
190 | |
|
191 | |
public void setCooked(Persistent g, Object cooked) |
192 | |
throws AccessPoemException, ValidationPoemException { |
193 | 0 | ((Age)g).setPluralName((String)cooked); |
194 | 0 | } |
195 | |
|
196 | |
public Field asField(Persistent g) { |
197 | 0 | return ((Age)g).getPluralNameField(); |
198 | |
} |
199 | |
|
200 | |
protected String defaultDisplayName() { |
201 | 0 | return "Age name (plural)"; |
202 | |
} |
203 | |
|
204 | |
protected int defaultDisplayOrder() { |
205 | 0 | return 2; |
206 | |
} |
207 | |
|
208 | |
protected String defaultDescription() { |
209 | 0 | return "Age name (plural)"; |
210 | |
} |
211 | |
|
212 | |
public Object getRaw_unsafe(Persistent g) |
213 | |
throws AccessPoemException { |
214 | 0 | return ((Age)g).getPluralName_unsafe(); |
215 | |
} |
216 | |
|
217 | |
public void setRaw_unsafe(Persistent g, Object raw) |
218 | |
throws AccessPoemException { |
219 | 0 | ((Age)g).setPluralName_unsafe((String)raw); |
220 | 0 | } |
221 | |
|
222 | |
public Object getRaw(Persistent g) |
223 | |
throws AccessPoemException { |
224 | 0 | return ((Age)g).getPluralName(); |
225 | |
} |
226 | |
|
227 | 0 | public void setRaw(Persistent g, Object raw) |
228 | |
throws AccessPoemException { |
229 | 0 | ((Age)g).setPluralName((String)raw); |
230 | 0 | } |
231 | |
}); |
232 | |
|
233 | 0 | defineColumn(col_minage = |
234 | |
new Column(this, "minage", |
235 | |
new IntegerPoemType(false), |
236 | |
DefinitionSource.dsd) { |
237 | |
public Object getCooked(Persistent g) |
238 | |
throws AccessPoemException, PoemException { |
239 | 0 | return ((Age)g).getMinage(); |
240 | |
} |
241 | |
|
242 | |
public void setCooked(Persistent g, Object cooked) |
243 | |
throws AccessPoemException, ValidationPoemException { |
244 | 0 | ((Age)g).setMinage((Integer)cooked); |
245 | 0 | } |
246 | |
|
247 | |
public Field asField(Persistent g) { |
248 | 0 | return ((Age)g).getMinageField(); |
249 | |
} |
250 | |
|
251 | |
protected DisplayLevel defaultDisplayLevel() { |
252 | 0 | return DisplayLevel.summary; |
253 | |
} |
254 | |
|
255 | |
protected Searchability defaultSearchability() { |
256 | 0 | return Searchability.no; |
257 | |
} |
258 | |
|
259 | |
protected Integer defaultDisplayOrderPriority() { |
260 | 0 | return new Integer(0); |
261 | |
} |
262 | |
|
263 | |
protected String defaultDisplayName() { |
264 | 0 | return "Minimum Age"; |
265 | |
} |
266 | |
|
267 | |
protected int defaultDisplayOrder() { |
268 | 0 | return 3; |
269 | |
} |
270 | |
|
271 | |
public Object getRaw_unsafe(Persistent g) |
272 | |
throws AccessPoemException { |
273 | 0 | return ((Age)g).getMinage_unsafe(); |
274 | |
} |
275 | |
|
276 | |
public void setRaw_unsafe(Persistent g, Object raw) |
277 | |
throws AccessPoemException { |
278 | 0 | ((Age)g).setMinage_unsafe((Integer)raw); |
279 | 0 | } |
280 | |
|
281 | |
public Object getRaw(Persistent g) |
282 | |
throws AccessPoemException { |
283 | 0 | return ((Age)g).getMinage(); |
284 | |
} |
285 | |
|
286 | 0 | public void setRaw(Persistent g, Object raw) |
287 | |
throws AccessPoemException { |
288 | 0 | ((Age)g).setMinage((Integer)raw); |
289 | 0 | } |
290 | |
}); |
291 | |
|
292 | 0 | defineColumn(col_maxage = |
293 | |
new Column(this, "maxage", |
294 | |
new IntegerPoemType(false), |
295 | |
DefinitionSource.dsd) { |
296 | |
public Object getCooked(Persistent g) |
297 | |
throws AccessPoemException, PoemException { |
298 | 0 | return ((Age)g).getMaxage(); |
299 | |
} |
300 | |
|
301 | |
public void setCooked(Persistent g, Object cooked) |
302 | |
throws AccessPoemException, ValidationPoemException { |
303 | 0 | ((Age)g).setMaxage((Integer)cooked); |
304 | 0 | } |
305 | |
|
306 | |
public Field asField(Persistent g) { |
307 | 0 | return ((Age)g).getMaxageField(); |
308 | |
} |
309 | |
|
310 | |
protected DisplayLevel defaultDisplayLevel() { |
311 | 0 | return DisplayLevel.summary; |
312 | |
} |
313 | |
|
314 | |
protected Searchability defaultSearchability() { |
315 | 0 | return Searchability.no; |
316 | |
} |
317 | |
|
318 | |
protected String defaultDisplayName() { |
319 | 0 | return "Maximum Age"; |
320 | |
} |
321 | |
|
322 | |
protected int defaultDisplayOrder() { |
323 | 0 | return 4; |
324 | |
} |
325 | |
|
326 | |
public Object getRaw_unsafe(Persistent g) |
327 | |
throws AccessPoemException { |
328 | 0 | return ((Age)g).getMaxage_unsafe(); |
329 | |
} |
330 | |
|
331 | |
public void setRaw_unsafe(Persistent g, Object raw) |
332 | |
throws AccessPoemException { |
333 | 0 | ((Age)g).setMaxage_unsafe((Integer)raw); |
334 | 0 | } |
335 | |
|
336 | |
public Object getRaw(Persistent g) |
337 | |
throws AccessPoemException { |
338 | 0 | return ((Age)g).getMaxage(); |
339 | |
} |
340 | |
|
341 | 0 | public void setRaw(Persistent g, Object raw) |
342 | |
throws AccessPoemException { |
343 | 0 | ((Age)g).setMaxage((Integer)raw); |
344 | 0 | } |
345 | |
}); |
346 | 0 | } |
347 | |
|
348 | |
|
349 | |
|
350 | |
|
351 | |
|
352 | |
|
353 | |
|
354 | |
|
355 | |
|
356 | |
public final Column getIdColumn() { |
357 | 0 | return col_id; |
358 | |
} |
359 | |
|
360 | |
|
361 | |
|
362 | |
|
363 | |
|
364 | |
|
365 | |
|
366 | |
|
367 | |
|
368 | |
public final Column getNameColumn() { |
369 | 0 | return col_name; |
370 | |
} |
371 | |
|
372 | |
|
373 | |
|
374 | |
|
375 | |
|
376 | |
|
377 | |
|
378 | |
|
379 | |
|
380 | |
public final Column getPluralNameColumn() { |
381 | 0 | return col_pluralName; |
382 | |
} |
383 | |
|
384 | |
|
385 | |
|
386 | |
|
387 | |
|
388 | |
|
389 | |
|
390 | |
|
391 | |
|
392 | |
public final Column getMinageColumn() { |
393 | 0 | return col_minage; |
394 | |
} |
395 | |
|
396 | |
|
397 | |
|
398 | |
|
399 | |
|
400 | |
|
401 | |
|
402 | |
|
403 | |
|
404 | |
public final Column getMaxageColumn() { |
405 | 0 | return col_maxage; |
406 | |
} |
407 | |
|
408 | |
|
409 | |
|
410 | |
|
411 | |
|
412 | |
|
413 | |
|
414 | |
|
415 | |
|
416 | |
public Age getAgeObject(Integer troid) { |
417 | 0 | return (Age)getObject(troid); |
418 | |
} |
419 | |
|
420 | |
|
421 | |
|
422 | |
|
423 | |
|
424 | |
|
425 | |
|
426 | |
|
427 | |
|
428 | |
public Age getAgeObject(int troid) { |
429 | 0 | return (Age)getObject(troid); |
430 | |
} |
431 | |
|
432 | |
protected JdbcPersistent _newPersistent() { |
433 | 0 | return new Age(); |
434 | |
} |
435 | |
protected String defaultDisplayName() { |
436 | 0 | return "Ages"; |
437 | |
} |
438 | |
|
439 | |
protected String defaultDescription() { |
440 | 0 | return "The Age Categories for Toys"; |
441 | |
} |
442 | |
|
443 | |
protected boolean defaultRememberAllTroids() { |
444 | 0 | return true; |
445 | |
} |
446 | |
|
447 | |
protected Integer defaultCacheLimit() { |
448 | 0 | return new Integer(999999999); |
449 | |
} |
450 | |
|
451 | |
protected String defaultCategory() { |
452 | 0 | return "Codes"; |
453 | |
} |
454 | |
|
455 | |
protected int defaultDisplayOrder() { |
456 | 0 | return 1240; |
457 | |
} |
458 | |
} |
459 | |
|