1
2
3 package org.melati.admin.test.generated;
4
5
6 import org.melati.admin.test.AdminTestDatabaseTables;
7
8 import org.melati.admin.test.User;
9 import org.melati.poem.AccessPoemException;
10 import org.melati.poem.Column;
11 import org.melati.poem.Database;
12 import org.melati.poem.DefinitionSource;
13 import org.melati.poem.DisplayLevel;
14 import org.melati.poem.Field;
15 import org.melati.poem.JdbcPersistent;
16 import org.melati.poem.Persistent;
17 import org.melati.poem.PoemException;
18 import org.melati.poem.Searchability;
19 import org.melati.poem.StringPoemType;
20
21 import org.melati.poem.UserTable;
22 import org.melati.poem.ValidationPoemException;
23
24
25
26
27
28
29
30
31 public class UserTableBase<T extends User> extends UserTable<T> {
32
33 private Column<String> col_email = null;
34
35
36
37
38
39
40
41
42
43
44
45 public UserTableBase(
46 Database database, String name,
47 DefinitionSource definitionSource) throws PoemException {
48 super(database, name, definitionSource);
49 }
50
51
52
53
54
55
56
57
58 public AdminTestDatabaseTables getAdminTestDatabaseTables() {
59 return (AdminTestDatabaseTables)getDatabase();
60 }
61
62
63
64
65
66
67
68 public void init() throws PoemException {
69 super.init();
70 defineColumn(col_email =
71 new Column<String>(this, "email",
72 new StringPoemType(true, -1),
73 DefinitionSource.dsd) {
74 public Object getCooked(Persistent g)
75 throws AccessPoemException, PoemException {
76 return ((org.melati.admin.test.User)g).getEmail();
77 }
78
79 public void setCooked(Persistent g, Object cooked)
80 throws AccessPoemException, ValidationPoemException {
81 ((org.melati.admin.test.User)g).setEmail((String)cooked);
82 }
83
84 public Field<String> asField(Persistent g) {
85 return ((org.melati.admin.test.User)g).getEmailField();
86 }
87
88 public DisplayLevel defaultDisplayLevel() {
89 return DisplayLevel.summary;
90 }
91
92 public Searchability defaultSearchability() {
93 return Searchability.yes;
94 }
95
96 public int defaultDisplayOrder() {
97 return 50;
98 }
99
100 public String defaultDescription() {
101 return "The user's email address";
102 }
103
104 public int defaultWidth() {
105 return 40;
106 }
107
108 public Object getRaw_unsafe(Persistent g)
109 throws AccessPoemException {
110 return ((org.melati.admin.test.User)g).getEmail_unsafe();
111 }
112
113 public void setRaw_unsafe(Persistent g, Object raw)
114 throws AccessPoemException {
115 ((org.melati.admin.test.User)g).setEmail_unsafe((String)raw);
116 }
117
118 public Object getRaw(Persistent g)
119 throws AccessPoemException {
120 return ((org.melati.admin.test.User)g).getEmail();
121 }
122
123 public void setRaw(Persistent g, Object raw)
124 throws AccessPoemException {
125 ((org.melati.admin.test.User)g).setEmail((String)raw);
126 }
127 });
128 }
129
130
131
132
133
134
135
136
137
138 public final Column<String> getEmailColumn() {
139 return col_email;
140 }
141
142
143
144
145
146
147
148
149
150 public org.melati.poem.User getUserObject(Integer troid) {
151 return (org.melati.poem.User)getObject(troid);
152 }
153
154
155
156
157
158
159
160
161
162 public org.melati.poem.User getUserObject(int troid) {
163 return (org.melati.poem.User)getObject(troid);
164 }
165
166 protected JdbcPersistent _newPersistent() {
167 return new org.melati.admin.test.User();
168 }
169 public String defaultDescription() {
170 return "An emailed User";
171 }
172
173 public String defaultCategory() {
174 return "User";
175 }
176
177 public int defaultDisplayOrder() {
178 return 2010;
179 }
180 }
181