Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ShopOrderItemBase |
|
| 1.0727272727272728;1.073 |
1 | // Do not edit this file! It was generated by Melati POEM's DSD preprocessor. | |
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.NoSuchRowPoemException; | |
11 | import org.melati.poem.ValidationPoemException; | |
12 | import org.paneris.jammyjoes.model.JammyjoesDatabaseTables; | |
13 | import org.paneris.jammyjoes.model.Product; | |
14 | import org.paneris.jammyjoes.model.ShopOrder; | |
15 | import org.paneris.jammyjoes.model.ShopOrderItemTable; | |
16 | import org.paneris.jammyjoes.model.StockTransaction; | |
17 | import org.paneris.jammyjoes.model.User; | |
18 | ||
19 | ||
20 | /** | |
21 | * Melati POEM generated abstract base class for a <code>Persistent</code> | |
22 | * <code>ShopOrderItem</code> Object. | |
23 | * | |
24 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
25 | */ | |
26 | 0 | public abstract class ShopOrderItemBase extends JdbcPersistent { |
27 | ||
28 | ||
29 | /** | |
30 | * Retrieves the Database object. | |
31 | * | |
32 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
33 | * @return the database | |
34 | */ | |
35 | public JammyjoesDatabaseTables getJammyjoesDatabaseTables() { | |
36 | 0 | return (JammyjoesDatabaseTables)getDatabase(); |
37 | } | |
38 | ||
39 | ||
40 | /** | |
41 | * Retrieves the <code>ShopOrderItemTable</code> table | |
42 | * which this <code>Persistent</code> is from. | |
43 | * | |
44 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
45 | * @return the ShopOrderItemTable | |
46 | */ | |
47 | public ShopOrderItemTable getShopOrderItemTable() { | |
48 | 0 | return (ShopOrderItemTable)getTable(); |
49 | } | |
50 | ||
51 | private ShopOrderItemTable _getShopOrderItemTable() { | |
52 | 0 | return (ShopOrderItemTable)getTable(); |
53 | } | |
54 | ||
55 | // Fields in this table | |
56 | /** | |
57 | * id | |
58 | */ | |
59 | protected Integer id; | |
60 | /** | |
61 | * User | |
62 | */ | |
63 | protected Integer user; | |
64 | /** | |
65 | * Product | |
66 | */ | |
67 | protected Integer product; | |
68 | /** | |
69 | * Stock Transaction | |
70 | */ | |
71 | protected Integer stocktransaction; | |
72 | /** | |
73 | * Quantity | |
74 | */ | |
75 | protected Integer quantity; | |
76 | /** | |
77 | * Order Number - The order number for this pruchase | |
78 | */ | |
79 | protected Integer order; | |
80 | /** | |
81 | * Amount (in customer's currency) - The amount of this line (in customer's | |
82 | * currency) | |
83 | */ | |
84 | protected Double amount; | |
85 | /** | |
86 | * Amount (UK Sterling Equivalent) - The amount of this line (UK Sterling | |
87 | * Equivalent) | |
88 | */ | |
89 | protected Double amountUK; | |
90 | ||
91 | ||
92 | /** | |
93 | * Retrieves the <code>Id</code> value, without locking, | |
94 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
95 | * | |
96 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
97 | * @return the Integer id | |
98 | */ | |
99 | public Integer getId_unsafe() { | |
100 | 0 | return id; |
101 | } | |
102 | ||
103 | ||
104 | /** | |
105 | * Sets the <code>Id</code> value directly, without checking, | |
106 | * for this ShopOrderItem <code>Persistent</code>. | |
107 | * | |
108 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
109 | * @param cooked the pre-validated value to set | |
110 | */ | |
111 | public void setId_unsafe(Integer cooked) { | |
112 | 0 | id = cooked; |
113 | 0 | } |
114 | ||
115 | /** | |
116 | * Retrieves the Id value, with locking, for this | |
117 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
118 | * | |
119 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
120 | * @throws AccessPoemException | |
121 | * if the current <code>AccessToken</code> | |
122 | * does not confer write access rights | |
123 | * @return the value of the field <code>Id</code> for this | |
124 | * <code>ShopOrderItem</code> <code>Persistent</code> | |
125 | */ | |
126 | ||
127 | public Integer getId() | |
128 | throws AccessPoemException { | |
129 | 0 | readLock(); |
130 | 0 | return getId_unsafe(); |
131 | } | |
132 | ||
133 | ||
134 | /** | |
135 | * Sets the <code>Id</code> value, with checking, for this | |
136 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
137 | * | |
138 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
139 | * @param cooked a validated <code>int</code> | |
140 | * @throws AccessPoemException | |
141 | * if the current <code>AccessToken</code> | |
142 | * does not confer write access rights | |
143 | * @throws ValidationPoemException | |
144 | * if the value is not valid | |
145 | */ | |
146 | public void setId(Integer cooked) | |
147 | throws AccessPoemException, ValidationPoemException { | |
148 | 0 | _getShopOrderItemTable().getIdColumn(). |
149 | getType().assertValidCooked(cooked); | |
150 | 0 | writeLock(); |
151 | 0 | setId_unsafe(cooked); |
152 | 0 | } |
153 | ||
154 | /** | |
155 | * Sets the <code>Id</code> value, with checking, for this | |
156 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
157 | * | |
158 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
159 | * @param cooked a validated <code>int</code> | |
160 | * @throws AccessPoemException | |
161 | * if the current <code>AccessToken</code> | |
162 | * does not confer write access rights | |
163 | * @throws ValidationPoemException | |
164 | * if the value is not valid | |
165 | */ | |
166 | ||
167 | public final void setId(int cooked) | |
168 | throws AccessPoemException, ValidationPoemException { | |
169 | 0 | setId(new Integer(cooked)); |
170 | 0 | } |
171 | ||
172 | ||
173 | /** | |
174 | * Retrieves the <code>Id</code> value as a <code>Field</code> | |
175 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
176 | * | |
177 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
178 | * @throws AccessPoemException | |
179 | * if the current <code>AccessToken</code> | |
180 | * does not confer write access rights | |
181 | * @return the Integer id | |
182 | */ | |
183 | public Field getIdField() throws AccessPoemException { | |
184 | 0 | Column c = _getShopOrderItemTable().getIdColumn(); |
185 | 0 | return new Field(c.getRaw(this), c); |
186 | } | |
187 | ||
188 | ||
189 | /** | |
190 | * Retrieves the <code>User</code> value, without locking, | |
191 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
192 | * | |
193 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
194 | * @return the Integer user | |
195 | */ | |
196 | public Integer getUser_unsafe() { | |
197 | 0 | return user; |
198 | } | |
199 | ||
200 | ||
201 | /** | |
202 | * Sets the <code>User</code> value directly, without checking, | |
203 | * for this ShopOrderItem <code>Persistent</code>. | |
204 | * | |
205 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
206 | * @param cooked the pre-validated value to set | |
207 | */ | |
208 | public void setUser_unsafe(Integer cooked) { | |
209 | 0 | user = cooked; |
210 | 0 | } |
211 | ||
212 | /** | |
213 | * Retrieves the Table Row Object ID. | |
214 | * | |
215 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
216 | * @throws AccessPoemException | |
217 | * if the current <code>AccessToken</code> | |
218 | * does not confer read access rights | |
219 | * @return the TROID as an <code>Integer</code> | |
220 | */ | |
221 | ||
222 | public Integer getUserTroid() | |
223 | throws AccessPoemException { | |
224 | 0 | readLock(); |
225 | 0 | return getUser_unsafe(); |
226 | } | |
227 | ||
228 | ||
229 | /** | |
230 | * Sets the Table Row Object ID. | |
231 | * | |
232 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
233 | * @param raw a Table Row Object Id | |
234 | * @throws AccessPoemException | |
235 | * if the current <code>AccessToken</code> | |
236 | * does not confer write access rights | |
237 | */ | |
238 | public void setUserTroid(Integer raw) | |
239 | throws AccessPoemException { | |
240 | 0 | setUser(raw == null ? null : |
241 | (User)getJammyjoesDatabaseTables().getUserTable().getUserObject(raw)); | |
242 | 0 | } |
243 | ||
244 | ||
245 | /** | |
246 | * Retrieves the <code>User</code> object referred to. | |
247 | * | |
248 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
249 | * @throws AccessPoemException | |
250 | * if the current <code>AccessToken</code> | |
251 | * does not confer read access rights | |
252 | * @throws NoSuchRowPoemException | |
253 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
254 | * @return the <code>User</code> as a <code>User</code> | |
255 | */ | |
256 | public User getUser() | |
257 | throws AccessPoemException, NoSuchRowPoemException { | |
258 | 0 | Integer troid = getUserTroid(); |
259 | 0 | return troid == null ? null : |
260 | (User)getJammyjoesDatabaseTables().getUserTable().getUserObject(troid); | |
261 | } | |
262 | ||
263 | ||
264 | /** | |
265 | * Set the User. | |
266 | * | |
267 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
268 | * @param cooked a validated <code>User</code> | |
269 | * @throws AccessPoemException | |
270 | * if the current <code>AccessToken</code> | |
271 | * does not confer write access rights | |
272 | */ | |
273 | public void setUser(User cooked) | |
274 | throws AccessPoemException { | |
275 | 0 | _getShopOrderItemTable(). |
276 | getUserColumn(). | |
277 | getType().assertValidCooked(cooked); | |
278 | 0 | writeLock(); |
279 | 0 | if (cooked == null) |
280 | 0 | setUser_unsafe(null); |
281 | else { | |
282 | 0 | cooked.existenceLock(); |
283 | 0 | setUser_unsafe(cooked.troid()); |
284 | } | |
285 | 0 | } |
286 | ||
287 | ||
288 | /** | |
289 | * Retrieves the <code>User</code> value as a <code>Field</code> | |
290 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
291 | * | |
292 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
293 | * @throws AccessPoemException | |
294 | * if the current <code>AccessToken</code> | |
295 | * does not confer write access rights | |
296 | * @return the Integer user | |
297 | */ | |
298 | public Field getUserField() throws AccessPoemException { | |
299 | 0 | Column c = _getShopOrderItemTable().getUserColumn(); |
300 | 0 | return new Field(c.getRaw(this), c); |
301 | } | |
302 | ||
303 | ||
304 | /** | |
305 | * Retrieves the <code>Product</code> value, without locking, | |
306 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
307 | * | |
308 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
309 | * @return the Integer product | |
310 | */ | |
311 | public Integer getProduct_unsafe() { | |
312 | 0 | return product; |
313 | } | |
314 | ||
315 | ||
316 | /** | |
317 | * Sets the <code>Product</code> value directly, without checking, | |
318 | * for this ShopOrderItem <code>Persistent</code>. | |
319 | * | |
320 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
321 | * @param cooked the pre-validated value to set | |
322 | */ | |
323 | public void setProduct_unsafe(Integer cooked) { | |
324 | 0 | product = cooked; |
325 | 0 | } |
326 | ||
327 | /** | |
328 | * Retrieves the Table Row Object ID. | |
329 | * | |
330 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
331 | * @throws AccessPoemException | |
332 | * if the current <code>AccessToken</code> | |
333 | * does not confer read access rights | |
334 | * @return the TROID as an <code>Integer</code> | |
335 | */ | |
336 | ||
337 | public Integer getProductTroid() | |
338 | throws AccessPoemException { | |
339 | 0 | readLock(); |
340 | 0 | return getProduct_unsafe(); |
341 | } | |
342 | ||
343 | ||
344 | /** | |
345 | * Sets the Table Row Object ID. | |
346 | * | |
347 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
348 | * @param raw a Table Row Object Id | |
349 | * @throws AccessPoemException | |
350 | * if the current <code>AccessToken</code> | |
351 | * does not confer write access rights | |
352 | */ | |
353 | public void setProductTroid(Integer raw) | |
354 | throws AccessPoemException { | |
355 | 0 | setProduct(raw == null ? null : |
356 | getJammyjoesDatabaseTables().getProductTable().getProductObject(raw)); | |
357 | 0 | } |
358 | ||
359 | ||
360 | /** | |
361 | * Retrieves the <code>Product</code> object referred to. | |
362 | * | |
363 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
364 | * @throws AccessPoemException | |
365 | * if the current <code>AccessToken</code> | |
366 | * does not confer read access rights | |
367 | * @throws NoSuchRowPoemException | |
368 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
369 | * @return the <code>Product</code> as a <code>Product</code> | |
370 | */ | |
371 | public Product getProduct() | |
372 | throws AccessPoemException, NoSuchRowPoemException { | |
373 | 0 | Integer troid = getProductTroid(); |
374 | 0 | return troid == null ? null : |
375 | getJammyjoesDatabaseTables().getProductTable().getProductObject(troid); | |
376 | } | |
377 | ||
378 | ||
379 | /** | |
380 | * Set the Product. | |
381 | * | |
382 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
383 | * @param cooked a validated <code>Product</code> | |
384 | * @throws AccessPoemException | |
385 | * if the current <code>AccessToken</code> | |
386 | * does not confer write access rights | |
387 | */ | |
388 | public void setProduct(Product cooked) | |
389 | throws AccessPoemException { | |
390 | 0 | _getShopOrderItemTable(). |
391 | getProductColumn(). | |
392 | getType().assertValidCooked(cooked); | |
393 | 0 | writeLock(); |
394 | 0 | if (cooked == null) |
395 | 0 | setProduct_unsafe(null); |
396 | else { | |
397 | 0 | cooked.existenceLock(); |
398 | 0 | setProduct_unsafe(cooked.troid()); |
399 | } | |
400 | 0 | } |
401 | ||
402 | ||
403 | /** | |
404 | * Retrieves the <code>Product</code> value as a <code>Field</code> | |
405 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
406 | * | |
407 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
408 | * @throws AccessPoemException | |
409 | * if the current <code>AccessToken</code> | |
410 | * does not confer write access rights | |
411 | * @return the Integer product | |
412 | */ | |
413 | public Field getProductField() throws AccessPoemException { | |
414 | 0 | Column c = _getShopOrderItemTable().getProductColumn(); |
415 | 0 | return new Field(c.getRaw(this), c); |
416 | } | |
417 | ||
418 | ||
419 | /** | |
420 | * Retrieves the <code>Stocktransaction</code> value, without locking, | |
421 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
422 | * | |
423 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
424 | * @return the Integer stocktransaction | |
425 | */ | |
426 | public Integer getStocktransaction_unsafe() { | |
427 | 0 | return stocktransaction; |
428 | } | |
429 | ||
430 | ||
431 | /** | |
432 | * Sets the <code>Stocktransaction</code> value directly, without checking, | |
433 | * for this ShopOrderItem <code>Persistent</code>. | |
434 | * | |
435 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
436 | * @param cooked the pre-validated value to set | |
437 | */ | |
438 | public void setStocktransaction_unsafe(Integer cooked) { | |
439 | 0 | stocktransaction = cooked; |
440 | 0 | } |
441 | ||
442 | /** | |
443 | * Retrieves the Table Row Object ID. | |
444 | * | |
445 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
446 | * @throws AccessPoemException | |
447 | * if the current <code>AccessToken</code> | |
448 | * does not confer read access rights | |
449 | * @return the TROID as an <code>Integer</code> | |
450 | */ | |
451 | ||
452 | public Integer getStocktransactionTroid() | |
453 | throws AccessPoemException { | |
454 | 0 | readLock(); |
455 | 0 | return getStocktransaction_unsafe(); |
456 | } | |
457 | ||
458 | ||
459 | /** | |
460 | * Sets the Table Row Object ID. | |
461 | * | |
462 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
463 | * @param raw a Table Row Object Id | |
464 | * @throws AccessPoemException | |
465 | * if the current <code>AccessToken</code> | |
466 | * does not confer write access rights | |
467 | */ | |
468 | public void setStocktransactionTroid(Integer raw) | |
469 | throws AccessPoemException { | |
470 | 0 | setStocktransaction(raw == null ? null : |
471 | getJammyjoesDatabaseTables().getStockTransactionTable().getStockTransactionObject(raw)); | |
472 | 0 | } |
473 | ||
474 | ||
475 | /** | |
476 | * Retrieves the <code>Stocktransaction</code> object referred to. | |
477 | * | |
478 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
479 | * @throws AccessPoemException | |
480 | * if the current <code>AccessToken</code> | |
481 | * does not confer read access rights | |
482 | * @throws NoSuchRowPoemException | |
483 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
484 | * @return the <code>Stocktransaction</code> as a <code>StockTransaction</code> | |
485 | */ | |
486 | public StockTransaction getStocktransaction() | |
487 | throws AccessPoemException, NoSuchRowPoemException { | |
488 | 0 | Integer troid = getStocktransactionTroid(); |
489 | 0 | return troid == null ? null : |
490 | getJammyjoesDatabaseTables().getStockTransactionTable().getStockTransactionObject(troid); | |
491 | } | |
492 | ||
493 | ||
494 | /** | |
495 | * Set the Stocktransaction. | |
496 | * | |
497 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
498 | * @param cooked a validated <code>StockTransaction</code> | |
499 | * @throws AccessPoemException | |
500 | * if the current <code>AccessToken</code> | |
501 | * does not confer write access rights | |
502 | */ | |
503 | public void setStocktransaction(StockTransaction cooked) | |
504 | throws AccessPoemException { | |
505 | 0 | _getShopOrderItemTable(). |
506 | getStocktransactionColumn(). | |
507 | getType().assertValidCooked(cooked); | |
508 | 0 | writeLock(); |
509 | 0 | if (cooked == null) |
510 | 0 | setStocktransaction_unsafe(null); |
511 | else { | |
512 | 0 | cooked.existenceLock(); |
513 | 0 | setStocktransaction_unsafe(cooked.troid()); |
514 | } | |
515 | 0 | } |
516 | ||
517 | ||
518 | /** | |
519 | * Retrieves the <code>Stocktransaction</code> value as a <code>Field</code> | |
520 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
521 | * | |
522 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
523 | * @throws AccessPoemException | |
524 | * if the current <code>AccessToken</code> | |
525 | * does not confer write access rights | |
526 | * @return the Integer stocktransaction | |
527 | */ | |
528 | public Field getStocktransactionField() throws AccessPoemException { | |
529 | 0 | Column c = _getShopOrderItemTable().getStocktransactionColumn(); |
530 | 0 | return new Field(c.getRaw(this), c); |
531 | } | |
532 | ||
533 | ||
534 | /** | |
535 | * Retrieves the <code>Quantity</code> value, without locking, | |
536 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
537 | * | |
538 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
539 | * @return the Integer quantity | |
540 | */ | |
541 | public Integer getQuantity_unsafe() { | |
542 | 0 | return quantity; |
543 | } | |
544 | ||
545 | ||
546 | /** | |
547 | * Sets the <code>Quantity</code> value directly, without checking, | |
548 | * for this ShopOrderItem <code>Persistent</code>. | |
549 | * | |
550 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
551 | * @param cooked the pre-validated value to set | |
552 | */ | |
553 | public void setQuantity_unsafe(Integer cooked) { | |
554 | 0 | quantity = cooked; |
555 | 0 | } |
556 | ||
557 | /** | |
558 | * Retrieves the Quantity value, with locking, for this | |
559 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
560 | * | |
561 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
562 | * @throws AccessPoemException | |
563 | * if the current <code>AccessToken</code> | |
564 | * does not confer write access rights | |
565 | * @return the value of the field <code>Quantity</code> for this | |
566 | * <code>ShopOrderItem</code> <code>Persistent</code> | |
567 | */ | |
568 | ||
569 | public Integer getQuantity() | |
570 | throws AccessPoemException { | |
571 | 0 | readLock(); |
572 | 0 | return getQuantity_unsafe(); |
573 | } | |
574 | ||
575 | ||
576 | /** | |
577 | * Sets the <code>Quantity</code> value, with checking, for this | |
578 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
579 | * | |
580 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
581 | * @param cooked a validated <code>int</code> | |
582 | * @throws AccessPoemException | |
583 | * if the current <code>AccessToken</code> | |
584 | * does not confer write access rights | |
585 | * @throws ValidationPoemException | |
586 | * if the value is not valid | |
587 | */ | |
588 | public void setQuantity(Integer cooked) | |
589 | throws AccessPoemException, ValidationPoemException { | |
590 | 0 | _getShopOrderItemTable().getQuantityColumn(). |
591 | getType().assertValidCooked(cooked); | |
592 | 0 | writeLock(); |
593 | 0 | setQuantity_unsafe(cooked); |
594 | 0 | } |
595 | ||
596 | /** | |
597 | * Sets the <code>Quantity</code> value, with checking, for this | |
598 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
599 | * | |
600 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
601 | * @param cooked a validated <code>int</code> | |
602 | * @throws AccessPoemException | |
603 | * if the current <code>AccessToken</code> | |
604 | * does not confer write access rights | |
605 | * @throws ValidationPoemException | |
606 | * if the value is not valid | |
607 | */ | |
608 | ||
609 | public final void setQuantity(int cooked) | |
610 | throws AccessPoemException, ValidationPoemException { | |
611 | 0 | setQuantity(new Integer(cooked)); |
612 | 0 | } |
613 | ||
614 | ||
615 | /** | |
616 | * Retrieves the <code>Quantity</code> value as a <code>Field</code> | |
617 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
618 | * | |
619 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
620 | * @throws AccessPoemException | |
621 | * if the current <code>AccessToken</code> | |
622 | * does not confer write access rights | |
623 | * @return the Integer quantity | |
624 | */ | |
625 | public Field getQuantityField() throws AccessPoemException { | |
626 | 0 | Column c = _getShopOrderItemTable().getQuantityColumn(); |
627 | 0 | return new Field(c.getRaw(this), c); |
628 | } | |
629 | ||
630 | ||
631 | /** | |
632 | * Retrieves the <code>Order</code> value, without locking, | |
633 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
634 | * | |
635 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
636 | * @return the Integer order | |
637 | */ | |
638 | public Integer getOrder_unsafe() { | |
639 | 0 | return order; |
640 | } | |
641 | ||
642 | ||
643 | /** | |
644 | * Sets the <code>Order</code> value directly, without checking, | |
645 | * for this ShopOrderItem <code>Persistent</code>. | |
646 | * | |
647 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
648 | * @param cooked the pre-validated value to set | |
649 | */ | |
650 | public void setOrder_unsafe(Integer cooked) { | |
651 | 0 | order = cooked; |
652 | 0 | } |
653 | ||
654 | /** | |
655 | * Retrieves the Table Row Object ID. | |
656 | * | |
657 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
658 | * @throws AccessPoemException | |
659 | * if the current <code>AccessToken</code> | |
660 | * does not confer read access rights | |
661 | * @return the TROID as an <code>Integer</code> | |
662 | */ | |
663 | ||
664 | public Integer getOrderTroid() | |
665 | throws AccessPoemException { | |
666 | 0 | readLock(); |
667 | 0 | return getOrder_unsafe(); |
668 | } | |
669 | ||
670 | ||
671 | /** | |
672 | * Sets the Table Row Object ID. | |
673 | * | |
674 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
675 | * @param raw a Table Row Object Id | |
676 | * @throws AccessPoemException | |
677 | * if the current <code>AccessToken</code> | |
678 | * does not confer write access rights | |
679 | */ | |
680 | public void setOrderTroid(Integer raw) | |
681 | throws AccessPoemException { | |
682 | 0 | setOrder(raw == null ? null : |
683 | getJammyjoesDatabaseTables().getShopOrderTable().getShopOrderObject(raw)); | |
684 | 0 | } |
685 | ||
686 | ||
687 | /** | |
688 | * Retrieves the <code>Order</code> object referred to. | |
689 | * | |
690 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
691 | * @throws AccessPoemException | |
692 | * if the current <code>AccessToken</code> | |
693 | * does not confer read access rights | |
694 | * @throws NoSuchRowPoemException | |
695 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
696 | * @return the <code>Order</code> as a <code>ShopOrder</code> | |
697 | */ | |
698 | public ShopOrder getOrder() | |
699 | throws AccessPoemException, NoSuchRowPoemException { | |
700 | 0 | Integer troid = getOrderTroid(); |
701 | 0 | return troid == null ? null : |
702 | getJammyjoesDatabaseTables().getShopOrderTable().getShopOrderObject(troid); | |
703 | } | |
704 | ||
705 | ||
706 | /** | |
707 | * Set the Order. | |
708 | * | |
709 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
710 | * @param cooked a validated <code>ShopOrder</code> | |
711 | * @throws AccessPoemException | |
712 | * if the current <code>AccessToken</code> | |
713 | * does not confer write access rights | |
714 | */ | |
715 | public void setOrder(ShopOrder cooked) | |
716 | throws AccessPoemException { | |
717 | 0 | _getShopOrderItemTable(). |
718 | getOrderColumn(). | |
719 | getType().assertValidCooked(cooked); | |
720 | 0 | writeLock(); |
721 | 0 | if (cooked == null) |
722 | 0 | setOrder_unsafe(null); |
723 | else { | |
724 | 0 | cooked.existenceLock(); |
725 | 0 | setOrder_unsafe(cooked.troid()); |
726 | } | |
727 | 0 | } |
728 | ||
729 | ||
730 | /** | |
731 | * Retrieves the <code>Order</code> value as a <code>Field</code> | |
732 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
733 | * | |
734 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
735 | * @throws AccessPoemException | |
736 | * if the current <code>AccessToken</code> | |
737 | * does not confer write access rights | |
738 | * @return the Integer order | |
739 | */ | |
740 | public Field getOrderField() throws AccessPoemException { | |
741 | 0 | Column c = _getShopOrderItemTable().getOrderColumn(); |
742 | 0 | return new Field(c.getRaw(this), c); |
743 | } | |
744 | ||
745 | ||
746 | /** | |
747 | * Retrieves the <code>Amount</code> value, without locking, | |
748 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
749 | * | |
750 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
751 | * @return the Double amount | |
752 | */ | |
753 | public Double getAmount_unsafe() { | |
754 | 0 | return amount; |
755 | } | |
756 | ||
757 | ||
758 | /** | |
759 | * Sets the <code>Amount</code> value directly, without checking, | |
760 | * for this ShopOrderItem <code>Persistent</code>. | |
761 | * | |
762 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
763 | * @param cooked the pre-validated value to set | |
764 | */ | |
765 | public void setAmount_unsafe(Double cooked) { | |
766 | 0 | amount = cooked; |
767 | 0 | } |
768 | ||
769 | /** | |
770 | * Retrieves the Amount value, with locking, for this | |
771 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
772 | * Field description: | |
773 | * The amount of this line (in customer's currency) | |
774 | * | |
775 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
776 | * @throws AccessPoemException | |
777 | * if the current <code>AccessToken</code> | |
778 | * does not confer write access rights | |
779 | * @return the value of the field <code>Amount</code> for this | |
780 | * <code>ShopOrderItem</code> <code>Persistent</code> | |
781 | */ | |
782 | ||
783 | public Double getAmount() | |
784 | throws AccessPoemException { | |
785 | 0 | readLock(); |
786 | 0 | return getAmount_unsafe(); |
787 | } | |
788 | ||
789 | ||
790 | /** | |
791 | * Sets the <code>Amount</code> value, with checking, for this | |
792 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
793 | * Field description: | |
794 | * The amount of this line (in customer's currency) | |
795 | * | |
796 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
797 | * @param cooked a validated <code>int</code> | |
798 | * @throws AccessPoemException | |
799 | * if the current <code>AccessToken</code> | |
800 | * does not confer write access rights | |
801 | * @throws ValidationPoemException | |
802 | * if the value is not valid | |
803 | */ | |
804 | public void setAmount(Double cooked) | |
805 | throws AccessPoemException, ValidationPoemException { | |
806 | 0 | _getShopOrderItemTable().getAmountColumn(). |
807 | getType().assertValidCooked(cooked); | |
808 | 0 | writeLock(); |
809 | 0 | setAmount_unsafe(cooked); |
810 | 0 | } |
811 | ||
812 | /** | |
813 | * Sets the <code>Amount</code> value, with checking, for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
814 | * Field description: | |
815 | * The amount of this line (in customer's currency) | |
816 | * | |
817 | * | |
818 | * @generator org.melati.poem.prepro.DoubleFieldDef#generateBaseMethods | |
819 | * @param cooked a validated <code>int</code> | |
820 | * @throws AccessPoemException | |
821 | * if the current <code>AccessToken</code> | |
822 | * does not confer write access rights | |
823 | * @throws ValidationPoemException | |
824 | * if the value is not valid | |
825 | */ | |
826 | ||
827 | public final void setAmount(double cooked) | |
828 | throws AccessPoemException, ValidationPoemException { | |
829 | 0 | setAmount(new Double(cooked)); |
830 | 0 | } |
831 | ||
832 | ||
833 | /** | |
834 | * Retrieves the <code>Amount</code> value as a <code>Field</code> | |
835 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
836 | * | |
837 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
838 | * @throws AccessPoemException | |
839 | * if the current <code>AccessToken</code> | |
840 | * does not confer write access rights | |
841 | * @return the Double amount | |
842 | */ | |
843 | public Field getAmountField() throws AccessPoemException { | |
844 | 0 | Column c = _getShopOrderItemTable().getAmountColumn(); |
845 | 0 | return new Field(c.getRaw(this), c); |
846 | } | |
847 | ||
848 | ||
849 | /** | |
850 | * Retrieves the <code>AmountUK</code> value, without locking, | |
851 | * for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
852 | * | |
853 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
854 | * @return the Double amountUK | |
855 | */ | |
856 | public Double getAmountUK_unsafe() { | |
857 | 0 | return amountUK; |
858 | } | |
859 | ||
860 | ||
861 | /** | |
862 | * Sets the <code>AmountUK</code> value directly, without checking, | |
863 | * for this ShopOrderItem <code>Persistent</code>. | |
864 | * | |
865 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
866 | * @param cooked the pre-validated value to set | |
867 | */ | |
868 | public void setAmountUK_unsafe(Double cooked) { | |
869 | 0 | amountUK = cooked; |
870 | 0 | } |
871 | ||
872 | /** | |
873 | * Retrieves the AmountUK value, with locking, for this | |
874 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
875 | * Field description: | |
876 | * The amount of this line (UK Sterling Equivalent) | |
877 | * | |
878 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
879 | * @throws AccessPoemException | |
880 | * if the current <code>AccessToken</code> | |
881 | * does not confer write access rights | |
882 | * @return the value of the field <code>AmountUK</code> for this | |
883 | * <code>ShopOrderItem</code> <code>Persistent</code> | |
884 | */ | |
885 | ||
886 | public Double getAmountUK() | |
887 | throws AccessPoemException { | |
888 | 0 | readLock(); |
889 | 0 | return getAmountUK_unsafe(); |
890 | } | |
891 | ||
892 | ||
893 | /** | |
894 | * Sets the <code>AmountUK</code> value, with checking, for this | |
895 | * <code>ShopOrderItem</code> <code>Persistent</code>. | |
896 | * Field description: | |
897 | * The amount of this line (UK Sterling Equivalent) | |
898 | * | |
899 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
900 | * @param cooked a validated <code>int</code> | |
901 | * @throws AccessPoemException | |
902 | * if the current <code>AccessToken</code> | |
903 | * does not confer write access rights | |
904 | * @throws ValidationPoemException | |
905 | * if the value is not valid | |
906 | */ | |
907 | public void setAmountUK(Double cooked) | |
908 | throws AccessPoemException, ValidationPoemException { | |
909 | 0 | _getShopOrderItemTable().getAmountUKColumn(). |
910 | getType().assertValidCooked(cooked); | |
911 | 0 | writeLock(); |
912 | 0 | setAmountUK_unsafe(cooked); |
913 | 0 | } |
914 | ||
915 | /** | |
916 | * Sets the <code>AmountUK</code> value, with checking, for this <code>ShopOrderItem</code> <code>Persistent</code>. | |
917 | * Field description: | |
918 | * The amount of this line (UK Sterling Equivalent) | |
919 | * | |
920 | * | |
921 | * @generator org.melati.poem.prepro.DoubleFieldDef#generateBaseMethods | |
922 | * @param cooked a validated <code>int</code> | |
923 | * @throws AccessPoemException | |
924 | * if the current <code>AccessToken</code> | |
925 | * does not confer write access rights | |
926 | * @throws ValidationPoemException | |
927 | * if the value is not valid | |
928 | */ | |
929 | ||
930 | public final void setAmountUK(double cooked) | |
931 | throws AccessPoemException, ValidationPoemException { | |
932 | 0 | setAmountUK(new Double(cooked)); |
933 | 0 | } |
934 | ||
935 | ||
936 | /** | |
937 | * Retrieves the <code>AmountUK</code> value as a <code>Field</code> | |
938 | * from this <code>ShopOrderItem</code> <code>Persistent</code>. | |
939 | * | |
940 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
941 | * @throws AccessPoemException | |
942 | * if the current <code>AccessToken</code> | |
943 | * does not confer write access rights | |
944 | * @return the Double amountUK | |
945 | */ | |
946 | public Field getAmountUKField() throws AccessPoemException { | |
947 | 0 | Column c = _getShopOrderItemTable().getAmountUKColumn(); |
948 | 0 | return new Field(c.getRaw(this), c); |
949 | } | |
950 | } | |
951 |