Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
BookBase |
|
| 1.2474226804123711;1.247 |
1 | // Do not edit this file! It was generated by Melati POEM's DSD preprocessor. | |
2 | ||
3 | package org.paneris.bibliomania.generated; | |
4 | ||
5 | ||
6 | import java.sql.Timestamp; | |
7 | import java.util.Collections; | |
8 | import java.util.Enumeration; | |
9 | import java.util.List; | |
10 | import org.melati.poem.AccessPoemException; | |
11 | import org.melati.poem.CachedSelection; | |
12 | import org.melati.poem.Capability; | |
13 | import org.melati.poem.Column; | |
14 | import org.melati.poem.Field; | |
15 | import org.melati.poem.NoSuchRowPoemException; | |
16 | import org.melati.poem.ValidationPoemException; | |
17 | import org.melati.poem.util.EmptyEnumeration; | |
18 | import org.paneris.bibliomania.Advert; | |
19 | import org.paneris.bibliomania.Author; | |
20 | import org.paneris.bibliomania.BibliomaniaDatabaseTables; | |
21 | import org.paneris.bibliomania.Book; | |
22 | import org.paneris.bibliomania.BookStocking; | |
23 | import org.paneris.bibliomania.BookTable; | |
24 | import org.paneris.bibliomania.Product; | |
25 | import org.paneris.bibliomania.ProductAssociation; | |
26 | import org.paneris.bibliomania.Section; | |
27 | import org.paneris.bibliomania.Unit; | |
28 | ||
29 | ||
30 | /** | |
31 | * Melati POEM generated abstract base class for a <code>Persistent</code> | |
32 | * <code>Book</code> Object. | |
33 | * | |
34 | * see org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
35 | */ | |
36 | 1663 | public abstract class BookBase extends Unit { |
37 | ||
38 | ||
39 | /** | |
40 | * Retrieves the Database object. | |
41 | * | |
42 | * see org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
43 | * @return the database | |
44 | */ | |
45 | public BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() { | |
46 | 81 | return (BibliomaniaDatabaseTables)getDatabase(); |
47 | } | |
48 | ||
49 | ||
50 | /** | |
51 | * Retrieves the <code>BookTable</code> table | |
52 | * which this <code>Persistent</code> is from. | |
53 | * | |
54 | * see org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
55 | * @return the BookTable | |
56 | */ | |
57 | @SuppressWarnings("unchecked") | |
58 | public BookTable<Book> getBookTable() { | |
59 | 0 | return (BookTable<Book>)getTable(); |
60 | } | |
61 | ||
62 | @SuppressWarnings("unchecked") | |
63 | private BookTable<Book> _getBookTable() { | |
64 | 0 | return (BookTable<Book>)getTable(); |
65 | } | |
66 | ||
67 | // Fields in this table | |
68 | /** | |
69 | * id | |
70 | */ | |
71 | protected Integer id; | |
72 | /** | |
73 | * section - The category under which the book falls | |
74 | */ | |
75 | protected Integer section; | |
76 | /** | |
77 | * author - The book's author | |
78 | */ | |
79 | protected Integer author; | |
80 | /** | |
81 | * advert - Advert for this book | |
82 | */ | |
83 | protected Integer advert; | |
84 | /** | |
85 | * authorsequence - An internal number used to distinguish between books by | |
86 | * the same author in creating textIDs for the full text indexing subsystem | |
87 | */ | |
88 | protected Integer authorsequence; | |
89 | /** | |
90 | * Short title - A manageably short version of the book's title | |
91 | */ | |
92 | protected String title; | |
93 | /** | |
94 | * Full title - The `full Monty' version of the book's title, if different | |
95 | */ | |
96 | protected String fulltitleifdifferent; | |
97 | /** | |
98 | * paginated - Whether the book's chapters should be displayed in | |
99 | * pre-paginated form | |
100 | */ | |
101 | protected Boolean paginated; | |
102 | /** | |
103 | * metatag_description | |
104 | */ | |
105 | protected String metatag_description; | |
106 | /** | |
107 | * metatag_keywords | |
108 | */ | |
109 | protected String metatag_keywords; | |
110 | /** | |
111 | * Last bookshop search - When a search was last made for stockings of this | |
112 | * book in the online bookshops | |
113 | */ | |
114 | protected Timestamp lastbookshopsearch; | |
115 | /** | |
116 | * `Read content' capability - The capability required for reading the book | |
117 | * (defaults to that for section) | |
118 | */ | |
119 | protected Integer overridecanreadcontent; | |
120 | /** | |
121 | * summary - The book's blurb, to appear on its TOC page | |
122 | */ | |
123 | protected String summary; | |
124 | /** | |
125 | * Has no front page - Whether the book should simply display the first page | |
126 | * of its content instead of a `front page' | |
127 | */ | |
128 | protected Boolean hasnofrontpage; | |
129 | /** | |
130 | * Non-standard - Whether the book has its own non-standard template | |
131 | */ | |
132 | protected Boolean nonstandard; | |
133 | ||
134 | ||
135 | /** | |
136 | * Retrieves the <code>Id</code> value, without locking, | |
137 | * for this <code>Book</code> <code>Persistent</code>. | |
138 | * | |
139 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
140 | * @return the Integer id | |
141 | */ | |
142 | public Integer getId_unsafe() { | |
143 | 4 | return id; |
144 | } | |
145 | ||
146 | ||
147 | /** | |
148 | * Sets the <code>Id</code> value directly, without checking, | |
149 | * for this Book <code>Persistent</code>. | |
150 | * | |
151 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
152 | * @param cooked the pre-validated value to set | |
153 | */ | |
154 | public void setId_unsafe(Integer cooked) { | |
155 | 3327 | id = cooked; |
156 | 3327 | } |
157 | ||
158 | /** | |
159 | * Retrieves the Id value, with locking, for this | |
160 | * <code>Book</code> <code>Persistent</code>. | |
161 | * | |
162 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
163 | * @throws AccessPoemException | |
164 | * if the current <code>AccessToken</code> | |
165 | * does not confer write access rights | |
166 | * @return the value of the field <code>Id</code> for this | |
167 | * <code>Book</code> <code>Persistent</code> | |
168 | */ | |
169 | ||
170 | public Integer getId() | |
171 | throws AccessPoemException { | |
172 | 3 | readLock(); |
173 | 3 | return getId_unsafe(); |
174 | } | |
175 | ||
176 | ||
177 | /** | |
178 | * Sets the <code>Id</code> value, with checking, for this | |
179 | * <code>Book</code> <code>Persistent</code>. | |
180 | * | |
181 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
182 | * @param cooked a validated <code>int</code> | |
183 | * @throws AccessPoemException | |
184 | * if the current <code>AccessToken</code> | |
185 | * does not confer write access rights | |
186 | * @throws ValidationPoemException | |
187 | * if the value is not valid | |
188 | */ | |
189 | public void setId(Integer cooked) | |
190 | throws AccessPoemException, ValidationPoemException { | |
191 | 0 | _getBookTable().getIdColumn(). |
192 | getType().assertValidCooked(cooked); | |
193 | 0 | writeLock(); |
194 | 0 | setId_unsafe(cooked); |
195 | 0 | } |
196 | ||
197 | /** | |
198 | * Sets the <code>Id</code> value, with checking, for this | |
199 | * <code>Book</code> <code>Persistent</code>. | |
200 | * | |
201 | * Generated by org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
202 | * @param cooked a validated <code>int</code> | |
203 | * @throws AccessPoemException | |
204 | * if the current <code>AccessToken</code> | |
205 | * does not confer write access rights | |
206 | * @throws ValidationPoemException | |
207 | * if the value is not valid | |
208 | */ | |
209 | ||
210 | public final void setId(int cooked) | |
211 | throws AccessPoemException, ValidationPoemException { | |
212 | 0 | setId(new Integer(cooked)); |
213 | 0 | } |
214 | ||
215 | ||
216 | /** | |
217 | * Retrieves the <code>Id</code> value as a <code>Field</code> | |
218 | * from this <code>Book</code> <code>Persistent</code>. | |
219 | * | |
220 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
221 | * @throws AccessPoemException | |
222 | * if the current <code>AccessToken</code> | |
223 | * does not confer write access rights | |
224 | * @return the Integer id | |
225 | */ | |
226 | public Field<Integer> getIdField() throws AccessPoemException { | |
227 | 0 | Column<Integer> c = _getBookTable().getIdColumn(); |
228 | 0 | return new Field<Integer>((Integer)c.getRaw(this), c); |
229 | } | |
230 | ||
231 | ||
232 | /** | |
233 | * Retrieves the <code>Section</code> value, without locking, | |
234 | * for this <code>Book</code> <code>Persistent</code>. | |
235 | * | |
236 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
237 | * @return the Integer section | |
238 | */ | |
239 | public Integer getSection_unsafe() { | |
240 | 66 | return section; |
241 | } | |
242 | ||
243 | ||
244 | /** | |
245 | * Sets the <code>Section</code> value directly, without checking, | |
246 | * for this Book <code>Persistent</code>. | |
247 | * | |
248 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
249 | * @param cooked the pre-validated value to set | |
250 | */ | |
251 | public void setSection_unsafe(Integer cooked) { | |
252 | 1663 | section = cooked; |
253 | 1663 | } |
254 | ||
255 | /** | |
256 | * Retrieves the Table Row Object ID. | |
257 | * | |
258 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
259 | * @throws AccessPoemException | |
260 | * if the current <code>AccessToken</code> | |
261 | * does not confer read access rights | |
262 | * @return the TROID as an <code>Integer</code> | |
263 | */ | |
264 | ||
265 | public Integer getSectionTroid() | |
266 | throws AccessPoemException { | |
267 | 65 | readLock(); |
268 | 65 | return getSection_unsafe(); |
269 | } | |
270 | ||
271 | ||
272 | /** | |
273 | * Sets the Table Row Object ID. | |
274 | * | |
275 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
276 | * @param raw a Table Row Object Id | |
277 | * @throws AccessPoemException | |
278 | * if the current <code>AccessToken</code> | |
279 | * does not confer write access rights | |
280 | */ | |
281 | public void setSectionTroid(Integer raw) | |
282 | throws AccessPoemException { | |
283 | 0 | setSection(raw == null ? null : |
284 | (Section)getBibliomaniaDatabaseTables().getSectionTable().getSectionObject(raw)); | |
285 | 0 | } |
286 | ||
287 | ||
288 | /** | |
289 | * Retrieves the <code>Section</code> object referred to. | |
290 | * | |
291 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
292 | * @throws AccessPoemException | |
293 | * if the current <code>AccessToken</code> | |
294 | * does not confer read access rights | |
295 | * @throws NoSuchRowPoemException | |
296 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
297 | * @return the <code>Section</code> as a <code>Section</code> | |
298 | */ | |
299 | public Section getSection() | |
300 | throws AccessPoemException, NoSuchRowPoemException { | |
301 | 43 | Integer troid = getSectionTroid(); |
302 | 43 | return troid == null ? null : |
303 | (Section)getBibliomaniaDatabaseTables().getSectionTable().getSectionObject(troid); | |
304 | } | |
305 | ||
306 | ||
307 | /** | |
308 | * Set the Section. | |
309 | * | |
310 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
311 | * @param cooked a validated <code>Section</code> | |
312 | * @throws AccessPoemException | |
313 | * if the current <code>AccessToken</code> | |
314 | * does not confer write access rights | |
315 | */ | |
316 | public void setSection(Section cooked) | |
317 | throws AccessPoemException { | |
318 | 0 | _getBookTable(). |
319 | getSectionColumn(). | |
320 | getType().assertValidCooked(cooked); | |
321 | 0 | writeLock(); |
322 | 0 | if (cooked == null) |
323 | 0 | setSection_unsafe(null); |
324 | else { | |
325 | 0 | cooked.existenceLock(); |
326 | 0 | setSection_unsafe(cooked.troid()); |
327 | } | |
328 | 0 | } |
329 | ||
330 | ||
331 | /** | |
332 | * Retrieves the <code>Section</code> value as a <code>Field</code> | |
333 | * from this <code>Book</code> <code>Persistent</code>. | |
334 | * | |
335 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
336 | * @throws AccessPoemException | |
337 | * if the current <code>AccessToken</code> | |
338 | * does not confer write access rights | |
339 | * @return the Integer section | |
340 | */ | |
341 | public Field<Integer> getSectionField() throws AccessPoemException { | |
342 | 0 | Column<Integer> c = _getBookTable().getSectionColumn(); |
343 | 0 | return new Field<Integer>((Integer)c.getRaw(this), c); |
344 | } | |
345 | ||
346 | ||
347 | /** | |
348 | * Retrieves the <code>Author</code> value, without locking, | |
349 | * for this <code>Book</code> <code>Persistent</code>. | |
350 | * | |
351 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
352 | * @return the Integer author | |
353 | */ | |
354 | public Integer getAuthor_unsafe() { | |
355 | 78 | return author; |
356 | } | |
357 | ||
358 | ||
359 | /** | |
360 | * Sets the <code>Author</code> value directly, without checking, | |
361 | * for this Book <code>Persistent</code>. | |
362 | * | |
363 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
364 | * @param cooked the pre-validated value to set | |
365 | */ | |
366 | public void setAuthor_unsafe(Integer cooked) { | |
367 | 1663 | author = cooked; |
368 | 1663 | } |
369 | ||
370 | /** | |
371 | * Retrieves the Table Row Object ID. | |
372 | * | |
373 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
374 | * @throws AccessPoemException | |
375 | * if the current <code>AccessToken</code> | |
376 | * does not confer read access rights | |
377 | * @return the TROID as an <code>Integer</code> | |
378 | */ | |
379 | ||
380 | public Integer getAuthorTroid() | |
381 | throws AccessPoemException { | |
382 | 77 | readLock(); |
383 | 77 | return getAuthor_unsafe(); |
384 | } | |
385 | ||
386 | ||
387 | /** | |
388 | * Sets the Table Row Object ID. | |
389 | * | |
390 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
391 | * @param raw a Table Row Object Id | |
392 | * @throws AccessPoemException | |
393 | * if the current <code>AccessToken</code> | |
394 | * does not confer write access rights | |
395 | */ | |
396 | public void setAuthorTroid(Integer raw) | |
397 | throws AccessPoemException { | |
398 | 0 | setAuthor(raw == null ? null : |
399 | (Author)getBibliomaniaDatabaseTables().getAuthorTable().getAuthorObject(raw)); | |
400 | 0 | } |
401 | ||
402 | ||
403 | /** | |
404 | * Retrieves the <code>Author</code> object referred to. | |
405 | * | |
406 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
407 | * @throws AccessPoemException | |
408 | * if the current <code>AccessToken</code> | |
409 | * does not confer read access rights | |
410 | * @throws NoSuchRowPoemException | |
411 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
412 | * @return the <code>Author</code> as a <code>Author</code> | |
413 | */ | |
414 | public Author getAuthor() | |
415 | throws AccessPoemException, NoSuchRowPoemException { | |
416 | 32 | Integer troid = getAuthorTroid(); |
417 | 32 | return troid == null ? null : |
418 | (Author)getBibliomaniaDatabaseTables().getAuthorTable().getAuthorObject(troid); | |
419 | } | |
420 | ||
421 | ||
422 | /** | |
423 | * Set the Author. | |
424 | * | |
425 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
426 | * @param cooked a validated <code>Author</code> | |
427 | * @throws AccessPoemException | |
428 | * if the current <code>AccessToken</code> | |
429 | * does not confer write access rights | |
430 | */ | |
431 | public void setAuthor(Author cooked) | |
432 | throws AccessPoemException { | |
433 | 0 | _getBookTable(). |
434 | getAuthorColumn(). | |
435 | getType().assertValidCooked(cooked); | |
436 | 0 | writeLock(); |
437 | 0 | if (cooked == null) |
438 | 0 | setAuthor_unsafe(null); |
439 | else { | |
440 | 0 | cooked.existenceLock(); |
441 | 0 | setAuthor_unsafe(cooked.troid()); |
442 | } | |
443 | 0 | } |
444 | ||
445 | ||
446 | /** | |
447 | * Retrieves the <code>Author</code> value as a <code>Field</code> | |
448 | * from this <code>Book</code> <code>Persistent</code>. | |
449 | * | |
450 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
451 | * @throws AccessPoemException | |
452 | * if the current <code>AccessToken</code> | |
453 | * does not confer write access rights | |
454 | * @return the Integer author | |
455 | */ | |
456 | public Field<Integer> getAuthorField() throws AccessPoemException { | |
457 | 0 | Column<Integer> c = _getBookTable().getAuthorColumn(); |
458 | 0 | return new Field<Integer>((Integer)c.getRaw(this), c); |
459 | } | |
460 | ||
461 | ||
462 | /** | |
463 | * Retrieves the <code>Advert</code> value, without locking, | |
464 | * for this <code>Book</code> <code>Persistent</code>. | |
465 | * | |
466 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
467 | * @return the Integer advert | |
468 | */ | |
469 | public Integer getAdvert_unsafe() { | |
470 | 1 | return advert; |
471 | } | |
472 | ||
473 | ||
474 | /** | |
475 | * Sets the <code>Advert</code> value directly, without checking, | |
476 | * for this Book <code>Persistent</code>. | |
477 | * | |
478 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
479 | * @param cooked the pre-validated value to set | |
480 | */ | |
481 | public void setAdvert_unsafe(Integer cooked) { | |
482 | 1663 | advert = cooked; |
483 | 1663 | } |
484 | ||
485 | /** | |
486 | * Retrieves the Table Row Object ID. | |
487 | * | |
488 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
489 | * @throws AccessPoemException | |
490 | * if the current <code>AccessToken</code> | |
491 | * does not confer read access rights | |
492 | * @return the TROID as an <code>Integer</code> | |
493 | */ | |
494 | ||
495 | public Integer getAdvertTroid() | |
496 | throws AccessPoemException { | |
497 | 0 | readLock(); |
498 | 0 | return getAdvert_unsafe(); |
499 | } | |
500 | ||
501 | ||
502 | /** | |
503 | * Sets the Table Row Object ID. | |
504 | * | |
505 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
506 | * @param raw a Table Row Object Id | |
507 | * @throws AccessPoemException | |
508 | * if the current <code>AccessToken</code> | |
509 | * does not confer write access rights | |
510 | */ | |
511 | public void setAdvertTroid(Integer raw) | |
512 | throws AccessPoemException { | |
513 | 0 | setAdvert(raw == null ? null : |
514 | getBibliomaniaDatabaseTables().getAdvertTable().getAdvertObject(raw)); | |
515 | 0 | } |
516 | ||
517 | ||
518 | /** | |
519 | * Retrieves the <code>Advert</code> object referred to. | |
520 | * | |
521 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
522 | * @throws AccessPoemException | |
523 | * if the current <code>AccessToken</code> | |
524 | * does not confer read access rights | |
525 | * @throws NoSuchRowPoemException | |
526 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
527 | * @return the <code>Advert</code> as a <code>Advert</code> | |
528 | */ | |
529 | public Advert getAdvert() | |
530 | throws AccessPoemException, NoSuchRowPoemException { | |
531 | 0 | Integer troid = getAdvertTroid(); |
532 | 0 | return troid == null ? null : |
533 | getBibliomaniaDatabaseTables().getAdvertTable().getAdvertObject(troid); | |
534 | } | |
535 | ||
536 | ||
537 | /** | |
538 | * Set the Advert. | |
539 | * | |
540 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
541 | * @param cooked a validated <code>Advert</code> | |
542 | * @throws AccessPoemException | |
543 | * if the current <code>AccessToken</code> | |
544 | * does not confer write access rights | |
545 | */ | |
546 | public void setAdvert(Advert cooked) | |
547 | throws AccessPoemException { | |
548 | 0 | _getBookTable(). |
549 | getAdvertColumn(). | |
550 | getType().assertValidCooked(cooked); | |
551 | 0 | writeLock(); |
552 | 0 | if (cooked == null) |
553 | 0 | setAdvert_unsafe(null); |
554 | else { | |
555 | 0 | cooked.existenceLock(); |
556 | 0 | setAdvert_unsafe(cooked.troid()); |
557 | } | |
558 | 0 | } |
559 | ||
560 | ||
561 | /** | |
562 | * Retrieves the <code>Advert</code> value as a <code>Field</code> | |
563 | * from this <code>Book</code> <code>Persistent</code>. | |
564 | * | |
565 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
566 | * @throws AccessPoemException | |
567 | * if the current <code>AccessToken</code> | |
568 | * does not confer write access rights | |
569 | * @return the Integer advert | |
570 | */ | |
571 | public Field<Integer> getAdvertField() throws AccessPoemException { | |
572 | 0 | Column<Integer> c = _getBookTable().getAdvertColumn(); |
573 | 0 | return new Field<Integer>((Integer)c.getRaw(this), c); |
574 | } | |
575 | ||
576 | ||
577 | /** | |
578 | * Retrieves the <code>Authorsequence</code> value, without locking, | |
579 | * for this <code>Book</code> <code>Persistent</code>. | |
580 | * | |
581 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
582 | * @return the Integer authorsequence | |
583 | */ | |
584 | public Integer getAuthorsequence_unsafe() { | |
585 | 23 | return authorsequence; |
586 | } | |
587 | ||
588 | ||
589 | /** | |
590 | * Sets the <code>Authorsequence</code> value directly, without checking, | |
591 | * for this Book <code>Persistent</code>. | |
592 | * | |
593 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
594 | * @param cooked the pre-validated value to set | |
595 | */ | |
596 | public void setAuthorsequence_unsafe(Integer cooked) { | |
597 | 1663 | authorsequence = cooked; |
598 | 1663 | } |
599 | ||
600 | /** | |
601 | * Retrieves the Authorsequence value, with locking, for this | |
602 | * <code>Book</code> <code>Persistent</code>. | |
603 | * Field description: | |
604 | * An internal number used to distinguish between books by the same author | |
605 | * in creating textIDs for the full text indexing subsystem | |
606 | * | |
607 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
608 | * @throws AccessPoemException | |
609 | * if the current <code>AccessToken</code> | |
610 | * does not confer write access rights | |
611 | * @return the value of the field <code>Authorsequence</code> for this | |
612 | * <code>Book</code> <code>Persistent</code> | |
613 | */ | |
614 | ||
615 | public Integer getAuthorsequence() | |
616 | throws AccessPoemException { | |
617 | 22 | readLock(); |
618 | 22 | return getAuthorsequence_unsafe(); |
619 | } | |
620 | ||
621 | ||
622 | /** | |
623 | * Sets the <code>Authorsequence</code> value, with checking, for this | |
624 | * <code>Book</code> <code>Persistent</code>. | |
625 | * Field description: | |
626 | * An internal number used to distinguish between books by the same author | |
627 | * in creating textIDs for the full text indexing subsystem | |
628 | * | |
629 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
630 | * @param cooked a validated <code>int</code> | |
631 | * @throws AccessPoemException | |
632 | * if the current <code>AccessToken</code> | |
633 | * does not confer write access rights | |
634 | * @throws ValidationPoemException | |
635 | * if the value is not valid | |
636 | */ | |
637 | public void setAuthorsequence(Integer cooked) | |
638 | throws AccessPoemException, ValidationPoemException { | |
639 | 0 | _getBookTable().getAuthorsequenceColumn(). |
640 | getType().assertValidCooked(cooked); | |
641 | 0 | writeLock(); |
642 | 0 | setAuthorsequence_unsafe(cooked); |
643 | 0 | } |
644 | ||
645 | /** | |
646 | * Sets the <code>Authorsequence</code> value, with checking, for this | |
647 | * <code>Book</code> <code>Persistent</code>. | |
648 | * Field description: | |
649 | * An internal number used to distinguish between books by the same author | |
650 | * in creating textIDs for the full text indexing subsystem | |
651 | * | |
652 | * | |
653 | * Generated by org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
654 | * @param cooked a validated <code>int</code> | |
655 | * @throws AccessPoemException | |
656 | * if the current <code>AccessToken</code> | |
657 | * does not confer write access rights | |
658 | * @throws ValidationPoemException | |
659 | * if the value is not valid | |
660 | */ | |
661 | ||
662 | public final void setAuthorsequence(int cooked) | |
663 | throws AccessPoemException, ValidationPoemException { | |
664 | 0 | setAuthorsequence(new Integer(cooked)); |
665 | 0 | } |
666 | ||
667 | ||
668 | /** | |
669 | * Retrieves the <code>Authorsequence</code> value as a <code>Field</code> | |
670 | * from this <code>Book</code> <code>Persistent</code>. | |
671 | * | |
672 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
673 | * @throws AccessPoemException | |
674 | * if the current <code>AccessToken</code> | |
675 | * does not confer write access rights | |
676 | * @return the Integer authorsequence | |
677 | */ | |
678 | public Field<Integer> getAuthorsequenceField() throws AccessPoemException { | |
679 | 0 | Column<Integer> c = _getBookTable().getAuthorsequenceColumn(); |
680 | 0 | return new Field<Integer>((Integer)c.getRaw(this), c); |
681 | } | |
682 | ||
683 | ||
684 | /** | |
685 | * Retrieves the <code>Title</code> value, without locking, | |
686 | * for this <code>Book</code> <code>Persistent</code>. | |
687 | * | |
688 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
689 | * @return the String title | |
690 | */ | |
691 | public String getTitle_unsafe() { | |
692 | 4 | return title; |
693 | } | |
694 | ||
695 | ||
696 | /** | |
697 | * Sets the <code>Title</code> value directly, without checking, | |
698 | * for this Book <code>Persistent</code>. | |
699 | * | |
700 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
701 | * @param cooked the pre-validated value to set | |
702 | */ | |
703 | public void setTitle_unsafe(String cooked) { | |
704 | 1663 | title = cooked; |
705 | 1663 | } |
706 | ||
707 | /** | |
708 | * Retrieves the Title value, with locking, for this | |
709 | * <code>Book</code> <code>Persistent</code>. | |
710 | * Field description: | |
711 | * A manageably short version of the book's title | |
712 | * | |
713 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
714 | * @throws AccessPoemException | |
715 | * if the current <code>AccessToken</code> | |
716 | * does not confer write access rights | |
717 | * @return the value of the field <code>Title</code> for this | |
718 | * <code>Book</code> <code>Persistent</code> | |
719 | */ | |
720 | ||
721 | public String getTitle() | |
722 | throws AccessPoemException { | |
723 | 1 | readLock(); |
724 | 1 | return getTitle_unsafe(); |
725 | } | |
726 | ||
727 | ||
728 | /** | |
729 | * Sets the <code>Title</code> value, with checking, for this | |
730 | * <code>Book</code> <code>Persistent</code>. | |
731 | * Field description: | |
732 | * A manageably short version of the book's title | |
733 | * | |
734 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
735 | * @param cooked a validated <code>int</code> | |
736 | * @throws AccessPoemException | |
737 | * if the current <code>AccessToken</code> | |
738 | * does not confer write access rights | |
739 | * @throws ValidationPoemException | |
740 | * if the value is not valid | |
741 | */ | |
742 | public void setTitle(String cooked) | |
743 | throws AccessPoemException, ValidationPoemException { | |
744 | 0 | _getBookTable().getTitleColumn(). |
745 | getType().assertValidCooked(cooked); | |
746 | 0 | writeLock(); |
747 | 0 | setTitle_unsafe(cooked); |
748 | 0 | } |
749 | ||
750 | ||
751 | /** | |
752 | * Retrieves the <code>Title</code> value as a <code>Field</code> | |
753 | * from this <code>Book</code> <code>Persistent</code>. | |
754 | * | |
755 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
756 | * @throws AccessPoemException | |
757 | * if the current <code>AccessToken</code> | |
758 | * does not confer write access rights | |
759 | * @return the String title | |
760 | */ | |
761 | public Field<String> getTitleField() throws AccessPoemException { | |
762 | 0 | Column<String> c = _getBookTable().getTitleColumn(); |
763 | 0 | return new Field<String>((String)c.getRaw(this), c); |
764 | } | |
765 | ||
766 | ||
767 | /** | |
768 | * Retrieves the <code>Fulltitleifdifferent</code> value, without locking, | |
769 | * for this <code>Book</code> <code>Persistent</code>. | |
770 | * | |
771 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
772 | * @return the String fulltitleifdifferent | |
773 | */ | |
774 | public String getFulltitleifdifferent_unsafe() { | |
775 | 12 | return fulltitleifdifferent; |
776 | } | |
777 | ||
778 | ||
779 | /** | |
780 | * Sets the <code>Fulltitleifdifferent</code> value directly, without checking, | |
781 | * for this Book <code>Persistent</code>. | |
782 | * | |
783 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
784 | * @param cooked the pre-validated value to set | |
785 | */ | |
786 | public void setFulltitleifdifferent_unsafe(String cooked) { | |
787 | 1663 | fulltitleifdifferent = cooked; |
788 | 1663 | } |
789 | ||
790 | /** | |
791 | * Retrieves the Fulltitleifdifferent value, with locking, for this | |
792 | * <code>Book</code> <code>Persistent</code>. | |
793 | * Field description: | |
794 | * The `full Monty' version of the book's title, if different | |
795 | * | |
796 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
797 | * @throws AccessPoemException | |
798 | * if the current <code>AccessToken</code> | |
799 | * does not confer write access rights | |
800 | * @return the value of the field <code>Fulltitleifdifferent</code> for this | |
801 | * <code>Book</code> <code>Persistent</code> | |
802 | */ | |
803 | ||
804 | public String getFulltitleifdifferent() | |
805 | throws AccessPoemException { | |
806 | 11 | readLock(); |
807 | 11 | return getFulltitleifdifferent_unsafe(); |
808 | } | |
809 | ||
810 | ||
811 | /** | |
812 | * Sets the <code>Fulltitleifdifferent</code> value, with checking, for this | |
813 | * <code>Book</code> <code>Persistent</code>. | |
814 | * Field description: | |
815 | * The `full Monty' version of the book's title, if different | |
816 | * | |
817 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
818 | * @param cooked a validated <code>int</code> | |
819 | * @throws AccessPoemException | |
820 | * if the current <code>AccessToken</code> | |
821 | * does not confer write access rights | |
822 | * @throws ValidationPoemException | |
823 | * if the value is not valid | |
824 | */ | |
825 | public void setFulltitleifdifferent(String cooked) | |
826 | throws AccessPoemException, ValidationPoemException { | |
827 | 0 | _getBookTable().getFulltitleifdifferentColumn(). |
828 | getType().assertValidCooked(cooked); | |
829 | 0 | writeLock(); |
830 | 0 | setFulltitleifdifferent_unsafe(cooked); |
831 | 0 | } |
832 | ||
833 | ||
834 | /** | |
835 | * Retrieves the <code>Fulltitleifdifferent</code> value as a <code>Field</code> | |
836 | * from this <code>Book</code> <code>Persistent</code>. | |
837 | * | |
838 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
839 | * @throws AccessPoemException | |
840 | * if the current <code>AccessToken</code> | |
841 | * does not confer write access rights | |
842 | * @return the String fulltitleifdifferent | |
843 | */ | |
844 | public Field<String> getFulltitleifdifferentField() throws AccessPoemException { | |
845 | 0 | Column<String> c = _getBookTable().getFulltitleifdifferentColumn(); |
846 | 0 | return new Field<String>((String)c.getRaw(this), c); |
847 | } | |
848 | ||
849 | ||
850 | /** | |
851 | * Retrieves the <code>Paginated</code> value, without locking, | |
852 | * for this <code>Book</code> <code>Persistent</code>. | |
853 | * | |
854 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
855 | * @return the Boolean paginated | |
856 | */ | |
857 | public Boolean getPaginated_unsafe() { | |
858 | 1 | return paginated; |
859 | } | |
860 | ||
861 | ||
862 | /** | |
863 | * Sets the <code>Paginated</code> value directly, without checking, | |
864 | * for this Book <code>Persistent</code>. | |
865 | * | |
866 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
867 | * @param cooked the pre-validated value to set | |
868 | */ | |
869 | public void setPaginated_unsafe(Boolean cooked) { | |
870 | 1663 | paginated = cooked; |
871 | 1663 | } |
872 | ||
873 | /** | |
874 | * Retrieves the Paginated value, with locking, for this | |
875 | * <code>Book</code> <code>Persistent</code>. | |
876 | * Field description: | |
877 | * Whether the book's chapters should be displayed in pre-paginated form | |
878 | * | |
879 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
880 | * @throws AccessPoemException | |
881 | * if the current <code>AccessToken</code> | |
882 | * does not confer write access rights | |
883 | * @return the value of the field <code>Paginated</code> for this | |
884 | * <code>Book</code> <code>Persistent</code> | |
885 | */ | |
886 | ||
887 | public Boolean getPaginated() | |
888 | throws AccessPoemException { | |
889 | 0 | readLock(); |
890 | 0 | return getPaginated_unsafe(); |
891 | } | |
892 | ||
893 | ||
894 | /** | |
895 | * Sets the <code>Paginated</code> value, with checking, for this | |
896 | * <code>Book</code> <code>Persistent</code>. | |
897 | * Field description: | |
898 | * Whether the book's chapters should be displayed in pre-paginated form | |
899 | * | |
900 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
901 | * @param cooked a validated <code>int</code> | |
902 | * @throws AccessPoemException | |
903 | * if the current <code>AccessToken</code> | |
904 | * does not confer write access rights | |
905 | * @throws ValidationPoemException | |
906 | * if the value is not valid | |
907 | */ | |
908 | public void setPaginated(Boolean cooked) | |
909 | throws AccessPoemException, ValidationPoemException { | |
910 | 0 | _getBookTable().getPaginatedColumn(). |
911 | getType().assertValidCooked(cooked); | |
912 | 0 | writeLock(); |
913 | 0 | setPaginated_unsafe(cooked); |
914 | 0 | } |
915 | ||
916 | /** | |
917 | * Sets the <code>Paginated</code> value, with checking, | |
918 | * from a <code>boolean</code>, for this | |
919 | * <code>Book</code> <code>Persistent</code>. | |
920 | * Field description: | |
921 | * Whether the book's chapters should be displayed in pre-paginated form | |
922 | * | |
923 | * | |
924 | * Generated by org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods | |
925 | * @param cooked a <code>boolean</code> | |
926 | * @throws AccessPoemException | |
927 | * if the current <code>AccessToken</code> | |
928 | * does not confer write access rights | |
929 | * @throws ValidationPoemException | |
930 | * if the value is not valid | |
931 | */ | |
932 | ||
933 | public final void setPaginated(boolean cooked) | |
934 | throws AccessPoemException, ValidationPoemException { | |
935 | 0 | setPaginated(cooked ? Boolean.TRUE : Boolean.FALSE); |
936 | 0 | } |
937 | ||
938 | ||
939 | /** | |
940 | * Retrieves the <code>Paginated</code> value as a <code>Field</code> | |
941 | * from this <code>Book</code> <code>Persistent</code>. | |
942 | * | |
943 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
944 | * @throws AccessPoemException | |
945 | * if the current <code>AccessToken</code> | |
946 | * does not confer write access rights | |
947 | * @return the Boolean paginated | |
948 | */ | |
949 | public Field<Boolean> getPaginatedField() throws AccessPoemException { | |
950 | 0 | Column<Boolean> c = _getBookTable().getPaginatedColumn(); |
951 | 0 | return new Field<Boolean>((Boolean)c.getRaw(this), c); |
952 | } | |
953 | ||
954 | ||
955 | /** | |
956 | * Retrieves the <code>Metatag_description</code> value, without locking, | |
957 | * for this <code>Book</code> <code>Persistent</code>. | |
958 | * | |
959 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
960 | * @return the String metatag_description | |
961 | */ | |
962 | public String getMetatag_description_unsafe() { | |
963 | 7 | return metatag_description; |
964 | } | |
965 | ||
966 | ||
967 | /** | |
968 | * Sets the <code>Metatag_description</code> value directly, without checking, | |
969 | * for this Book <code>Persistent</code>. | |
970 | * | |
971 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
972 | * @param cooked the pre-validated value to set | |
973 | */ | |
974 | public void setMetatag_description_unsafe(String cooked) { | |
975 | 1663 | metatag_description = cooked; |
976 | 1663 | } |
977 | ||
978 | /** | |
979 | * Retrieves the Metatag_description value, with locking, for this | |
980 | * <code>Book</code> <code>Persistent</code>. | |
981 | * | |
982 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
983 | * @throws AccessPoemException | |
984 | * if the current <code>AccessToken</code> | |
985 | * does not confer write access rights | |
986 | * @return the value of the field <code>Metatag_description</code> for this | |
987 | * <code>Book</code> <code>Persistent</code> | |
988 | */ | |
989 | ||
990 | public String getMetatag_description() | |
991 | throws AccessPoemException { | |
992 | 6 | readLock(); |
993 | 6 | return getMetatag_description_unsafe(); |
994 | } | |
995 | ||
996 | ||
997 | /** | |
998 | * Sets the <code>Metatag_description</code> value, with checking, for this | |
999 | * <code>Book</code> <code>Persistent</code>. | |
1000 | * | |
1001 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1002 | * @param cooked a validated <code>int</code> | |
1003 | * @throws AccessPoemException | |
1004 | * if the current <code>AccessToken</code> | |
1005 | * does not confer write access rights | |
1006 | * @throws ValidationPoemException | |
1007 | * if the value is not valid | |
1008 | */ | |
1009 | public void setMetatag_description(String cooked) | |
1010 | throws AccessPoemException, ValidationPoemException { | |
1011 | 0 | _getBookTable().getMetatag_descriptionColumn(). |
1012 | getType().assertValidCooked(cooked); | |
1013 | 0 | writeLock(); |
1014 | 0 | setMetatag_description_unsafe(cooked); |
1015 | 0 | } |
1016 | ||
1017 | ||
1018 | /** | |
1019 | * Retrieves the <code>Metatag_description</code> value as a <code>Field</code> | |
1020 | * from this <code>Book</code> <code>Persistent</code>. | |
1021 | * | |
1022 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
1023 | * @throws AccessPoemException | |
1024 | * if the current <code>AccessToken</code> | |
1025 | * does not confer write access rights | |
1026 | * @return the String metatag_description | |
1027 | */ | |
1028 | public Field<String> getMetatag_descriptionField() throws AccessPoemException { | |
1029 | 0 | Column<String> c = _getBookTable().getMetatag_descriptionColumn(); |
1030 | 0 | return new Field<String>((String)c.getRaw(this), c); |
1031 | } | |
1032 | ||
1033 | ||
1034 | /** | |
1035 | * Retrieves the <code>Metatag_keywords</code> value, without locking, | |
1036 | * for this <code>Book</code> <code>Persistent</code>. | |
1037 | * | |
1038 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1039 | * @return the String metatag_keywords | |
1040 | */ | |
1041 | public String getMetatag_keywords_unsafe() { | |
1042 | 7 | return metatag_keywords; |
1043 | } | |
1044 | ||
1045 | ||
1046 | /** | |
1047 | * Sets the <code>Metatag_keywords</code> value directly, without checking, | |
1048 | * for this Book <code>Persistent</code>. | |
1049 | * | |
1050 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1051 | * @param cooked the pre-validated value to set | |
1052 | */ | |
1053 | public void setMetatag_keywords_unsafe(String cooked) { | |
1054 | 1663 | metatag_keywords = cooked; |
1055 | 1663 | } |
1056 | ||
1057 | /** | |
1058 | * Retrieves the Metatag_keywords value, with locking, for this | |
1059 | * <code>Book</code> <code>Persistent</code>. | |
1060 | * | |
1061 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1062 | * @throws AccessPoemException | |
1063 | * if the current <code>AccessToken</code> | |
1064 | * does not confer write access rights | |
1065 | * @return the value of the field <code>Metatag_keywords</code> for this | |
1066 | * <code>Book</code> <code>Persistent</code> | |
1067 | */ | |
1068 | ||
1069 | public String getMetatag_keywords() | |
1070 | throws AccessPoemException { | |
1071 | 6 | readLock(); |
1072 | 6 | return getMetatag_keywords_unsafe(); |
1073 | } | |
1074 | ||
1075 | ||
1076 | /** | |
1077 | * Sets the <code>Metatag_keywords</code> value, with checking, for this | |
1078 | * <code>Book</code> <code>Persistent</code>. | |
1079 | * | |
1080 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1081 | * @param cooked a validated <code>int</code> | |
1082 | * @throws AccessPoemException | |
1083 | * if the current <code>AccessToken</code> | |
1084 | * does not confer write access rights | |
1085 | * @throws ValidationPoemException | |
1086 | * if the value is not valid | |
1087 | */ | |
1088 | public void setMetatag_keywords(String cooked) | |
1089 | throws AccessPoemException, ValidationPoemException { | |
1090 | 0 | _getBookTable().getMetatag_keywordsColumn(). |
1091 | getType().assertValidCooked(cooked); | |
1092 | 0 | writeLock(); |
1093 | 0 | setMetatag_keywords_unsafe(cooked); |
1094 | 0 | } |
1095 | ||
1096 | ||
1097 | /** | |
1098 | * Retrieves the <code>Metatag_keywords</code> value as a <code>Field</code> | |
1099 | * from this <code>Book</code> <code>Persistent</code>. | |
1100 | * | |
1101 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
1102 | * @throws AccessPoemException | |
1103 | * if the current <code>AccessToken</code> | |
1104 | * does not confer write access rights | |
1105 | * @return the String metatag_keywords | |
1106 | */ | |
1107 | public Field<String> getMetatag_keywordsField() throws AccessPoemException { | |
1108 | 0 | Column<String> c = _getBookTable().getMetatag_keywordsColumn(); |
1109 | 0 | return new Field<String>((String)c.getRaw(this), c); |
1110 | } | |
1111 | ||
1112 | ||
1113 | /** | |
1114 | * Retrieves the <code>Lastbookshopsearch</code> value, without locking, | |
1115 | * for this <code>Book</code> <code>Persistent</code>. | |
1116 | * | |
1117 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1118 | * @return the Timestamp lastbookshopsearch | |
1119 | */ | |
1120 | public Timestamp getLastbookshopsearch_unsafe() { | |
1121 | 1 | return lastbookshopsearch; |
1122 | } | |
1123 | ||
1124 | ||
1125 | /** | |
1126 | * Sets the <code>Lastbookshopsearch</code> value directly, without checking, | |
1127 | * for this Book <code>Persistent</code>. | |
1128 | * | |
1129 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1130 | * @param cooked the pre-validated value to set | |
1131 | */ | |
1132 | public void setLastbookshopsearch_unsafe(Timestamp cooked) { | |
1133 | 1663 | lastbookshopsearch = cooked; |
1134 | 1663 | } |
1135 | ||
1136 | /** | |
1137 | * Retrieves the Lastbookshopsearch value, with locking, for this | |
1138 | * <code>Book</code> <code>Persistent</code>. | |
1139 | * Field description: | |
1140 | * When a search was last made for stockings of this book in the online | |
1141 | * bookshops | |
1142 | * | |
1143 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1144 | * @throws AccessPoemException | |
1145 | * if the current <code>AccessToken</code> | |
1146 | * does not confer write access rights | |
1147 | * @return the value of the field <code>Lastbookshopsearch</code> for this | |
1148 | * <code>Book</code> <code>Persistent</code> | |
1149 | */ | |
1150 | ||
1151 | public Timestamp getLastbookshopsearch() | |
1152 | throws AccessPoemException { | |
1153 | 0 | readLock(); |
1154 | 0 | return getLastbookshopsearch_unsafe(); |
1155 | } | |
1156 | ||
1157 | ||
1158 | /** | |
1159 | * Sets the <code>Lastbookshopsearch</code> value, with checking, for this | |
1160 | * <code>Book</code> <code>Persistent</code>. | |
1161 | * Field description: | |
1162 | * When a search was last made for stockings of this book in the online | |
1163 | * bookshops | |
1164 | * | |
1165 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1166 | * @param cooked a validated <code>int</code> | |
1167 | * @throws AccessPoemException | |
1168 | * if the current <code>AccessToken</code> | |
1169 | * does not confer write access rights | |
1170 | * @throws ValidationPoemException | |
1171 | * if the value is not valid | |
1172 | */ | |
1173 | public void setLastbookshopsearch(Timestamp cooked) | |
1174 | throws AccessPoemException, ValidationPoemException { | |
1175 | 0 | _getBookTable().getLastbookshopsearchColumn(). |
1176 | getType().assertValidCooked(cooked); | |
1177 | 0 | writeLock(); |
1178 | 0 | setLastbookshopsearch_unsafe(cooked); |
1179 | 0 | } |
1180 | ||
1181 | ||
1182 | /** | |
1183 | * Retrieves the <code>Lastbookshopsearch</code> value as a <code>Field</code> | |
1184 | * from this <code>Book</code> <code>Persistent</code>. | |
1185 | * | |
1186 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
1187 | * @throws AccessPoemException | |
1188 | * if the current <code>AccessToken</code> | |
1189 | * does not confer write access rights | |
1190 | * @return the Timestamp lastbookshopsearch | |
1191 | */ | |
1192 | public Field<Timestamp> getLastbookshopsearchField() throws AccessPoemException { | |
1193 | 0 | Column<Timestamp> c = _getBookTable().getLastbookshopsearchColumn(); |
1194 | 0 | return new Field<Timestamp>((Timestamp)c.getRaw(this), c); |
1195 | } | |
1196 | ||
1197 | ||
1198 | /** | |
1199 | * Retrieves the <code>Overridecanreadcontent</code> value, without locking, | |
1200 | * for this <code>Book</code> <code>Persistent</code>. | |
1201 | * | |
1202 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1203 | * @return the Integer overridecanreadcontent | |
1204 | */ | |
1205 | public Integer getOverridecanreadcontent_unsafe() { | |
1206 | 4 | return overridecanreadcontent; |
1207 | } | |
1208 | ||
1209 | ||
1210 | /** | |
1211 | * Sets the <code>Overridecanreadcontent</code> value directly, without checking, | |
1212 | * for this Book <code>Persistent</code>. | |
1213 | * | |
1214 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1215 | * @param cooked the pre-validated value to set | |
1216 | */ | |
1217 | public void setOverridecanreadcontent_unsafe(Integer cooked) { | |
1218 | 1663 | overridecanreadcontent = cooked; |
1219 | 1663 | } |
1220 | ||
1221 | /** | |
1222 | * Retrieves the Table Row Object ID. | |
1223 | * | |
1224 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
1225 | * @throws AccessPoemException | |
1226 | * if the current <code>AccessToken</code> | |
1227 | * does not confer read access rights | |
1228 | * @return the TROID as an <code>Integer</code> | |
1229 | */ | |
1230 | ||
1231 | public Integer getOverridecanreadcontentTroid() | |
1232 | throws AccessPoemException { | |
1233 | 3 | readLock(); |
1234 | 3 | return getOverridecanreadcontent_unsafe(); |
1235 | } | |
1236 | ||
1237 | ||
1238 | /** | |
1239 | * Sets the Table Row Object ID. | |
1240 | * | |
1241 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
1242 | * @param raw a Table Row Object Id | |
1243 | * @throws AccessPoemException | |
1244 | * if the current <code>AccessToken</code> | |
1245 | * does not confer write access rights | |
1246 | */ | |
1247 | public void setOverridecanreadcontentTroid(Integer raw) | |
1248 | throws AccessPoemException { | |
1249 | 0 | setOverridecanreadcontent(raw == null ? null : |
1250 | getBibliomaniaDatabaseTables().getCapabilityTable().getCapabilityObject(raw)); | |
1251 | 0 | } |
1252 | ||
1253 | ||
1254 | /** | |
1255 | * Retrieves the <code>Overridecanreadcontent</code> object referred to. | |
1256 | * | |
1257 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
1258 | * @throws AccessPoemException | |
1259 | * if the current <code>AccessToken</code> | |
1260 | * does not confer read access rights | |
1261 | * @throws NoSuchRowPoemException | |
1262 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
1263 | * @return the <code>Overridecanreadcontent</code> as a <code>Capability</code> | |
1264 | */ | |
1265 | public Capability getOverridecanreadcontent() | |
1266 | throws AccessPoemException, NoSuchRowPoemException { | |
1267 | 3 | Integer troid = getOverridecanreadcontentTroid(); |
1268 | 3 | return troid == null ? null : |
1269 | getBibliomaniaDatabaseTables().getCapabilityTable().getCapabilityObject(troid); | |
1270 | } | |
1271 | ||
1272 | ||
1273 | /** | |
1274 | * Set the Overridecanreadcontent. | |
1275 | * | |
1276 | * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
1277 | * @param cooked a validated <code>Capability</code> | |
1278 | * @throws AccessPoemException | |
1279 | * if the current <code>AccessToken</code> | |
1280 | * does not confer write access rights | |
1281 | */ | |
1282 | public void setOverridecanreadcontent(Capability cooked) | |
1283 | throws AccessPoemException { | |
1284 | 0 | _getBookTable(). |
1285 | getOverridecanreadcontentColumn(). | |
1286 | getType().assertValidCooked(cooked); | |
1287 | 0 | writeLock(); |
1288 | 0 | if (cooked == null) |
1289 | 0 | setOverridecanreadcontent_unsafe(null); |
1290 | else { | |
1291 | 0 | cooked.existenceLock(); |
1292 | 0 | setOverridecanreadcontent_unsafe(cooked.troid()); |
1293 | } | |
1294 | 0 | } |
1295 | ||
1296 | ||
1297 | /** | |
1298 | * Retrieves the <code>Overridecanreadcontent</code> value as a <code>Field</code> | |
1299 | * from this <code>Book</code> <code>Persistent</code>. | |
1300 | * | |
1301 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
1302 | * @throws AccessPoemException | |
1303 | * if the current <code>AccessToken</code> | |
1304 | * does not confer write access rights | |
1305 | * @return the Integer overridecanreadcontent | |
1306 | */ | |
1307 | public Field<Integer> getOverridecanreadcontentField() throws AccessPoemException { | |
1308 | 0 | Column<Integer> c = _getBookTable().getOverridecanreadcontentColumn(); |
1309 | 0 | return new Field<Integer>((Integer)c.getRaw(this), c); |
1310 | } | |
1311 | ||
1312 | ||
1313 | /** | |
1314 | * Retrieves the <code>Summary</code> value, without locking, | |
1315 | * for this <code>Book</code> <code>Persistent</code>. | |
1316 | * | |
1317 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1318 | * @return the String summary | |
1319 | */ | |
1320 | public String getSummary_unsafe() { | |
1321 | 7 | return summary; |
1322 | } | |
1323 | ||
1324 | ||
1325 | /** | |
1326 | * Sets the <code>Summary</code> value directly, without checking, | |
1327 | * for this Book <code>Persistent</code>. | |
1328 | * | |
1329 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1330 | * @param cooked the pre-validated value to set | |
1331 | */ | |
1332 | public void setSummary_unsafe(String cooked) { | |
1333 | 1663 | summary = cooked; |
1334 | 1663 | } |
1335 | ||
1336 | /** | |
1337 | * Retrieves the Summary value, with locking, for this | |
1338 | * <code>Book</code> <code>Persistent</code>. | |
1339 | * Field description: | |
1340 | * The book's blurb, to appear on its TOC page | |
1341 | * | |
1342 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1343 | * @throws AccessPoemException | |
1344 | * if the current <code>AccessToken</code> | |
1345 | * does not confer write access rights | |
1346 | * @return the value of the field <code>Summary</code> for this | |
1347 | * <code>Book</code> <code>Persistent</code> | |
1348 | */ | |
1349 | ||
1350 | public String getSummary() | |
1351 | throws AccessPoemException { | |
1352 | 6 | readLock(); |
1353 | 6 | return getSummary_unsafe(); |
1354 | } | |
1355 | ||
1356 | ||
1357 | /** | |
1358 | * Sets the <code>Summary</code> value, with checking, for this | |
1359 | * <code>Book</code> <code>Persistent</code>. | |
1360 | * Field description: | |
1361 | * The book's blurb, to appear on its TOC page | |
1362 | * | |
1363 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1364 | * @param cooked a validated <code>int</code> | |
1365 | * @throws AccessPoemException | |
1366 | * if the current <code>AccessToken</code> | |
1367 | * does not confer write access rights | |
1368 | * @throws ValidationPoemException | |
1369 | * if the value is not valid | |
1370 | */ | |
1371 | public void setSummary(String cooked) | |
1372 | throws AccessPoemException, ValidationPoemException { | |
1373 | 0 | _getBookTable().getSummaryColumn(). |
1374 | getType().assertValidCooked(cooked); | |
1375 | 0 | writeLock(); |
1376 | 0 | setSummary_unsafe(cooked); |
1377 | 0 | } |
1378 | ||
1379 | ||
1380 | /** | |
1381 | * Retrieves the <code>Summary</code> value as a <code>Field</code> | |
1382 | * from this <code>Book</code> <code>Persistent</code>. | |
1383 | * | |
1384 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
1385 | * @throws AccessPoemException | |
1386 | * if the current <code>AccessToken</code> | |
1387 | * does not confer write access rights | |
1388 | * @return the String summary | |
1389 | */ | |
1390 | public Field<String> getSummaryField() throws AccessPoemException { | |
1391 | 0 | Column<String> c = _getBookTable().getSummaryColumn(); |
1392 | 0 | return new Field<String>((String)c.getRaw(this), c); |
1393 | } | |
1394 | ||
1395 | ||
1396 | /** | |
1397 | * Retrieves the <code>Hasnofrontpage</code> value, without locking, | |
1398 | * for this <code>Book</code> <code>Persistent</code>. | |
1399 | * | |
1400 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1401 | * @return the Boolean hasnofrontpage | |
1402 | */ | |
1403 | public Boolean getHasnofrontpage_unsafe() { | |
1404 | 8 | return hasnofrontpage; |
1405 | } | |
1406 | ||
1407 | ||
1408 | /** | |
1409 | * Sets the <code>Hasnofrontpage</code> value directly, without checking, | |
1410 | * for this Book <code>Persistent</code>. | |
1411 | * | |
1412 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1413 | * @param cooked the pre-validated value to set | |
1414 | */ | |
1415 | public void setHasnofrontpage_unsafe(Boolean cooked) { | |
1416 | 1663 | hasnofrontpage = cooked; |
1417 | 1663 | } |
1418 | ||
1419 | /** | |
1420 | * Retrieves the Hasnofrontpage value, with locking, for this | |
1421 | * <code>Book</code> <code>Persistent</code>. | |
1422 | * Field description: | |
1423 | * Whether the book should simply display the first page of its content | |
1424 | * instead of a `front page' | |
1425 | * | |
1426 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1427 | * @throws AccessPoemException | |
1428 | * if the current <code>AccessToken</code> | |
1429 | * does not confer write access rights | |
1430 | * @return the value of the field <code>Hasnofrontpage</code> for this | |
1431 | * <code>Book</code> <code>Persistent</code> | |
1432 | */ | |
1433 | ||
1434 | public Boolean getHasnofrontpage() | |
1435 | throws AccessPoemException { | |
1436 | 7 | readLock(); |
1437 | 7 | return getHasnofrontpage_unsafe(); |
1438 | } | |
1439 | ||
1440 | ||
1441 | /** | |
1442 | * Sets the <code>Hasnofrontpage</code> value, with checking, for this | |
1443 | * <code>Book</code> <code>Persistent</code>. | |
1444 | * Field description: | |
1445 | * Whether the book should simply display the first page of its content | |
1446 | * instead of a `front page' | |
1447 | * | |
1448 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1449 | * @param cooked a validated <code>int</code> | |
1450 | * @throws AccessPoemException | |
1451 | * if the current <code>AccessToken</code> | |
1452 | * does not confer write access rights | |
1453 | * @throws ValidationPoemException | |
1454 | * if the value is not valid | |
1455 | */ | |
1456 | public void setHasnofrontpage(Boolean cooked) | |
1457 | throws AccessPoemException, ValidationPoemException { | |
1458 | 0 | _getBookTable().getHasnofrontpageColumn(). |
1459 | getType().assertValidCooked(cooked); | |
1460 | 0 | writeLock(); |
1461 | 0 | setHasnofrontpage_unsafe(cooked); |
1462 | 0 | } |
1463 | ||
1464 | /** | |
1465 | * Sets the <code>Hasnofrontpage</code> value, with checking, | |
1466 | * from a <code>boolean</code>, for this | |
1467 | * <code>Book</code> <code>Persistent</code>. | |
1468 | * Field description: | |
1469 | * Whether the book should simply display the first page of its content | |
1470 | * instead of a `front page' | |
1471 | * | |
1472 | * | |
1473 | * Generated by org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods | |
1474 | * @param cooked a <code>boolean</code> | |
1475 | * @throws AccessPoemException | |
1476 | * if the current <code>AccessToken</code> | |
1477 | * does not confer write access rights | |
1478 | * @throws ValidationPoemException | |
1479 | * if the value is not valid | |
1480 | */ | |
1481 | ||
1482 | public final void setHasnofrontpage(boolean cooked) | |
1483 | throws AccessPoemException, ValidationPoemException { | |
1484 | 0 | setHasnofrontpage(cooked ? Boolean.TRUE : Boolean.FALSE); |
1485 | 0 | } |
1486 | ||
1487 | ||
1488 | /** | |
1489 | * Retrieves the <code>Hasnofrontpage</code> value as a <code>Field</code> | |
1490 | * from this <code>Book</code> <code>Persistent</code>. | |
1491 | * | |
1492 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
1493 | * @throws AccessPoemException | |
1494 | * if the current <code>AccessToken</code> | |
1495 | * does not confer write access rights | |
1496 | * @return the Boolean hasnofrontpage | |
1497 | */ | |
1498 | public Field<Boolean> getHasnofrontpageField() throws AccessPoemException { | |
1499 | 0 | Column<Boolean> c = _getBookTable().getHasnofrontpageColumn(); |
1500 | 0 | return new Field<Boolean>((Boolean)c.getRaw(this), c); |
1501 | } | |
1502 | ||
1503 | ||
1504 | /** | |
1505 | * Retrieves the <code>Nonstandard</code> value, without locking, | |
1506 | * for this <code>Book</code> <code>Persistent</code>. | |
1507 | * | |
1508 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1509 | * @return the Boolean nonstandard | |
1510 | */ | |
1511 | public Boolean getNonstandard_unsafe() { | |
1512 | 1 | return nonstandard; |
1513 | } | |
1514 | ||
1515 | ||
1516 | /** | |
1517 | * Sets the <code>Nonstandard</code> value directly, without checking, | |
1518 | * for this Book <code>Persistent</code>. | |
1519 | * | |
1520 | * see org.melati.poem.prepro.FieldDef#generateBaseMethods | |
1521 | * @param cooked the pre-validated value to set | |
1522 | */ | |
1523 | public void setNonstandard_unsafe(Boolean cooked) { | |
1524 | 1663 | nonstandard = cooked; |
1525 | 1663 | } |
1526 | ||
1527 | /** | |
1528 | * Retrieves the Nonstandard value, with locking, for this | |
1529 | * <code>Book</code> <code>Persistent</code>. | |
1530 | * Field description: | |
1531 | * Whether the book has its own non-standard template | |
1532 | * | |
1533 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1534 | * @throws AccessPoemException | |
1535 | * if the current <code>AccessToken</code> | |
1536 | * does not confer write access rights | |
1537 | * @return the value of the field <code>Nonstandard</code> for this | |
1538 | * <code>Book</code> <code>Persistent</code> | |
1539 | */ | |
1540 | ||
1541 | public Boolean getNonstandard() | |
1542 | throws AccessPoemException { | |
1543 | 0 | readLock(); |
1544 | 0 | return getNonstandard_unsafe(); |
1545 | } | |
1546 | ||
1547 | ||
1548 | /** | |
1549 | * Sets the <code>Nonstandard</code> value, with checking, for this | |
1550 | * <code>Book</code> <code>Persistent</code>. | |
1551 | * Field description: | |
1552 | * Whether the book has its own non-standard template | |
1553 | * | |
1554 | * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
1555 | * @param cooked a validated <code>int</code> | |
1556 | * @throws AccessPoemException | |
1557 | * if the current <code>AccessToken</code> | |
1558 | * does not confer write access rights | |
1559 | * @throws ValidationPoemException | |
1560 | * if the value is not valid | |
1561 | */ | |
1562 | public void setNonstandard(Boolean cooked) | |
1563 | throws AccessPoemException, ValidationPoemException { | |
1564 | 0 | _getBookTable().getNonstandardColumn(). |
1565 | getType().assertValidCooked(cooked); | |
1566 | 0 | writeLock(); |
1567 | 0 | setNonstandard_unsafe(cooked); |
1568 | 0 | } |
1569 | ||
1570 | /** | |
1571 | * Sets the <code>Nonstandard</code> value, with checking, | |
1572 | * from a <code>boolean</code>, for this | |
1573 | * <code>Book</code> <code>Persistent</code>. | |
1574 | * Field description: | |
1575 | * Whether the book has its own non-standard template | |
1576 | * | |
1577 | * | |
1578 | * Generated by org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods | |
1579 | * @param cooked a <code>boolean</code> | |
1580 | * @throws AccessPoemException | |
1581 | * if the current <code>AccessToken</code> | |
1582 | * does not confer write access rights | |
1583 | * @throws ValidationPoemException | |
1584 | * if the value is not valid | |
1585 | */ | |
1586 | ||
1587 | public final void setNonstandard(boolean cooked) | |
1588 | throws AccessPoemException, ValidationPoemException { | |
1589 | 0 | setNonstandard(cooked ? Boolean.TRUE : Boolean.FALSE); |
1590 | 0 | } |
1591 | ||
1592 | ||
1593 | /** | |
1594 | * Retrieves the <code>Nonstandard</code> value as a <code>Field</code> | |
1595 | * from this <code>Book</code> <code>Persistent</code>. | |
1596 | * | |
1597 | * see org.melati.poem.prepro.FieldDef#generateFieldCreator | |
1598 | * @throws AccessPoemException | |
1599 | * if the current <code>AccessToken</code> | |
1600 | * does not confer write access rights | |
1601 | * @return the Boolean nonstandard | |
1602 | */ | |
1603 | public Field<Boolean> getNonstandardField() throws AccessPoemException { | |
1604 | 0 | Column<Boolean> c = _getBookTable().getNonstandardColumn(); |
1605 | 0 | return new Field<Boolean>((Boolean)c.getRaw(this), c); |
1606 | } | |
1607 | ||
1608 | 1663 | private CachedSelection<Product> bookProducts = null; |
1609 | /** References to this Book in the Product table via its book field.*/ | |
1610 | @SuppressWarnings("unchecked") | |
1611 | public Enumeration<Product> getBookProducts() { | |
1612 | 0 | if (getTroid() == null) |
1613 | 0 | return new EmptyEnumeration<Product>(); |
1614 | else { | |
1615 | 0 | if (bookProducts == null) |
1616 | 0 | bookProducts = |
1617 | getBibliomaniaDatabaseTables().getProductTable().getBookColumn().cachedSelectionWhereEq(getTroid()); | |
1618 | 0 | return bookProducts.objects(); |
1619 | } | |
1620 | } | |
1621 | ||
1622 | ||
1623 | /** References to this Book in the Product table via its book field, as a List.*/ | |
1624 | public List<Product> getBookProductList() { | |
1625 | 0 | return Collections.list(getBookProducts()); |
1626 | } | |
1627 | ||
1628 | ||
1629 | ||
1630 | 1663 | private CachedSelection<ProductAssociation> bookProductAssociations = null; |
1631 | /** References to this Book in the ProductAssociation table via its book field.*/ | |
1632 | @SuppressWarnings("unchecked") | |
1633 | public Enumeration<ProductAssociation> getBookProductAssociations() { | |
1634 | 0 | if (getTroid() == null) |
1635 | 0 | return new EmptyEnumeration<ProductAssociation>(); |
1636 | else { | |
1637 | 0 | if (bookProductAssociations == null) |
1638 | 0 | bookProductAssociations = |
1639 | getBibliomaniaDatabaseTables().getProductAssociationTable().getBookColumn().cachedSelectionWhereEq(getTroid()); | |
1640 | 0 | return bookProductAssociations.objects(); |
1641 | } | |
1642 | } | |
1643 | ||
1644 | ||
1645 | /** References to this Book in the ProductAssociation table via its book field, as a List.*/ | |
1646 | public List<ProductAssociation> getBookProductAssociationList() { | |
1647 | 0 | return Collections.list(getBookProductAssociations()); |
1648 | } | |
1649 | ||
1650 | ||
1651 | ||
1652 | 1663 | private CachedSelection<BookStocking> bookBookStockings = null; |
1653 | /** References to this Book in the BookStocking table via its book field.*/ | |
1654 | @SuppressWarnings("unchecked") | |
1655 | public Enumeration<BookStocking> getBookBookStockings() { | |
1656 | 0 | if (getTroid() == null) |
1657 | 0 | return new EmptyEnumeration<BookStocking>(); |
1658 | else { | |
1659 | 0 | if (bookBookStockings == null) |
1660 | 0 | bookBookStockings = |
1661 | getBibliomaniaDatabaseTables().getBookStockingTable().getBookColumn().cachedSelectionWhereEq(getTroid()); | |
1662 | 0 | return bookBookStockings.objects(); |
1663 | } | |
1664 | } | |
1665 | ||
1666 | ||
1667 | /** References to this Book in the BookStocking table via its book field, as a List.*/ | |
1668 | public List<BookStocking> getBookBookStockingList() { | |
1669 | 0 | return Collections.list(getBookBookStockings()); |
1670 | } | |
1671 | ||
1672 | ||
1673 | ||
1674 | } | |
1675 |