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