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