View Javadoc

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 org.melati.poem.AccessPoemException;
7   import org.melati.poem.Column;
8   import org.melati.poem.Database;
9   import org.melati.poem.DefinitionSource;
10  import org.melati.poem.DisplayLevel;
11  import org.melati.poem.Field;
12  import org.melati.poem.IntegerPoemType;
13  import org.melati.poem.JdbcPersistent;
14  import org.melati.poem.Persistent;
15  import org.melati.poem.PoemException;
16  import org.melati.poem.ReferencePoemType;
17  import org.melati.poem.Searchability;
18  import org.melati.poem.StandardIntegrityFix;
19  import org.melati.poem.StringPoemType;
20  import org.melati.poem.TroidPoemType;
21  import org.melati.poem.ValidationPoemException;
22  import org.paneris.bibliomania.BibliomaniaDatabaseTables;
23  import org.paneris.bibliomania.BibliomaniaTable;
24  import org.paneris.bibliomania.Book;
25  import org.paneris.bibliomania.BookFormat;
26  import org.paneris.bibliomania.BookStocking;
27  import org.paneris.bibliomania.Bookshop;
28  
29  
30  /**
31   * Melati POEM generated base class for <code>Table</code> <code>BookStocking</code>.
32   *
33   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
34   */
35  
36  public class BookStockingTableBase<T extends BookStocking> extends BibliomaniaTable<T> {
37  
38    private Column<Integer> col_id = null;
39    private Column<Integer> col_shop = null;
40    private Column<Integer> col_book = null;
41    private Column<String> col_title = null;
42    private Column<String> col_author = null;
43    private Column<String> col_vendorproductid = null;
44    private Column<String> col_isbn = null;
45    private Column<String> col_deliveryinfo = null;
46    private Column<String> col_price = null;
47    private Column<Integer> col_pricenumber = null;
48    private Column<String> col_format = null;
49    private Column<Integer> col_formatcode = null;
50    private Column<String> col_publisher = null;
51    private Column<String> col_publicationyear = null;
52    private Column<String> col_detailurl = null;
53    private Column<String> col_thumbnailurl = null;
54  
55   /**
56    * Constructor. 
57    * 
58    * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
59    * @param database          the POEM database we are using
60    * @param name              the name of this <code>Table</code>
61    * @param definitionSource  which definition is being used
62    * @throws PoemException    if anything goes wrong
63    */
64  
65    public BookStockingTableBase(
66        Database database, String name,
67        DefinitionSource definitionSource) throws PoemException {
68      super(database, name, definitionSource);
69    }
70  
71  
72   /**
73    * Get the database tables.
74    *
75    * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
76    * @return the database tables
77    */
78    public BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() {
79      return (BibliomaniaDatabaseTables)getDatabase();
80    }
81  
82  
83   /**
84    * Initialise this table by defining its columns.
85    *
86    * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
87    */
88    public void init() throws PoemException {
89      super.init();
90      defineColumn(col_id =
91          new Column<Integer>(this, "id",
92                     new TroidPoemType(),
93                     DefinitionSource.dsd) { 
94            public Object getCooked(Persistent g)
95                throws AccessPoemException, PoemException {
96              return ((BookStocking)g).getId();
97            }
98  
99            public void setCooked(Persistent g, Object cooked)
100               throws AccessPoemException, ValidationPoemException {
101             ((BookStocking)g).setId((Integer)cooked);
102           }
103 
104           public Field<Integer> asField(Persistent g) {
105             return ((BookStocking)g).getIdField();
106           }
107 
108           public boolean defaultUserEditable() {
109             return false;
110           }
111 
112           public boolean defaultUserCreateable() {
113             return false;
114           }
115 
116           public DisplayLevel defaultDisplayLevel() {
117             return DisplayLevel.record;
118           }
119 
120           public int defaultDisplayOrder() {
121             return 0;
122           }
123 
124           public Object getRaw_unsafe(Persistent g)
125               throws AccessPoemException {
126             return ((BookStocking)g).getId_unsafe();
127           }
128 
129           public void setRaw_unsafe(Persistent g, Object raw)
130               throws AccessPoemException {
131             ((BookStocking)g).setId_unsafe((Integer)raw);
132           }
133 
134           public Object getRaw(Persistent g)
135               throws AccessPoemException {
136             return ((BookStocking)g).getId();
137           }
138 
139           public void setRaw(Persistent g, Object raw)
140               throws AccessPoemException {
141             ((BookStocking)g).setId((Integer)raw);
142           }
143         });
144 
145     defineColumn(col_shop =
146         new Column<Integer>(this, "shop",
147                    new ReferencePoemType(getBibliomaniaDatabaseTables().
148                                              getBookshopTable(), false),
149                    DefinitionSource.dsd) { 
150           public Object getCooked(Persistent g)
151               throws AccessPoemException, PoemException {
152             return ((BookStocking)g).getShop();
153           }
154 
155           public void setCooked(Persistent g, Object cooked)
156               throws AccessPoemException, ValidationPoemException {
157             ((BookStocking)g).setShop((Bookshop)cooked);
158           }
159 
160           public Field<Integer> asField(Persistent g) {
161             return ((BookStocking)g).getShopField();
162           }
163 
164           public int defaultDisplayOrder() {
165             return 1;
166           }
167 
168           public String defaultDescription() {
169             return "The bookshop";
170           }
171 
172           public Object getRaw_unsafe(Persistent g)
173               throws AccessPoemException {
174             return ((BookStocking)g).getShop_unsafe();
175           }
176 
177           public void setRaw_unsafe(Persistent g, Object raw)
178               throws AccessPoemException {
179             ((BookStocking)g).setShop_unsafe((Integer)raw);
180           }
181 
182           public Object getRaw(Persistent g)
183               throws AccessPoemException {
184             return ((BookStocking)g).getShopTroid();
185           }
186 
187           public void setRaw(Persistent g, Object raw)
188               throws AccessPoemException {
189             ((BookStocking)g).setShopTroid((Integer)raw);
190           }
191 
192           public StandardIntegrityFix defaultIntegrityFix() {
193             return StandardIntegrityFix.delete;
194           }
195         });
196 
197     defineColumn(col_book =
198         new Column<Integer>(this, "book",
199                    new ReferencePoemType(getBibliomaniaDatabaseTables().
200                                              getBookTable(), true),
201                    DefinitionSource.dsd) { 
202           public Object getCooked(Persistent g)
203               throws AccessPoemException, PoemException {
204             return ((BookStocking)g).getBook();
205           }
206 
207           public void setCooked(Persistent g, Object cooked)
208               throws AccessPoemException, ValidationPoemException {
209             ((BookStocking)g).setBook((Book)cooked);
210           }
211 
212           public Field<Integer> asField(Persistent g) {
213             return ((BookStocking)g).getBookField();
214           }
215 
216           public int defaultDisplayOrder() {
217             return 2;
218           }
219 
220           public String defaultDescription() {
221             return "The Bibliomania book corresponding to the stocked book, as far as can be determined";
222           }
223 
224           public boolean defaultIndexed() {
225             return true;
226           }
227 
228           public Object getRaw_unsafe(Persistent g)
229               throws AccessPoemException {
230             return ((BookStocking)g).getBook_unsafe();
231           }
232 
233           public void setRaw_unsafe(Persistent g, Object raw)
234               throws AccessPoemException {
235             ((BookStocking)g).setBook_unsafe((Integer)raw);
236           }
237 
238           public Object getRaw(Persistent g)
239               throws AccessPoemException {
240             return ((BookStocking)g).getBookTroid();
241           }
242 
243           public void setRaw(Persistent g, Object raw)
244               throws AccessPoemException {
245             ((BookStocking)g).setBookTroid((Integer)raw);
246           }
247 
248           public StandardIntegrityFix defaultIntegrityFix() {
249             return StandardIntegrityFix.delete;
250           }
251         });
252 
253     defineColumn(col_title =
254         new Column<String>(this, "title",
255                    new StringPoemType(false, -1),
256                    DefinitionSource.dsd) { 
257           public Object getCooked(Persistent g)
258               throws AccessPoemException, PoemException {
259             return ((BookStocking)g).getTitle();
260           }
261 
262           public void setCooked(Persistent g, Object cooked)
263               throws AccessPoemException, ValidationPoemException {
264             ((BookStocking)g).setTitle((String)cooked);
265           }
266 
267           public Field<String> asField(Persistent g) {
268             return ((BookStocking)g).getTitleField();
269           }
270 
271           public DisplayLevel defaultDisplayLevel() {
272             return DisplayLevel.primary;
273           }
274 
275           public Integer defaultDisplayOrderPriority() {
276             return new Integer(1);
277           }
278 
279           public int defaultDisplayOrder() {
280             return 3;
281           }
282 
283           public String defaultDescription() {
284             return "The bookshop's title for the book";
285           }
286 
287           public Object getRaw_unsafe(Persistent g)
288               throws AccessPoemException {
289             return ((BookStocking)g).getTitle_unsafe();
290           }
291 
292           public void setRaw_unsafe(Persistent g, Object raw)
293               throws AccessPoemException {
294             ((BookStocking)g).setTitle_unsafe((String)raw);
295           }
296 
297           public Object getRaw(Persistent g)
298               throws AccessPoemException {
299             return ((BookStocking)g).getTitle();
300           }
301 
302           public void setRaw(Persistent g, Object raw)
303               throws AccessPoemException {
304             ((BookStocking)g).setTitle((String)raw);
305           }
306         });
307 
308     defineColumn(col_author =
309         new Column<String>(this, "author",
310                    new StringPoemType(false, -1),
311                    DefinitionSource.dsd) { 
312           public Object getCooked(Persistent g)
313               throws AccessPoemException, PoemException {
314             return ((BookStocking)g).getAuthor();
315           }
316 
317           public void setCooked(Persistent g, Object cooked)
318               throws AccessPoemException, ValidationPoemException {
319             ((BookStocking)g).setAuthor((String)cooked);
320           }
321 
322           public Field<String> asField(Persistent g) {
323             return ((BookStocking)g).getAuthorField();
324           }
325 
326           public Integer defaultDisplayOrderPriority() {
327             return new Integer(0);
328           }
329 
330           public int defaultDisplayOrder() {
331             return 4;
332           }
333 
334           public String defaultDescription() {
335             return "The bookshop's author name for the book";
336           }
337 
338           public Object getRaw_unsafe(Persistent g)
339               throws AccessPoemException {
340             return ((BookStocking)g).getAuthor_unsafe();
341           }
342 
343           public void setRaw_unsafe(Persistent g, Object raw)
344               throws AccessPoemException {
345             ((BookStocking)g).setAuthor_unsafe((String)raw);
346           }
347 
348           public Object getRaw(Persistent g)
349               throws AccessPoemException {
350             return ((BookStocking)g).getAuthor();
351           }
352 
353           public void setRaw(Persistent g, Object raw)
354               throws AccessPoemException {
355             ((BookStocking)g).setAuthor((String)raw);
356           }
357         });
358 
359     defineColumn(col_vendorproductid =
360         new Column<String>(this, "vendorproductid",
361                    new StringPoemType(false, -1),
362                    DefinitionSource.dsd) { 
363           public Object getCooked(Persistent g)
364               throws AccessPoemException, PoemException {
365             return ((BookStocking)g).getVendorproductid();
366           }
367 
368           public void setCooked(Persistent g, Object cooked)
369               throws AccessPoemException, ValidationPoemException {
370             ((BookStocking)g).setVendorproductid((String)cooked);
371           }
372 
373           public Field<String> asField(Persistent g) {
374             return ((BookStocking)g).getVendorproductidField();
375           }
376 
377           public DisplayLevel defaultDisplayLevel() {
378             return DisplayLevel.record;
379           }
380 
381           public String defaultDisplayName() {
382             return "Vendor product ID";
383           }
384 
385           public int defaultDisplayOrder() {
386             return 5;
387           }
388 
389           public String defaultDescription() {
390             return "The bookshop's internal product ID for the book";
391           }
392 
393           public Object getRaw_unsafe(Persistent g)
394               throws AccessPoemException {
395             return ((BookStocking)g).getVendorproductid_unsafe();
396           }
397 
398           public void setRaw_unsafe(Persistent g, Object raw)
399               throws AccessPoemException {
400             ((BookStocking)g).setVendorproductid_unsafe((String)raw);
401           }
402 
403           public Object getRaw(Persistent g)
404               throws AccessPoemException {
405             return ((BookStocking)g).getVendorproductid();
406           }
407 
408           public void setRaw(Persistent g, Object raw)
409               throws AccessPoemException {
410             ((BookStocking)g).setVendorproductid((String)raw);
411           }
412         });
413 
414     defineColumn(col_isbn =
415         new Column<String>(this, "isbn",
416                    new StringPoemType(false, -1),
417                    DefinitionSource.dsd) { 
418           public Object getCooked(Persistent g)
419               throws AccessPoemException, PoemException {
420             return ((BookStocking)g).getIsbn();
421           }
422 
423           public void setCooked(Persistent g, Object cooked)
424               throws AccessPoemException, ValidationPoemException {
425             ((BookStocking)g).setIsbn((String)cooked);
426           }
427 
428           public Field<String> asField(Persistent g) {
429             return ((BookStocking)g).getIsbnField();
430           }
431 
432           public DisplayLevel defaultDisplayLevel() {
433             return DisplayLevel.record;
434           }
435 
436           public int defaultDisplayOrder() {
437             return 6;
438           }
439 
440           public String defaultDescription() {
441             return "The ISBN for the book";
442           }
443 
444           public Object getRaw_unsafe(Persistent g)
445               throws AccessPoemException {
446             return ((BookStocking)g).getIsbn_unsafe();
447           }
448 
449           public void setRaw_unsafe(Persistent g, Object raw)
450               throws AccessPoemException {
451             ((BookStocking)g).setIsbn_unsafe((String)raw);
452           }
453 
454           public Object getRaw(Persistent g)
455               throws AccessPoemException {
456             return ((BookStocking)g).getIsbn();
457           }
458 
459           public void setRaw(Persistent g, Object raw)
460               throws AccessPoemException {
461             ((BookStocking)g).setIsbn((String)raw);
462           }
463         });
464 
465     defineColumn(col_deliveryinfo =
466         new Column<String>(this, "deliveryinfo",
467                    new StringPoemType(false, -1),
468                    DefinitionSource.dsd) { 
469           public Object getCooked(Persistent g)
470               throws AccessPoemException, PoemException {
471             return ((BookStocking)g).getDeliveryinfo();
472           }
473 
474           public void setCooked(Persistent g, Object cooked)
475               throws AccessPoemException, ValidationPoemException {
476             ((BookStocking)g).setDeliveryinfo((String)cooked);
477           }
478 
479           public Field<String> asField(Persistent g) {
480             return ((BookStocking)g).getDeliveryinfoField();
481           }
482 
483           public DisplayLevel defaultDisplayLevel() {
484             return DisplayLevel.record;
485           }
486 
487           public String defaultDisplayName() {
488             return "Delivery info";
489           }
490 
491           public int defaultDisplayOrder() {
492             return 7;
493           }
494 
495           public String defaultDescription() {
496             return "The bookshop's delivery time claim for the book";
497           }
498 
499           public Object getRaw_unsafe(Persistent g)
500               throws AccessPoemException {
501             return ((BookStocking)g).getDeliveryinfo_unsafe();
502           }
503 
504           public void setRaw_unsafe(Persistent g, Object raw)
505               throws AccessPoemException {
506             ((BookStocking)g).setDeliveryinfo_unsafe((String)raw);
507           }
508 
509           public Object getRaw(Persistent g)
510               throws AccessPoemException {
511             return ((BookStocking)g).getDeliveryinfo();
512           }
513 
514           public void setRaw(Persistent g, Object raw)
515               throws AccessPoemException {
516             ((BookStocking)g).setDeliveryinfo((String)raw);
517           }
518         });
519 
520     defineColumn(col_price =
521         new Column<String>(this, "price",
522                    new StringPoemType(false, -1),
523                    DefinitionSource.dsd) { 
524           public Object getCooked(Persistent g)
525               throws AccessPoemException, PoemException {
526             return ((BookStocking)g).getPrice();
527           }
528 
529           public void setCooked(Persistent g, Object cooked)
530               throws AccessPoemException, ValidationPoemException {
531             ((BookStocking)g).setPrice((String)cooked);
532           }
533 
534           public Field<String> asField(Persistent g) {
535             return ((BookStocking)g).getPriceField();
536           }
537 
538           public DisplayLevel defaultDisplayLevel() {
539             return DisplayLevel.record;
540           }
541 
542           public int defaultDisplayOrder() {
543             return 8;
544           }
545 
546           public String defaultDescription() {
547             return "The bookshop's price description for the book";
548           }
549 
550           public Object getRaw_unsafe(Persistent g)
551               throws AccessPoemException {
552             return ((BookStocking)g).getPrice_unsafe();
553           }
554 
555           public void setRaw_unsafe(Persistent g, Object raw)
556               throws AccessPoemException {
557             ((BookStocking)g).setPrice_unsafe((String)raw);
558           }
559 
560           public Object getRaw(Persistent g)
561               throws AccessPoemException {
562             return ((BookStocking)g).getPrice();
563           }
564 
565           public void setRaw(Persistent g, Object raw)
566               throws AccessPoemException {
567             ((BookStocking)g).setPrice((String)raw);
568           }
569         });
570 
571     defineColumn(col_pricenumber =
572         new Column<Integer>(this, "pricenumber",
573                    new IntegerPoemType(true),
574                    DefinitionSource.dsd) { 
575           public Object getCooked(Persistent g)
576               throws AccessPoemException, PoemException {
577             return ((BookStocking)g).getPricenumber();
578           }
579 
580           public void setCooked(Persistent g, Object cooked)
581               throws AccessPoemException, ValidationPoemException {
582             ((BookStocking)g).setPricenumber((Integer)cooked);
583           }
584 
585           public Field<Integer> asField(Persistent g) {
586             return ((BookStocking)g).getPricenumberField();
587           }
588 
589           public DisplayLevel defaultDisplayLevel() {
590             return DisplayLevel.record;
591           }
592 
593           public String defaultDisplayName() {
594             return "Price (number)";
595           }
596 
597           public int defaultDisplayOrder() {
598             return 9;
599           }
600 
601           public String defaultDescription() {
602             return "A numeric version of the price, if can be calculated ...";
603           }
604 
605           public Object getRaw_unsafe(Persistent g)
606               throws AccessPoemException {
607             return ((BookStocking)g).getPricenumber_unsafe();
608           }
609 
610           public void setRaw_unsafe(Persistent g, Object raw)
611               throws AccessPoemException {
612             ((BookStocking)g).setPricenumber_unsafe((Integer)raw);
613           }
614 
615           public Object getRaw(Persistent g)
616               throws AccessPoemException {
617             return ((BookStocking)g).getPricenumber();
618           }
619 
620           public void setRaw(Persistent g, Object raw)
621               throws AccessPoemException {
622             ((BookStocking)g).setPricenumber((Integer)raw);
623           }
624         });
625 
626     defineColumn(col_format =
627         new Column<String>(this, "format",
628                    new StringPoemType(false, -1),
629                    DefinitionSource.dsd) { 
630           public Object getCooked(Persistent g)
631               throws AccessPoemException, PoemException {
632             return ((BookStocking)g).getFormat();
633           }
634 
635           public void setCooked(Persistent g, Object cooked)
636               throws AccessPoemException, ValidationPoemException {
637             ((BookStocking)g).setFormat((String)cooked);
638           }
639 
640           public Field<String> asField(Persistent g) {
641             return ((BookStocking)g).getFormatField();
642           }
643 
644           public DisplayLevel defaultDisplayLevel() {
645             return DisplayLevel.record;
646           }
647 
648           public int defaultDisplayOrder() {
649             return 10;
650           }
651 
652           public String defaultDescription() {
653             return "The bookshop's format description for the book";
654           }
655 
656           public Object getRaw_unsafe(Persistent g)
657               throws AccessPoemException {
658             return ((BookStocking)g).getFormat_unsafe();
659           }
660 
661           public void setRaw_unsafe(Persistent g, Object raw)
662               throws AccessPoemException {
663             ((BookStocking)g).setFormat_unsafe((String)raw);
664           }
665 
666           public Object getRaw(Persistent g)
667               throws AccessPoemException {
668             return ((BookStocking)g).getFormat();
669           }
670 
671           public void setRaw(Persistent g, Object raw)
672               throws AccessPoemException {
673             ((BookStocking)g).setFormat((String)raw);
674           }
675         });
676 
677     defineColumn(col_formatcode =
678         new Column<Integer>(this, "formatcode",
679                    new ReferencePoemType(getBibliomaniaDatabaseTables().
680                                              getBookFormatTable(), true),
681                    DefinitionSource.dsd) { 
682           public Object getCooked(Persistent g)
683               throws AccessPoemException, PoemException {
684             return ((BookStocking)g).getFormatcode();
685           }
686 
687           public void setCooked(Persistent g, Object cooked)
688               throws AccessPoemException, ValidationPoemException {
689             ((BookStocking)g).setFormatcode((BookFormat)cooked);
690           }
691 
692           public Field<Integer> asField(Persistent g) {
693             return ((BookStocking)g).getFormatcodeField();
694           }
695 
696           public DisplayLevel defaultDisplayLevel() {
697             return DisplayLevel.record;
698           }
699 
700           public String defaultDisplayName() {
701             return "Format code";
702           }
703 
704           public int defaultDisplayOrder() {
705             return 11;
706           }
707 
708           public String defaultDescription() {
709             return "A code representing the book's format in a consistent way, as far as it can be determined";
710           }
711 
712           public Object getRaw_unsafe(Persistent g)
713               throws AccessPoemException {
714             return ((BookStocking)g).getFormatcode_unsafe();
715           }
716 
717           public void setRaw_unsafe(Persistent g, Object raw)
718               throws AccessPoemException {
719             ((BookStocking)g).setFormatcode_unsafe((Integer)raw);
720           }
721 
722           public Object getRaw(Persistent g)
723               throws AccessPoemException {
724             return ((BookStocking)g).getFormatcodeTroid();
725           }
726 
727           public void setRaw(Persistent g, Object raw)
728               throws AccessPoemException {
729             ((BookStocking)g).setFormatcodeTroid((Integer)raw);
730           }
731         });
732 
733     defineColumn(col_publisher =
734         new Column<String>(this, "publisher",
735                    new StringPoemType(false, -1),
736                    DefinitionSource.dsd) { 
737           public Object getCooked(Persistent g)
738               throws AccessPoemException, PoemException {
739             return ((BookStocking)g).getPublisher();
740           }
741 
742           public void setCooked(Persistent g, Object cooked)
743               throws AccessPoemException, ValidationPoemException {
744             ((BookStocking)g).setPublisher((String)cooked);
745           }
746 
747           public Field<String> asField(Persistent g) {
748             return ((BookStocking)g).getPublisherField();
749           }
750 
751           public Integer defaultDisplayOrderPriority() {
752             return new Integer(2);
753           }
754 
755           public int defaultDisplayOrder() {
756             return 12;
757           }
758 
759           public String defaultDescription() {
760             return "The bookshop's publisher description for the book";
761           }
762 
763           public Object getRaw_unsafe(Persistent g)
764               throws AccessPoemException {
765             return ((BookStocking)g).getPublisher_unsafe();
766           }
767 
768           public void setRaw_unsafe(Persistent g, Object raw)
769               throws AccessPoemException {
770             ((BookStocking)g).setPublisher_unsafe((String)raw);
771           }
772 
773           public Object getRaw(Persistent g)
774               throws AccessPoemException {
775             return ((BookStocking)g).getPublisher();
776           }
777 
778           public void setRaw(Persistent g, Object raw)
779               throws AccessPoemException {
780             ((BookStocking)g).setPublisher((String)raw);
781           }
782         });
783 
784     defineColumn(col_publicationyear =
785         new Column<String>(this, "publicationyear",
786                    new StringPoemType(true, -1),
787                    DefinitionSource.dsd) { 
788           public Object getCooked(Persistent g)
789               throws AccessPoemException, PoemException {
790             return ((BookStocking)g).getPublicationyear();
791           }
792 
793           public void setCooked(Persistent g, Object cooked)
794               throws AccessPoemException, ValidationPoemException {
795             ((BookStocking)g).setPublicationyear((String)cooked);
796           }
797 
798           public Field<String> asField(Persistent g) {
799             return ((BookStocking)g).getPublicationyearField();
800           }
801 
802           public DisplayLevel defaultDisplayLevel() {
803             return DisplayLevel.record;
804           }
805 
806           public String defaultDisplayName() {
807             return "Publication year";
808           }
809 
810           public int defaultDisplayOrder() {
811             return 13;
812           }
813 
814           public String defaultDescription() {
815             return "The bookshop's publication year description for the book";
816           }
817 
818           public Object getRaw_unsafe(Persistent g)
819               throws AccessPoemException {
820             return ((BookStocking)g).getPublicationyear_unsafe();
821           }
822 
823           public void setRaw_unsafe(Persistent g, Object raw)
824               throws AccessPoemException {
825             ((BookStocking)g).setPublicationyear_unsafe((String)raw);
826           }
827 
828           public Object getRaw(Persistent g)
829               throws AccessPoemException {
830             return ((BookStocking)g).getPublicationyear();
831           }
832 
833           public void setRaw(Persistent g, Object raw)
834               throws AccessPoemException {
835             ((BookStocking)g).setPublicationyear((String)raw);
836           }
837         });
838 
839     defineColumn(col_detailurl =
840         new Column<String>(this, "detailurl",
841                    new StringPoemType(false, -1),
842                    DefinitionSource.dsd) { 
843           public Object getCooked(Persistent g)
844               throws AccessPoemException, PoemException {
845             return ((BookStocking)g).getDetailurl();
846           }
847 
848           public void setCooked(Persistent g, Object cooked)
849               throws AccessPoemException, ValidationPoemException {
850             ((BookStocking)g).setDetailurl((String)cooked);
851           }
852 
853           public Field<String> asField(Persistent g) {
854             return ((BookStocking)g).getDetailurlField();
855           }
856 
857           public DisplayLevel defaultDisplayLevel() {
858             return DisplayLevel.record;
859           }
860 
861           public Searchability defaultSearchability() {
862             return Searchability.no;
863           }
864 
865           public String defaultDisplayName() {
866             return "Detail URL";
867           }
868 
869           public int defaultDisplayOrder() {
870             return 14;
871           }
872 
873           public String defaultDescription() {
874             return "A scratchpad for storing info about the book's home page on the bookshop (or, unused)";
875           }
876 
877           public Object getRaw_unsafe(Persistent g)
878               throws AccessPoemException {
879             return ((BookStocking)g).getDetailurl_unsafe();
880           }
881 
882           public void setRaw_unsafe(Persistent g, Object raw)
883               throws AccessPoemException {
884             ((BookStocking)g).setDetailurl_unsafe((String)raw);
885           }
886 
887           public Object getRaw(Persistent g)
888               throws AccessPoemException {
889             return ((BookStocking)g).getDetailurl();
890           }
891 
892           public void setRaw(Persistent g, Object raw)
893               throws AccessPoemException {
894             ((BookStocking)g).setDetailurl((String)raw);
895           }
896         });
897 
898     defineColumn(col_thumbnailurl =
899         new Column<String>(this, "thumbnailurl",
900                    new StringPoemType(true, -1),
901                    DefinitionSource.dsd) { 
902           public Object getCooked(Persistent g)
903               throws AccessPoemException, PoemException {
904             return ((BookStocking)g).getThumbnailurl();
905           }
906 
907           public void setCooked(Persistent g, Object cooked)
908               throws AccessPoemException, ValidationPoemException {
909             ((BookStocking)g).setThumbnailurl((String)cooked);
910           }
911 
912           public Field<String> asField(Persistent g) {
913             return ((BookStocking)g).getThumbnailurlField();
914           }
915 
916           public DisplayLevel defaultDisplayLevel() {
917             return DisplayLevel.record;
918           }
919 
920           public Searchability defaultSearchability() {
921             return Searchability.no;
922           }
923 
924           public String defaultDisplayName() {
925             return "Thumbnail URL";
926           }
927 
928           public int defaultDisplayOrder() {
929             return 15;
930           }
931 
932           public String defaultDescription() {
933             return "An URL for the book's cover page image on the bookshop";
934           }
935 
936           public Object getRaw_unsafe(Persistent g)
937               throws AccessPoemException {
938             return ((BookStocking)g).getThumbnailurl_unsafe();
939           }
940 
941           public void setRaw_unsafe(Persistent g, Object raw)
942               throws AccessPoemException {
943             ((BookStocking)g).setThumbnailurl_unsafe((String)raw);
944           }
945 
946           public Object getRaw(Persistent g)
947               throws AccessPoemException {
948             return ((BookStocking)g).getThumbnailurl();
949           }
950 
951           public void setRaw(Persistent g, Object raw)
952               throws AccessPoemException {
953             ((BookStocking)g).setThumbnailurl((String)raw);
954           }
955         });
956   }
957 
958 
959  /**
960   * Retrieves the <code>Id</code> <code>Column</code> for this 
961   * <code>BookStocking</code> <code>Table</code>.
962   * 
963   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
964   * @return the id <code>Column</code>
965   */
966   public final Column<Integer> getIdColumn() {
967     return col_id;
968   }
969 
970 
971  /**
972   * Retrieves the <code>Shop</code> <code>Column</code> for this 
973   * <code>BookStocking</code> <code>Table</code>.
974   * 
975   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
976   * @return the shop <code>Column</code>
977   */
978   public final Column<Integer> getShopColumn() {
979     return col_shop;
980   }
981 
982 
983  /**
984   * Retrieves the <code>Book</code> <code>Column</code> for this 
985   * <code>BookStocking</code> <code>Table</code>.
986   * 
987   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
988   * @return the book <code>Column</code>
989   */
990   public final Column<Integer> getBookColumn() {
991     return col_book;
992   }
993 
994 
995  /**
996   * Retrieves the <code>Title</code> <code>Column</code> for this 
997   * <code>BookStocking</code> <code>Table</code>.
998   * 
999   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1000   * @return the title <code>Column</code>
1001   */
1002   public final Column<String> getTitleColumn() {
1003     return col_title;
1004   }
1005 
1006 
1007  /**
1008   * Retrieves the <code>Author</code> <code>Column</code> for this 
1009   * <code>BookStocking</code> <code>Table</code>.
1010   * 
1011   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1012   * @return the author <code>Column</code>
1013   */
1014   public final Column<String> getAuthorColumn() {
1015     return col_author;
1016   }
1017 
1018 
1019  /**
1020   * Retrieves the <code>Vendorproductid</code> <code>Column</code> for this 
1021   * <code>BookStocking</code> <code>Table</code>.
1022   * 
1023   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1024   * @return the vendorproductid <code>Column</code>
1025   */
1026   public final Column<String> getVendorproductidColumn() {
1027     return col_vendorproductid;
1028   }
1029 
1030 
1031  /**
1032   * Retrieves the <code>Isbn</code> <code>Column</code> for this 
1033   * <code>BookStocking</code> <code>Table</code>.
1034   * 
1035   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1036   * @return the isbn <code>Column</code>
1037   */
1038   public final Column<String> getIsbnColumn() {
1039     return col_isbn;
1040   }
1041 
1042 
1043  /**
1044   * Retrieves the <code>Deliveryinfo</code> <code>Column</code> for this 
1045   * <code>BookStocking</code> <code>Table</code>.
1046   * 
1047   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1048   * @return the deliveryinfo <code>Column</code>
1049   */
1050   public final Column<String> getDeliveryinfoColumn() {
1051     return col_deliveryinfo;
1052   }
1053 
1054 
1055  /**
1056   * Retrieves the <code>Price</code> <code>Column</code> for this 
1057   * <code>BookStocking</code> <code>Table</code>.
1058   * 
1059   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1060   * @return the price <code>Column</code>
1061   */
1062   public final Column<String> getPriceColumn() {
1063     return col_price;
1064   }
1065 
1066 
1067  /**
1068   * Retrieves the <code>Pricenumber</code> <code>Column</code> for this 
1069   * <code>BookStocking</code> <code>Table</code>.
1070   * 
1071   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1072   * @return the pricenumber <code>Column</code>
1073   */
1074   public final Column<Integer> getPricenumberColumn() {
1075     return col_pricenumber;
1076   }
1077 
1078 
1079  /**
1080   * Retrieves the <code>Format</code> <code>Column</code> for this 
1081   * <code>BookStocking</code> <code>Table</code>.
1082   * 
1083   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1084   * @return the format <code>Column</code>
1085   */
1086   public final Column<String> getFormatColumn() {
1087     return col_format;
1088   }
1089 
1090 
1091  /**
1092   * Retrieves the <code>Formatcode</code> <code>Column</code> for this 
1093   * <code>BookStocking</code> <code>Table</code>.
1094   * 
1095   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1096   * @return the formatcode <code>Column</code>
1097   */
1098   public final Column<Integer> getFormatcodeColumn() {
1099     return col_formatcode;
1100   }
1101 
1102 
1103  /**
1104   * Retrieves the <code>Publisher</code> <code>Column</code> for this 
1105   * <code>BookStocking</code> <code>Table</code>.
1106   * 
1107   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1108   * @return the publisher <code>Column</code>
1109   */
1110   public final Column<String> getPublisherColumn() {
1111     return col_publisher;
1112   }
1113 
1114 
1115  /**
1116   * Retrieves the <code>Publicationyear</code> <code>Column</code> for this 
1117   * <code>BookStocking</code> <code>Table</code>.
1118   * 
1119   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1120   * @return the publicationyear <code>Column</code>
1121   */
1122   public final Column<String> getPublicationyearColumn() {
1123     return col_publicationyear;
1124   }
1125 
1126 
1127  /**
1128   * Retrieves the <code>Detailurl</code> <code>Column</code> for this 
1129   * <code>BookStocking</code> <code>Table</code>.
1130   * 
1131   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1132   * @return the detailurl <code>Column</code>
1133   */
1134   public final Column<String> getDetailurlColumn() {
1135     return col_detailurl;
1136   }
1137 
1138 
1139  /**
1140   * Retrieves the <code>Thumbnailurl</code> <code>Column</code> for this 
1141   * <code>BookStocking</code> <code>Table</code>.
1142   * 
1143   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
1144   * @return the thumbnailurl <code>Column</code>
1145   */
1146   public final Column<String> getThumbnailurlColumn() {
1147     return col_thumbnailurl;
1148   }
1149 
1150 
1151  /**
1152   * Retrieve the <code>BookStocking</code> as a <code>BookStocking</code>.
1153   *
1154   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
1155   * @param troid a Table Row Oject ID
1156   * @return the <code>Persistent</code> identified by the <code>troid</code>
1157   */
1158   public BookStocking getBookStockingObject(Integer troid) {
1159     return (BookStocking)getObject(troid);
1160   }
1161 
1162 
1163  /**
1164   * Retrieve the <code>BookStocking</code> 
1165   * as a <code>BookStocking</code>.
1166   *
1167   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
1168   * @param troid a Table Row Object ID
1169   * @return the <code>Persistent</code> identified   */
1170   public BookStocking getBookStockingObject(int troid) {
1171     return (BookStocking)getObject(troid);
1172   }
1173 
1174   protected JdbcPersistent _newPersistent() {
1175     return new BookStocking();
1176   }
1177   public String defaultDescription() {
1178     return "A record that an online bookshop stocks a particular book";
1179   }
1180 
1181   public String defaultCategory() {
1182     return "Comparison Shopper";
1183   }
1184 
1185   public int defaultDisplayOrder() {
1186     return 1320;
1187   }
1188 }
1189