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.JdbcPersistent; |
12 | |
import org.melati.poem.Persistent; |
13 | |
import org.melati.poem.PoemException; |
14 | |
import org.melati.poem.Searchability; |
15 | |
import org.melati.poem.StringPoemType; |
16 | |
import org.melati.poem.TroidPoemType; |
17 | |
import org.melati.poem.ValidationPoemException; |
18 | |
import org.paneris.jammyjoes.model.JammyjoesDatabaseTables; |
19 | |
import org.paneris.jammyjoes.model.JammyjoesTable; |
20 | |
import org.paneris.jammyjoes.model.OrderStatus; |
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
public class OrderStatusTableBase extends JammyjoesTable { |
31 | |
|
32 | 0 | private Column col_id = null; |
33 | 0 | private Column col_status = null; |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
public OrderStatusTableBase( |
46 | |
Database database, String name, |
47 | |
DefinitionSource definitionSource) throws PoemException { |
48 | 0 | super(database, name, definitionSource); |
49 | 0 | } |
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
public JammyjoesDatabaseTables getJammyjoesDatabaseTables() { |
59 | 0 | return (JammyjoesDatabaseTables)getDatabase(); |
60 | |
} |
61 | |
|
62 | |
public void init() throws PoemException { |
63 | 0 | super.init(); |
64 | 0 | defineColumn(col_id = |
65 | |
new Column(this, "id", |
66 | |
new TroidPoemType(), |
67 | |
DefinitionSource.dsd) { |
68 | |
public Object getCooked(Persistent g) |
69 | |
throws AccessPoemException, PoemException { |
70 | 0 | return ((OrderStatus)g).getId(); |
71 | |
} |
72 | |
|
73 | |
public void setCooked(Persistent g, Object cooked) |
74 | |
throws AccessPoemException, ValidationPoemException { |
75 | 0 | ((OrderStatus)g).setId((Integer)cooked); |
76 | 0 | } |
77 | |
|
78 | |
public Field asField(Persistent g) { |
79 | 0 | return ((OrderStatus)g).getIdField(); |
80 | |
} |
81 | |
|
82 | |
protected boolean defaultUserEditable() { |
83 | 0 | return false; |
84 | |
} |
85 | |
|
86 | |
protected boolean defaultUserCreateable() { |
87 | 0 | return false; |
88 | |
} |
89 | |
|
90 | |
protected DisplayLevel defaultDisplayLevel() { |
91 | 0 | return DisplayLevel.summary; |
92 | |
} |
93 | |
|
94 | |
protected int defaultDisplayOrder() { |
95 | 0 | return 0; |
96 | |
} |
97 | |
|
98 | |
public Object getRaw_unsafe(Persistent g) |
99 | |
throws AccessPoemException { |
100 | 0 | return ((OrderStatus)g).getId_unsafe(); |
101 | |
} |
102 | |
|
103 | |
public void setRaw_unsafe(Persistent g, Object raw) |
104 | |
throws AccessPoemException { |
105 | 0 | ((OrderStatus)g).setId_unsafe((Integer)raw); |
106 | 0 | } |
107 | |
|
108 | |
public Object getRaw(Persistent g) |
109 | |
throws AccessPoemException { |
110 | 0 | return ((OrderStatus)g).getId(); |
111 | |
} |
112 | |
|
113 | 0 | public void setRaw(Persistent g, Object raw) |
114 | |
throws AccessPoemException { |
115 | 0 | ((OrderStatus)g).setId((Integer)raw); |
116 | 0 | } |
117 | |
}); |
118 | |
|
119 | 0 | defineColumn(col_status = |
120 | |
new Column(this, "status", |
121 | |
new StringPoemType(false, -1), |
122 | |
DefinitionSource.dsd) { |
123 | |
public Object getCooked(Persistent g) |
124 | |
throws AccessPoemException, PoemException { |
125 | 0 | return ((OrderStatus)g).getStatus(); |
126 | |
} |
127 | |
|
128 | |
public void setCooked(Persistent g, Object cooked) |
129 | |
throws AccessPoemException, ValidationPoemException { |
130 | 0 | ((OrderStatus)g).setStatus((String)cooked); |
131 | 0 | } |
132 | |
|
133 | |
public Field asField(Persistent g) { |
134 | 0 | return ((OrderStatus)g).getStatusField(); |
135 | |
} |
136 | |
|
137 | |
protected DisplayLevel defaultDisplayLevel() { |
138 | 0 | return DisplayLevel.primary; |
139 | |
} |
140 | |
|
141 | |
protected Searchability defaultSearchability() { |
142 | 0 | return Searchability.primary; |
143 | |
} |
144 | |
|
145 | |
protected String defaultDisplayName() { |
146 | 0 | return "Status"; |
147 | |
} |
148 | |
|
149 | |
protected int defaultDisplayOrder() { |
150 | 0 | return 1; |
151 | |
} |
152 | |
|
153 | |
protected String defaultDescription() { |
154 | 0 | return "The status of this order or order item"; |
155 | |
} |
156 | |
|
157 | |
protected int defaultWidth() { |
158 | 0 | return 30; |
159 | |
} |
160 | |
|
161 | |
public Object getRaw_unsafe(Persistent g) |
162 | |
throws AccessPoemException { |
163 | 0 | return ((OrderStatus)g).getStatus_unsafe(); |
164 | |
} |
165 | |
|
166 | |
public void setRaw_unsafe(Persistent g, Object raw) |
167 | |
throws AccessPoemException { |
168 | 0 | ((OrderStatus)g).setStatus_unsafe((String)raw); |
169 | 0 | } |
170 | |
|
171 | |
public Object getRaw(Persistent g) |
172 | |
throws AccessPoemException { |
173 | 0 | return ((OrderStatus)g).getStatus(); |
174 | |
} |
175 | |
|
176 | 0 | public void setRaw(Persistent g, Object raw) |
177 | |
throws AccessPoemException { |
178 | 0 | ((OrderStatus)g).setStatus((String)raw); |
179 | 0 | } |
180 | |
}); |
181 | 0 | } |
182 | |
|
183 | |
|
184 | |
|
185 | |
|
186 | |
|
187 | |
|
188 | |
|
189 | |
|
190 | |
|
191 | |
public final Column getIdColumn() { |
192 | 0 | return col_id; |
193 | |
} |
194 | |
|
195 | |
|
196 | |
|
197 | |
|
198 | |
|
199 | |
|
200 | |
|
201 | |
|
202 | |
|
203 | |
public final Column getStatusColumn() { |
204 | 0 | return col_status; |
205 | |
} |
206 | |
|
207 | |
|
208 | |
|
209 | |
|
210 | |
|
211 | |
|
212 | |
|
213 | |
|
214 | |
|
215 | |
public OrderStatus getOrderStatusObject(Integer troid) { |
216 | 0 | return (OrderStatus)getObject(troid); |
217 | |
} |
218 | |
|
219 | |
|
220 | |
|
221 | |
|
222 | |
|
223 | |
|
224 | |
|
225 | |
|
226 | |
|
227 | |
public OrderStatus getOrderStatusObject(int troid) { |
228 | 0 | return (OrderStatus)getObject(troid); |
229 | |
} |
230 | |
|
231 | |
protected JdbcPersistent _newPersistent() { |
232 | 0 | return new OrderStatus(); |
233 | |
} |
234 | |
protected String defaultDisplayName() { |
235 | 0 | return "Order Status"; |
236 | |
} |
237 | |
|
238 | |
protected String defaultDescription() { |
239 | 0 | return "The status of this order or order item"; |
240 | |
} |
241 | |
|
242 | |
protected String defaultCategory() { |
243 | 0 | return "Codes"; |
244 | |
} |
245 | |
|
246 | |
protected int defaultDisplayOrder() { |
247 | 0 | return 1060; |
248 | |
} |
249 | |
} |
250 | |
|