Coverage Report - org.paneris.bibliomania.generated.StockingsSearchTableBase
 
Classes in this File Line Coverage Branch Coverage Complexity
StockingsSearchTableBase
53%
14/26
N/A
1
StockingsSearchTableBase$1
6%
1/15
N/A
1
StockingsSearchTableBase$2
7%
1/13
N/A
1
StockingsSearchTableBase$3
7%
1/13
N/A
1
StockingsSearchTableBase$4
8%
1/12
N/A
1
StockingsSearchTableBase$5
7%
1/13
N/A
1
 
 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 org.melati.poem.AccessPoemException;
 8  
 import org.melati.poem.Column;
 9  
 import org.melati.poem.Database;
 10  
 import org.melati.poem.DefinitionSource;
 11  
 import org.melati.poem.DisplayLevel;
 12  
 import org.melati.poem.Field;
 13  
 import org.melati.poem.JdbcPersistent;
 14  
 import org.melati.poem.Persistent;
 15  
 import org.melati.poem.PoemException;
 16  
 import org.melati.poem.StringPoemType;
 17  
 import org.melati.poem.TimestampPoemType;
 18  
 import org.melati.poem.TroidPoemType;
 19  
 import org.melati.poem.ValidationPoemException;
 20  
 import org.paneris.bibliomania.BibliomaniaDatabaseTables;
 21  
 import org.paneris.bibliomania.BibliomaniaTable;
 22  
 import org.paneris.bibliomania.StockingsSearch;
 23  
 
 24  
 
 25  
 /**
 26  
  * Melati POEM generated base class for <code>Table</code> <code>StockingsSearch</code>.
 27  
  *
 28  
  * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
 29  
  */
 30  
 
 31  
 public class StockingsSearchTableBase<T extends StockingsSearch> extends BibliomaniaTable<T> {
 32  
 
 33  2
   private Column<Integer> col_id = null;
 34  2
   private Column<String> col_authorterm = null;
 35  2
   private Column<String> col_titleterm = null;
 36  2
   private Column<Timestamp> col_lastperformed = null;
 37  2
   private Column<Timestamp> col_lastaccessed = null;
 38  
 
 39  
  /**
 40  
   * Constructor. 
 41  
   * 
 42  
   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
 43  
   * @param database          the POEM database we are using
 44  
   * @param name              the name of this <code>Table</code>
 45  
   * @param definitionSource  which definition is being used
 46  
   * @throws PoemException    if anything goes wrong
 47  
   */
 48  
 
 49  
   public StockingsSearchTableBase(
 50  
       Database database, String name,
 51  
       DefinitionSource definitionSource) throws PoemException {
 52  2
     super(database, name, definitionSource);
 53  2
   }
 54  
 
 55  
 
 56  
  /**
 57  
   * Get the database tables.
 58  
   *
 59  
   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
 60  
   * @return the database tables
 61  
   */
 62  
   public BibliomaniaDatabaseTables getBibliomaniaDatabaseTables() {
 63  0
     return (BibliomaniaDatabaseTables)getDatabase();
 64  
   }
 65  
 
 66  
 
 67  
  /**
 68  
   * Initialise this table by defining its columns.
 69  
   *
 70  
   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
 71  
   */
 72  
   public void init() throws PoemException {
 73  2
     super.init();
 74  2
     defineColumn(col_id =
 75  
         new Column<Integer>(this, "id",
 76  
                    new TroidPoemType(),
 77  2
                    DefinitionSource.dsd) { 
 78  
           public Object getCooked(Persistent g)
 79  
               throws AccessPoemException, PoemException {
 80  0
             return ((StockingsSearch)g).getId();
 81  
           }
 82  
 
 83  
           public void setCooked(Persistent g, Object cooked)
 84  
               throws AccessPoemException, ValidationPoemException {
 85  0
             ((StockingsSearch)g).setId((Integer)cooked);
 86  0
           }
 87  
 
 88  
           public Field<Integer> asField(Persistent g) {
 89  0
             return ((StockingsSearch)g).getIdField();
 90  
           }
 91  
 
 92  
           public boolean defaultUserEditable() {
 93  0
             return false;
 94  
           }
 95  
 
 96  
           public boolean defaultUserCreateable() {
 97  0
             return false;
 98  
           }
 99  
 
 100  
           public DisplayLevel defaultDisplayLevel() {
 101  0
             return DisplayLevel.record;
 102  
           }
 103  
 
 104  
           public int defaultDisplayOrder() {
 105  0
             return 0;
 106  
           }
 107  
 
 108  
           public Object getRaw_unsafe(Persistent g)
 109  
               throws AccessPoemException {
 110  0
             return ((StockingsSearch)g).getId_unsafe();
 111  
           }
 112  
 
 113  
           public void setRaw_unsafe(Persistent g, Object raw)
 114  
               throws AccessPoemException {
 115  0
             ((StockingsSearch)g).setId_unsafe((Integer)raw);
 116  0
           }
 117  
 
 118  
           public Object getRaw(Persistent g)
 119  
               throws AccessPoemException {
 120  0
             return ((StockingsSearch)g).getId();
 121  
           }
 122  
 
 123  
           public void setRaw(Persistent g, Object raw)
 124  
               throws AccessPoemException {
 125  0
             ((StockingsSearch)g).setId((Integer)raw);
 126  0
           }
 127  
         });
 128  
 
 129  2
     defineColumn(col_authorterm =
 130  
         new Column<String>(this, "authorterm",
 131  
                    new StringPoemType(false, -1),
 132  2
                    DefinitionSource.dsd) { 
 133  
           public Object getCooked(Persistent g)
 134  
               throws AccessPoemException, PoemException {
 135  0
             return ((StockingsSearch)g).getAuthorterm();
 136  
           }
 137  
 
 138  
           public void setCooked(Persistent g, Object cooked)
 139  
               throws AccessPoemException, ValidationPoemException {
 140  0
             ((StockingsSearch)g).setAuthorterm((String)cooked);
 141  0
           }
 142  
 
 143  
           public Field<String> asField(Persistent g) {
 144  0
             return ((StockingsSearch)g).getAuthortermField();
 145  
           }
 146  
 
 147  
           public int defaultDisplayOrder() {
 148  0
             return 1;
 149  
           }
 150  
 
 151  
           public boolean defaultIndexed() {
 152  0
             return true;
 153  
           }
 154  
 
 155  
           public Object getRaw_unsafe(Persistent g)
 156  
               throws AccessPoemException {
 157  0
             return ((StockingsSearch)g).getAuthorterm_unsafe();
 158  
           }
 159  
 
 160  
           public void setRaw_unsafe(Persistent g, Object raw)
 161  
               throws AccessPoemException {
 162  0
             ((StockingsSearch)g).setAuthorterm_unsafe((String)raw);
 163  0
           }
 164  
 
 165  
           public Object getRaw(Persistent g)
 166  
               throws AccessPoemException {
 167  0
             return ((StockingsSearch)g).getAuthorterm();
 168  
           }
 169  
 
 170  
           public void setRaw(Persistent g, Object raw)
 171  
               throws AccessPoemException {
 172  0
             ((StockingsSearch)g).setAuthorterm((String)raw);
 173  0
           }
 174  
         });
 175  
 
 176  2
     defineColumn(col_titleterm =
 177  
         new Column<String>(this, "titleterm",
 178  
                    new StringPoemType(false, -1),
 179  2
                    DefinitionSource.dsd) { 
 180  
           public Object getCooked(Persistent g)
 181  
               throws AccessPoemException, PoemException {
 182  0
             return ((StockingsSearch)g).getTitleterm();
 183  
           }
 184  
 
 185  
           public void setCooked(Persistent g, Object cooked)
 186  
               throws AccessPoemException, ValidationPoemException {
 187  0
             ((StockingsSearch)g).setTitleterm((String)cooked);
 188  0
           }
 189  
 
 190  
           public Field<String> asField(Persistent g) {
 191  0
             return ((StockingsSearch)g).getTitletermField();
 192  
           }
 193  
 
 194  
           public int defaultDisplayOrder() {
 195  0
             return 2;
 196  
           }
 197  
 
 198  
           public boolean defaultIndexed() {
 199  0
             return true;
 200  
           }
 201  
 
 202  
           public Object getRaw_unsafe(Persistent g)
 203  
               throws AccessPoemException {
 204  0
             return ((StockingsSearch)g).getTitleterm_unsafe();
 205  
           }
 206  
 
 207  
           public void setRaw_unsafe(Persistent g, Object raw)
 208  
               throws AccessPoemException {
 209  0
             ((StockingsSearch)g).setTitleterm_unsafe((String)raw);
 210  0
           }
 211  
 
 212  
           public Object getRaw(Persistent g)
 213  
               throws AccessPoemException {
 214  0
             return ((StockingsSearch)g).getTitleterm();
 215  
           }
 216  
 
 217  
           public void setRaw(Persistent g, Object raw)
 218  
               throws AccessPoemException {
 219  0
             ((StockingsSearch)g).setTitleterm((String)raw);
 220  0
           }
 221  
         });
 222  
 
 223  2
     defineColumn(col_lastperformed =
 224  
         new Column<Timestamp>(this, "lastperformed",
 225  
                    new TimestampPoemType(true),
 226  2
                    DefinitionSource.dsd) { 
 227  
           public Object getCooked(Persistent g)
 228  
               throws AccessPoemException, PoemException {
 229  0
             return ((StockingsSearch)g).getLastperformed();
 230  
           }
 231  
 
 232  
           public void setCooked(Persistent g, Object cooked)
 233  
               throws AccessPoemException, ValidationPoemException {
 234  0
             ((StockingsSearch)g).setLastperformed((Timestamp)cooked);
 235  0
           }
 236  
 
 237  
           public Field<Timestamp> asField(Persistent g) {
 238  0
             return ((StockingsSearch)g).getLastperformedField();
 239  
           }
 240  
 
 241  
           public int defaultDisplayOrder() {
 242  0
             return 3;
 243  
           }
 244  
 
 245  
           public Object getRaw_unsafe(Persistent g)
 246  
               throws AccessPoemException {
 247  0
             return ((StockingsSearch)g).getLastperformed_unsafe();
 248  
           }
 249  
 
 250  
           public void setRaw_unsafe(Persistent g, Object raw)
 251  
               throws AccessPoemException {
 252  0
             ((StockingsSearch)g).setLastperformed_unsafe((Timestamp)raw);
 253  0
           }
 254  
 
 255  
           public Object getRaw(Persistent g)
 256  
               throws AccessPoemException {
 257  0
             return ((StockingsSearch)g).getLastperformed();
 258  
           }
 259  
 
 260  
           public void setRaw(Persistent g, Object raw)
 261  
               throws AccessPoemException {
 262  0
             ((StockingsSearch)g).setLastperformed((Timestamp)raw);
 263  0
           }
 264  
         });
 265  
 
 266  2
     defineColumn(col_lastaccessed =
 267  
         new Column<Timestamp>(this, "lastaccessed",
 268  
                    new TimestampPoemType(true),
 269  2
                    DefinitionSource.dsd) { 
 270  
           public Object getCooked(Persistent g)
 271  
               throws AccessPoemException, PoemException {
 272  0
             return ((StockingsSearch)g).getLastaccessed();
 273  
           }
 274  
 
 275  
           public void setCooked(Persistent g, Object cooked)
 276  
               throws AccessPoemException, ValidationPoemException {
 277  0
             ((StockingsSearch)g).setLastaccessed((Timestamp)cooked);
 278  0
           }
 279  
 
 280  
           public Field<Timestamp> asField(Persistent g) {
 281  0
             return ((StockingsSearch)g).getLastaccessedField();
 282  
           }
 283  
 
 284  
           public int defaultDisplayOrder() {
 285  0
             return 4;
 286  
           }
 287  
 
 288  
           public boolean defaultIndexed() {
 289  0
             return true;
 290  
           }
 291  
 
 292  
           public Object getRaw_unsafe(Persistent g)
 293  
               throws AccessPoemException {
 294  0
             return ((StockingsSearch)g).getLastaccessed_unsafe();
 295  
           }
 296  
 
 297  
           public void setRaw_unsafe(Persistent g, Object raw)
 298  
               throws AccessPoemException {
 299  0
             ((StockingsSearch)g).setLastaccessed_unsafe((Timestamp)raw);
 300  0
           }
 301  
 
 302  
           public Object getRaw(Persistent g)
 303  
               throws AccessPoemException {
 304  0
             return ((StockingsSearch)g).getLastaccessed();
 305  
           }
 306  
 
 307  
           public void setRaw(Persistent g, Object raw)
 308  
               throws AccessPoemException {
 309  0
             ((StockingsSearch)g).setLastaccessed((Timestamp)raw);
 310  0
           }
 311  
         });
 312  2
   }
 313  
 
 314  
 
 315  
  /**
 316  
   * Retrieves the <code>Id</code> <code>Column</code> for this 
 317  
   * <code>StockingsSearch</code> <code>Table</code>.
 318  
   * 
 319  
   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
 320  
   * @return the id <code>Column</code>
 321  
   */
 322  
   public final Column<Integer> getIdColumn() {
 323  0
     return col_id;
 324  
   }
 325  
 
 326  
 
 327  
  /**
 328  
   * Retrieves the <code>Authorterm</code> <code>Column</code> for this 
 329  
   * <code>StockingsSearch</code> <code>Table</code>.
 330  
   * 
 331  
   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
 332  
   * @return the authorterm <code>Column</code>
 333  
   */
 334  
   public final Column<String> getAuthortermColumn() {
 335  0
     return col_authorterm;
 336  
   }
 337  
 
 338  
 
 339  
  /**
 340  
   * Retrieves the <code>Titleterm</code> <code>Column</code> for this 
 341  
   * <code>StockingsSearch</code> <code>Table</code>.
 342  
   * 
 343  
   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
 344  
   * @return the titleterm <code>Column</code>
 345  
   */
 346  
   public final Column<String> getTitletermColumn() {
 347  0
     return col_titleterm;
 348  
   }
 349  
 
 350  
 
 351  
  /**
 352  
   * Retrieves the <code>Lastperformed</code> <code>Column</code> for this 
 353  
   * <code>StockingsSearch</code> <code>Table</code>.
 354  
   * 
 355  
   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
 356  
   * @return the lastperformed <code>Column</code>
 357  
   */
 358  
   public final Column<Timestamp> getLastperformedColumn() {
 359  0
     return col_lastperformed;
 360  
   }
 361  
 
 362  
 
 363  
  /**
 364  
   * Retrieves the <code>Lastaccessed</code> <code>Column</code> for this 
 365  
   * <code>StockingsSearch</code> <code>Table</code>.
 366  
   * 
 367  
   * see org.melati.poem.prepro.FieldDef#generateColAccessor 
 368  
   * @return the lastaccessed <code>Column</code>
 369  
   */
 370  
   public final Column<Timestamp> getLastaccessedColumn() {
 371  0
     return col_lastaccessed;
 372  
   }
 373  
 
 374  
 
 375  
  /**
 376  
   * Retrieve the <code>StockingsSearch</code> as a <code>StockingsSearch</code>.
 377  
   *
 378  
   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
 379  
   * @param troid a Table Row Oject ID
 380  
   * @return the <code>Persistent</code> identified by the <code>troid</code>
 381  
   */
 382  
   public StockingsSearch getStockingsSearchObject(Integer troid) {
 383  0
     return (StockingsSearch)getObject(troid);
 384  
   }
 385  
 
 386  
 
 387  
  /**
 388  
   * Retrieve the <code>StockingsSearch</code> 
 389  
   * as a <code>StockingsSearch</code>.
 390  
   *
 391  
   * see org.melati.poem.prepro.TableDef#generateTableBaseJava 
 392  
   * @param troid a Table Row Object ID
 393  
   * @return the <code>Persistent</code> identified   */
 394  
   public StockingsSearch getStockingsSearchObject(int troid) {
 395  0
     return (StockingsSearch)getObject(troid);
 396  
   }
 397  
 
 398  
   protected JdbcPersistent _newPersistent() {
 399  0
     return new StockingsSearch();
 400  
   }
 401  
   public String defaultDescription() {
 402  0
     return "A record of an online bookshop search";
 403  
   }
 404  
 
 405  
   public String defaultCategory() {
 406  0
     return "Comparison Shopper";
 407  
   }
 408  
 
 409  
   public int defaultDisplayOrder() {
 410  0
     return 1330;
 411  
   }
 412  
 }
 413