1
2
3 package org.paneris.jammyjoes.model.generated;
4
5
6 import org.melati.poem.AccessPoemException;
7 import org.melati.poem.Column;
8 import org.melati.poem.Field;
9 import org.melati.poem.JdbcPersistent;
10 import org.melati.poem.ValidationPoemException;
11 import org.paneris.jammyjoes.model.JammyjoesDatabaseTables;
12 import org.paneris.jammyjoes.model.StockTransactionTypeTable;
13
14
15 /**
16 * Melati POEM generated abstract base class for a <code>Persistent</code>
17 * <code>StockTransactionType</code> Object.
18 *
19 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
20 */
21 public abstract class StockTransactionTypeBase extends JdbcPersistent {
22
23
24 /**
25 * Retrieves the Database object.
26 *
27 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
28 * @return the database
29 */
30 public JammyjoesDatabaseTables getJammyjoesDatabaseTables() {
31 return (JammyjoesDatabaseTables)getDatabase();
32 }
33
34
35 /**
36 * Retrieves the <code>StockTransactionTypeTable</code> table
37 * which this <code>Persistent</code> is from.
38 *
39 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
40 * @return the StockTransactionTypeTable
41 */
42 public StockTransactionTypeTable getStockTransactionTypeTable() {
43 return (StockTransactionTypeTable)getTable();
44 }
45
46 private StockTransactionTypeTable _getStockTransactionTypeTable() {
47 return (StockTransactionTypeTable)getTable();
48 }
49
50
51 /**
52 * id
53 */
54 protected Integer id;
55 /**
56 * type - Type
57 */
58 protected String type;
59 /**
60 * Reduce Stock? - Reduce Stock for Transactions of this type?
61 */
62 protected Boolean reducestock;
63
64
65 /**
66 * Retrieves the <code>Id</code> value, without locking,
67 * for this <code>StockTransactionType</code> <code>Persistent</code>.
68 *
69 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
70 * @return the Integer id
71 */
72 public Integer getId_unsafe() {
73 return id;
74 }
75
76
77 /**
78 * Sets the <code>Id</code> value directly, without checking,
79 * for this StockTransactionType <code>Persistent</code>.
80 *
81 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
82 * @param cooked the pre-validated value to set
83 */
84 public void setId_unsafe(Integer cooked) {
85 id = cooked;
86 }
87
88 /**
89 * Retrieves the Id value, with locking, for this
90 * <code>StockTransactionType</code> <code>Persistent</code>.
91 *
92 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
93 * @throws AccessPoemException
94 * if the current <code>AccessToken</code>
95 * does not confer write access rights
96 * @return the value of the field <code>Id</code> for this
97 * <code>StockTransactionType</code> <code>Persistent</code>
98 */
99
100 public Integer getId()
101 throws AccessPoemException {
102 readLock();
103 return getId_unsafe();
104 }
105
106
107 /**
108 * Sets the <code>Id</code> value, with checking, for this
109 * <code>StockTransactionType</code> <code>Persistent</code>.
110 *
111 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
112 * @param cooked a validated <code>int</code>
113 * @throws AccessPoemException
114 * if the current <code>AccessToken</code>
115 * does not confer write access rights
116 * @throws ValidationPoemException
117 * if the value is not valid
118 */
119 public void setId(Integer cooked)
120 throws AccessPoemException, ValidationPoemException {
121 _getStockTransactionTypeTable().getIdColumn().
122 getType().assertValidCooked(cooked);
123 writeLock();
124 setId_unsafe(cooked);
125 }
126
127 /**
128 * Sets the <code>Id</code> value, with checking, for this
129 * <code>StockTransactionType</code> <code>Persistent</code>.
130 *
131 * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods
132 * @param cooked a validated <code>int</code>
133 * @throws AccessPoemException
134 * if the current <code>AccessToken</code>
135 * does not confer write access rights
136 * @throws ValidationPoemException
137 * if the value is not valid
138 */
139
140 public final void setId(int cooked)
141 throws AccessPoemException, ValidationPoemException {
142 setId(new Integer(cooked));
143 }
144
145
146 /**
147 * Retrieves the <code>Id</code> value as a <code>Field</code>
148 * from this <code>StockTransactionType</code> <code>Persistent</code>.
149 *
150 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
151 * @throws AccessPoemException
152 * if the current <code>AccessToken</code>
153 * does not confer write access rights
154 * @return the Integer id
155 */
156 public Field getIdField() throws AccessPoemException {
157 Column c = _getStockTransactionTypeTable().getIdColumn();
158 return new Field(c.getRaw(this), c);
159 }
160
161
162 /**
163 * Retrieves the <code>Type</code> value, without locking,
164 * for this <code>StockTransactionType</code> <code>Persistent</code>.
165 *
166 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
167 * @return the String type
168 */
169 public String getType_unsafe() {
170 return type;
171 }
172
173
174 /**
175 * Sets the <code>Type</code> value directly, without checking,
176 * for this StockTransactionType <code>Persistent</code>.
177 *
178 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
179 * @param cooked the pre-validated value to set
180 */
181 public void setType_unsafe(String cooked) {
182 type = cooked;
183 }
184
185 /**
186 * Retrieves the Type value, with locking, for this
187 * <code>StockTransactionType</code> <code>Persistent</code>.
188 * Field description:
189 * Type
190 *
191 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
192 * @throws AccessPoemException
193 * if the current <code>AccessToken</code>
194 * does not confer write access rights
195 * @return the value of the field <code>Type</code> for this
196 * <code>StockTransactionType</code> <code>Persistent</code>
197 */
198
199 public String getType()
200 throws AccessPoemException {
201 readLock();
202 return getType_unsafe();
203 }
204
205
206 /**
207 * Sets the <code>Type</code> value, with checking, for this
208 * <code>StockTransactionType</code> <code>Persistent</code>.
209 * Field description:
210 * Type
211 *
212 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
213 * @param cooked a validated <code>int</code>
214 * @throws AccessPoemException
215 * if the current <code>AccessToken</code>
216 * does not confer write access rights
217 * @throws ValidationPoemException
218 * if the value is not valid
219 */
220 public void setType(String cooked)
221 throws AccessPoemException, ValidationPoemException {
222 _getStockTransactionTypeTable().getTypeColumn().
223 getType().assertValidCooked(cooked);
224 writeLock();
225 setType_unsafe(cooked);
226 }
227
228
229 /**
230 * Retrieves the <code>Type</code> value as a <code>Field</code>
231 * from this <code>StockTransactionType</code> <code>Persistent</code>.
232 *
233 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
234 * @throws AccessPoemException
235 * if the current <code>AccessToken</code>
236 * does not confer write access rights
237 * @return the String type
238 */
239 public Field getTypeField() throws AccessPoemException {
240 Column c = _getStockTransactionTypeTable().getTypeColumn();
241 return new Field(c.getRaw(this), c);
242 }
243
244
245 /**
246 * Retrieves the <code>Reducestock</code> value, without locking,
247 * for this <code>StockTransactionType</code> <code>Persistent</code>.
248 *
249 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
250 * @return the Boolean reducestock
251 */
252 public Boolean getReducestock_unsafe() {
253 return reducestock;
254 }
255
256
257 /**
258 * Sets the <code>Reducestock</code> value directly, without checking,
259 * for this StockTransactionType <code>Persistent</code>.
260 *
261 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
262 * @param cooked the pre-validated value to set
263 */
264 public void setReducestock_unsafe(Boolean cooked) {
265 reducestock = cooked;
266 }
267
268 /**
269 * Retrieves the Reducestock value, with locking, for this
270 * <code>StockTransactionType</code> <code>Persistent</code>.
271 * Field description:
272 * Reduce Stock for Transactions of this type?
273 *
274 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
275 * @throws AccessPoemException
276 * if the current <code>AccessToken</code>
277 * does not confer write access rights
278 * @return the value of the field <code>Reducestock</code> for this
279 * <code>StockTransactionType</code> <code>Persistent</code>
280 */
281
282 public Boolean getReducestock()
283 throws AccessPoemException {
284 readLock();
285 return getReducestock_unsafe();
286 }
287
288
289 /**
290 * Sets the <code>Reducestock</code> value, with checking, for this
291 * <code>StockTransactionType</code> <code>Persistent</code>.
292 * Field description:
293 * Reduce Stock for Transactions of this type?
294 *
295 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
296 * @param cooked a validated <code>int</code>
297 * @throws AccessPoemException
298 * if the current <code>AccessToken</code>
299 * does not confer write access rights
300 * @throws ValidationPoemException
301 * if the value is not valid
302 */
303 public void setReducestock(Boolean cooked)
304 throws AccessPoemException, ValidationPoemException {
305 _getStockTransactionTypeTable().getReducestockColumn().
306 getType().assertValidCooked(cooked);
307 writeLock();
308 setReducestock_unsafe(cooked);
309 }
310
311 /**
312 * Sets the <code>Reducestock</code> value, with checking,
313 * from a <code>boolean</code>, for this
314 * <code>StockTransactionType</code> <code>Persistent</code>.
315 * Field description:
316 * Reduce Stock for Transactions of this type?
317 *
318 *
319 * @generator org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods
320 * @param cooked a <code>boolean</code>
321 * @throws AccessPoemException
322 * if the current <code>AccessToken</code>
323 * does not confer write access rights
324 * @throws ValidationPoemException
325 * if the value is not valid
326 */
327
328 public final void setReducestock(boolean cooked)
329 throws AccessPoemException, ValidationPoemException {
330 setReducestock(cooked ? Boolean.TRUE : Boolean.FALSE);
331 }
332
333
334 /**
335 * Retrieves the <code>Reducestock</code> value as a <code>Field</code>
336 * from this <code>StockTransactionType</code> <code>Persistent</code>.
337 *
338 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
339 * @throws AccessPoemException
340 * if the current <code>AccessToken</code>
341 * does not confer write access rights
342 * @return the Boolean reducestock
343 */
344 public Field getReducestockField() throws AccessPoemException {
345 Column c = _getStockTransactionTypeTable().getReducestockColumn();
346 return new Field(c.getRaw(this), c);
347 }
348 }
349