Coverage Report - org.paneris.jammyjoes.model.generated.AffiliateTransactionTableBase
 
Classes in this File Line Coverage Branch Coverage Complexity
AffiliateTransactionTableBase
0%
0/31
N/A
1
AffiliateTransactionTableBase$1
0%
0/18
N/A
1
AffiliateTransactionTableBase$2
0%
0/14
N/A
1
AffiliateTransactionTableBase$3
0%
0/15
N/A
1
AffiliateTransactionTableBase$4
0%
0/16
N/A
1
AffiliateTransactionTableBase$5
0%
0/16
N/A
1
AffiliateTransactionTableBase$6
0%
0/16
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 java.sql.Timestamp;
 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.JdbcPersistent;
 13  
 import org.melati.poem.Persistent;
 14  
 import org.melati.poem.PoemException;
 15  
 import org.melati.poem.ReferencePoemType;
 16  
 import org.melati.poem.Searchability;
 17  
 import org.melati.poem.StringPoemType;
 18  
 import org.melati.poem.TimestampPoemType;
 19  
 import org.melati.poem.TroidPoemType;
 20  
 import org.melati.poem.ValidationPoemException;
 21  
 import org.paneris.jammyjoes.model.Affiliate;
 22  
 import org.paneris.jammyjoes.model.AffiliateTransaction;
 23  
 import org.paneris.jammyjoes.model.JammyjoesDatabaseTables;
 24  
 import org.paneris.jammyjoes.model.JammyjoesTable;
 25  
 
 26  
 
 27  
 /**
 28  
  * Melati POEM generated base class for 
 29  
 <code>Table</code> <code>AffiliateTransaction</code>.
 30  
  *
 31  
  * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 32  
  */
 33  
 
 34  
 public class AffiliateTransactionTableBase extends JammyjoesTable {
 35  
 
 36  0
   private Column col_id = null;
 37  0
   private Column col_affiliate = null;
 38  0
   private Column col_hit = null;
 39  0
   private Column col_referrerURL = null;
 40  0
   private Column col_landingPage = null;
 41  0
   private Column col_userIpAddress = null;
 42  
 
 43  
  /**
 44  
   * Constructor. 
 45  
   * 
 46  
   * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 47  
   * @param database          the POEM database we are using
 48  
   * @param name              the name of this <code>Table</code>
 49  
   * @param definitionSource  which definition is being used
 50  
   * @throws PoemException    if anything goes wrong
 51  
   */
 52  
 
 53  
   public AffiliateTransactionTableBase(
 54  
       Database database, String name,
 55  
       DefinitionSource definitionSource) throws PoemException {
 56  0
     super(database, name, definitionSource);
 57  0
   }
 58  
 
 59  
 
 60  
  /**
 61  
   * Get the database tables.
 62  
   *
 63  
   * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 64  
   * @return the database tables
 65  
   */
 66  
   public JammyjoesDatabaseTables getJammyjoesDatabaseTables() {
 67  0
     return (JammyjoesDatabaseTables)getDatabase();
 68  
   }
 69  
 
 70  
   public void init() throws PoemException {
 71  0
     super.init();
 72  0
     defineColumn(col_id =
 73  
         new Column(this, "id",
 74  
                    new TroidPoemType(),
 75  
                    DefinitionSource.dsd) { 
 76  
           public Object getCooked(Persistent g)
 77  
               throws AccessPoemException, PoemException {
 78  0
             return ((AffiliateTransaction)g).getId();
 79  
           }
 80  
 
 81  
           public void setCooked(Persistent g, Object cooked)
 82  
               throws AccessPoemException, ValidationPoemException {
 83  0
             ((AffiliateTransaction)g).setId((Integer)cooked);
 84  0
           }
 85  
 
 86  
           public Field asField(Persistent g) {
 87  0
             return ((AffiliateTransaction)g).getIdField();
 88  
           }
 89  
 
 90  
           protected boolean defaultUserEditable() {
 91  0
             return false;
 92  
           }
 93  
 
 94  
           protected boolean defaultUserCreateable() {
 95  0
             return false;
 96  
           }
 97  
 
 98  
           protected DisplayLevel defaultDisplayLevel() {
 99  0
             return DisplayLevel.record;
 100  
           }
 101  
 
 102  
           protected Searchability defaultSearchability() {
 103  0
             return Searchability.no;
 104  
           }
 105  
 
 106  
           protected Integer defaultDisplayOrderPriority() {
 107  0
             return new Integer(0);
 108  
           }
 109  
 
 110  
           protected boolean defaultSortDescending() {
 111  0
             return true;
 112  
           }
 113  
 
 114  
           protected int defaultDisplayOrder() {
 115  0
             return 0;
 116  
           }
 117  
 
 118  
           public Object getRaw_unsafe(Persistent g)
 119  
               throws AccessPoemException {
 120  0
             return ((AffiliateTransaction)g).getId_unsafe();
 121  
           }
 122  
 
 123  
           public void setRaw_unsafe(Persistent g, Object raw)
 124  
               throws AccessPoemException {
 125  0
             ((AffiliateTransaction)g).setId_unsafe((Integer)raw);
 126  0
           }
 127  
 
 128  
           public Object getRaw(Persistent g)
 129  
               throws AccessPoemException {
 130  0
             return ((AffiliateTransaction)g).getId();
 131  
           }
 132  
 
 133  0
           public void setRaw(Persistent g, Object raw)
 134  
               throws AccessPoemException {
 135  0
             ((AffiliateTransaction)g).setId((Integer)raw);
 136  0
           }
 137  
         });
 138  
 
 139  0
     defineColumn(col_affiliate =
 140  
         new Column(this, "affiliate",
 141  
                    new ReferencePoemType(getJammyjoesDatabaseTables().
 142  
                                              getAffiliateTable(), false),
 143  
                    DefinitionSource.dsd) { 
 144  
           public Object getCooked(Persistent g)
 145  
               throws AccessPoemException, PoemException {
 146  0
             return ((AffiliateTransaction)g).getAffiliate();
 147  
           }
 148  
 
 149  
           public void setCooked(Persistent g, Object cooked)
 150  
               throws AccessPoemException, ValidationPoemException {
 151  0
             ((AffiliateTransaction)g).setAffiliate((Affiliate)cooked);
 152  0
           }
 153  
 
 154  
           public Field asField(Persistent g) {
 155  0
             return ((AffiliateTransaction)g).getAffiliateField();
 156  
           }
 157  
 
 158  
           protected DisplayLevel defaultDisplayLevel() {
 159  0
             return DisplayLevel.record;
 160  
           }
 161  
 
 162  
           protected int defaultDisplayOrder() {
 163  0
             return 1;
 164  
           }
 165  
 
 166  
           protected String defaultDescription() {
 167  0
             return "The Affiliate that generated this hit";
 168  
           }
 169  
 
 170  
           public Object getRaw_unsafe(Persistent g)
 171  
               throws AccessPoemException {
 172  0
             return ((AffiliateTransaction)g).getAffiliate_unsafe();
 173  
           }
 174  
 
 175  
           public void setRaw_unsafe(Persistent g, Object raw)
 176  
               throws AccessPoemException {
 177  0
             ((AffiliateTransaction)g).setAffiliate_unsafe((Integer)raw);
 178  0
           }
 179  
 
 180  
           public Object getRaw(Persistent g)
 181  
               throws AccessPoemException {
 182  0
             return ((AffiliateTransaction)g).getAffiliateTroid();
 183  
           }
 184  
 
 185  0
           public void setRaw(Persistent g, Object raw)
 186  
               throws AccessPoemException {
 187  0
             ((AffiliateTransaction)g).setAffiliateTroid((Integer)raw);
 188  0
           }
 189  
         });
 190  
 
 191  0
     defineColumn(col_hit =
 192  
         new Column(this, "hit",
 193  
                    new TimestampPoemType(false),
 194  
                    DefinitionSource.dsd) { 
 195  
           public Object getCooked(Persistent g)
 196  
               throws AccessPoemException, PoemException {
 197  0
             return ((AffiliateTransaction)g).getHit();
 198  
           }
 199  
 
 200  
           public void setCooked(Persistent g, Object cooked)
 201  
               throws AccessPoemException, ValidationPoemException {
 202  0
             ((AffiliateTransaction)g).setHit((Timestamp)cooked);
 203  0
           }
 204  
 
 205  
           public Field asField(Persistent g) {
 206  0
             return ((AffiliateTransaction)g).getHitField();
 207  
           }
 208  
 
 209  
           protected DisplayLevel defaultDisplayLevel() {
 210  0
             return DisplayLevel.primary;
 211  
           }
 212  
 
 213  
           protected String defaultDisplayName() {
 214  0
             return "Date of hit";
 215  
           }
 216  
 
 217  
           protected int defaultDisplayOrder() {
 218  0
             return 2;
 219  
           }
 220  
 
 221  
           protected String defaultDescription() {
 222  0
             return "The date when this hit came in";
 223  
           }
 224  
 
 225  
           public Object getRaw_unsafe(Persistent g)
 226  
               throws AccessPoemException {
 227  0
             return ((AffiliateTransaction)g).getHit_unsafe();
 228  
           }
 229  
 
 230  
           public void setRaw_unsafe(Persistent g, Object raw)
 231  
               throws AccessPoemException {
 232  0
             ((AffiliateTransaction)g).setHit_unsafe((Timestamp)raw);
 233  0
           }
 234  
 
 235  
           public Object getRaw(Persistent g)
 236  
               throws AccessPoemException {
 237  0
             return ((AffiliateTransaction)g).getHit();
 238  
           }
 239  
 
 240  0
           public void setRaw(Persistent g, Object raw)
 241  
               throws AccessPoemException {
 242  0
             ((AffiliateTransaction)g).setHit((Timestamp)raw);
 243  0
           }
 244  
         });
 245  
 
 246  0
     defineColumn(col_referrerURL =
 247  
         new Column(this, "referrerURL",
 248  
                    new StringPoemType(true, -1),
 249  
                    DefinitionSource.dsd) { 
 250  
           public Object getCooked(Persistent g)
 251  
               throws AccessPoemException, PoemException {
 252  0
             return ((AffiliateTransaction)g).getReferrerURL();
 253  
           }
 254  
 
 255  
           public void setCooked(Persistent g, Object cooked)
 256  
               throws AccessPoemException, ValidationPoemException {
 257  0
             ((AffiliateTransaction)g).setReferrerURL((String)cooked);
 258  0
           }
 259  
 
 260  
           public Field asField(Persistent g) {
 261  0
             return ((AffiliateTransaction)g).getReferrerURLField();
 262  
           }
 263  
 
 264  
           protected Searchability defaultSearchability() {
 265  0
             return Searchability.yes;
 266  
           }
 267  
 
 268  
           protected String defaultDisplayName() {
 269  0
             return "URL";
 270  
           }
 271  
 
 272  
           protected int defaultDisplayOrder() {
 273  0
             return 3;
 274  
           }
 275  
 
 276  
           protected String defaultDescription() {
 277  0
             return "The Referring URL";
 278  
           }
 279  
 
 280  
           protected int defaultWidth() {
 281  0
             return 40;
 282  
           }
 283  
 
 284  
           public Object getRaw_unsafe(Persistent g)
 285  
               throws AccessPoemException {
 286  0
             return ((AffiliateTransaction)g).getReferrerURL_unsafe();
 287  
           }
 288  
 
 289  
           public void setRaw_unsafe(Persistent g, Object raw)
 290  
               throws AccessPoemException {
 291  0
             ((AffiliateTransaction)g).setReferrerURL_unsafe((String)raw);
 292  0
           }
 293  
 
 294  
           public Object getRaw(Persistent g)
 295  
               throws AccessPoemException {
 296  0
             return ((AffiliateTransaction)g).getReferrerURL();
 297  
           }
 298  
 
 299  0
           public void setRaw(Persistent g, Object raw)
 300  
               throws AccessPoemException {
 301  0
             ((AffiliateTransaction)g).setReferrerURL((String)raw);
 302  0
           }
 303  
         });
 304  
 
 305  0
     defineColumn(col_landingPage =
 306  
         new Column(this, "landingPage",
 307  
                    new StringPoemType(false, -1),
 308  
                    DefinitionSource.dsd) { 
 309  
           public Object getCooked(Persistent g)
 310  
               throws AccessPoemException, PoemException {
 311  0
             return ((AffiliateTransaction)g).getLandingPage();
 312  
           }
 313  
 
 314  
           public void setCooked(Persistent g, Object cooked)
 315  
               throws AccessPoemException, ValidationPoemException {
 316  0
             ((AffiliateTransaction)g).setLandingPage((String)cooked);
 317  0
           }
 318  
 
 319  
           public Field asField(Persistent g) {
 320  0
             return ((AffiliateTransaction)g).getLandingPageField();
 321  
           }
 322  
 
 323  
           protected Searchability defaultSearchability() {
 324  0
             return Searchability.yes;
 325  
           }
 326  
 
 327  
           protected String defaultDisplayName() {
 328  0
             return "URL";
 329  
           }
 330  
 
 331  
           protected int defaultDisplayOrder() {
 332  0
             return 4;
 333  
           }
 334  
 
 335  
           protected String defaultDescription() {
 336  0
             return "The Landing Page";
 337  
           }
 338  
 
 339  
           protected int defaultWidth() {
 340  0
             return 40;
 341  
           }
 342  
 
 343  
           public Object getRaw_unsafe(Persistent g)
 344  
               throws AccessPoemException {
 345  0
             return ((AffiliateTransaction)g).getLandingPage_unsafe();
 346  
           }
 347  
 
 348  
           public void setRaw_unsafe(Persistent g, Object raw)
 349  
               throws AccessPoemException {
 350  0
             ((AffiliateTransaction)g).setLandingPage_unsafe((String)raw);
 351  0
           }
 352  
 
 353  
           public Object getRaw(Persistent g)
 354  
               throws AccessPoemException {
 355  0
             return ((AffiliateTransaction)g).getLandingPage();
 356  
           }
 357  
 
 358  0
           public void setRaw(Persistent g, Object raw)
 359  
               throws AccessPoemException {
 360  0
             ((AffiliateTransaction)g).setLandingPage((String)raw);
 361  0
           }
 362  
         });
 363  
 
 364  0
     defineColumn(col_userIpAddress =
 365  
         new Column(this, "userIpAddress",
 366  
                    new StringPoemType(false, -1),
 367  
                    DefinitionSource.dsd) { 
 368  
           public Object getCooked(Persistent g)
 369  
               throws AccessPoemException, PoemException {
 370  0
             return ((AffiliateTransaction)g).getUserIpAddress();
 371  
           }
 372  
 
 373  
           public void setCooked(Persistent g, Object cooked)
 374  
               throws AccessPoemException, ValidationPoemException {
 375  0
             ((AffiliateTransaction)g).setUserIpAddress((String)cooked);
 376  0
           }
 377  
 
 378  
           public Field asField(Persistent g) {
 379  0
             return ((AffiliateTransaction)g).getUserIpAddressField();
 380  
           }
 381  
 
 382  
           protected Searchability defaultSearchability() {
 383  0
             return Searchability.yes;
 384  
           }
 385  
 
 386  
           protected String defaultDisplayName() {
 387  0
             return "IP Address";
 388  
           }
 389  
 
 390  
           protected int defaultDisplayOrder() {
 391  0
             return 5;
 392  
           }
 393  
 
 394  
           protected String defaultDescription() {
 395  0
             return "The User's IP Address";
 396  
           }
 397  
 
 398  
           protected int defaultWidth() {
 399  0
             return 40;
 400  
           }
 401  
 
 402  
           public Object getRaw_unsafe(Persistent g)
 403  
               throws AccessPoemException {
 404  0
             return ((AffiliateTransaction)g).getUserIpAddress_unsafe();
 405  
           }
 406  
 
 407  
           public void setRaw_unsafe(Persistent g, Object raw)
 408  
               throws AccessPoemException {
 409  0
             ((AffiliateTransaction)g).setUserIpAddress_unsafe((String)raw);
 410  0
           }
 411  
 
 412  
           public Object getRaw(Persistent g)
 413  
               throws AccessPoemException {
 414  0
             return ((AffiliateTransaction)g).getUserIpAddress();
 415  
           }
 416  
 
 417  0
           public void setRaw(Persistent g, Object raw)
 418  
               throws AccessPoemException {
 419  0
             ((AffiliateTransaction)g).setUserIpAddress((String)raw);
 420  0
           }
 421  
         });
 422  0
   }
 423  
 
 424  
 
 425  
  /**
 426  
   * Retrieves the <code>Id</code> <code>Column</code> for this 
 427  
   * <code>AffiliateTransaction</code> <code>Table</code>.
 428  
   * 
 429  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 430  
   * @return the id <code>Column</code>
 431  
   */
 432  
   public final Column getIdColumn() {
 433  0
     return col_id;
 434  
   }
 435  
 
 436  
 
 437  
  /**
 438  
   * Retrieves the <code>Affiliate</code> <code>Column</code> for this 
 439  
   * <code>AffiliateTransaction</code> <code>Table</code>.
 440  
   * 
 441  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 442  
   * @return the affiliate <code>Column</code>
 443  
   */
 444  
   public final Column getAffiliateColumn() {
 445  0
     return col_affiliate;
 446  
   }
 447  
 
 448  
 
 449  
  /**
 450  
   * Retrieves the <code>Hit</code> <code>Column</code> for this 
 451  
   * <code>AffiliateTransaction</code> <code>Table</code>.
 452  
   * 
 453  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 454  
   * @return the hit <code>Column</code>
 455  
   */
 456  
   public final Column getHitColumn() {
 457  0
     return col_hit;
 458  
   }
 459  
 
 460  
 
 461  
  /**
 462  
   * Retrieves the <code>ReferrerURL</code> <code>Column</code> for this 
 463  
   * <code>AffiliateTransaction</code> <code>Table</code>.
 464  
   * 
 465  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 466  
   * @return the referrerURL <code>Column</code>
 467  
   */
 468  
   public final Column getReferrerURLColumn() {
 469  0
     return col_referrerURL;
 470  
   }
 471  
 
 472  
 
 473  
  /**
 474  
   * Retrieves the <code>LandingPage</code> <code>Column</code> for this 
 475  
   * <code>AffiliateTransaction</code> <code>Table</code>.
 476  
   * 
 477  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 478  
   * @return the landingPage <code>Column</code>
 479  
   */
 480  
   public final Column getLandingPageColumn() {
 481  0
     return col_landingPage;
 482  
   }
 483  
 
 484  
 
 485  
  /**
 486  
   * Retrieves the <code>UserIpAddress</code> <code>Column</code> for this 
 487  
   * <code>AffiliateTransaction</code> <code>Table</code>.
 488  
   * 
 489  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 490  
   * @return the userIpAddress <code>Column</code>
 491  
   */
 492  
   public final Column getUserIpAddressColumn() {
 493  0
     return col_userIpAddress;
 494  
   }
 495  
 
 496  
 
 497  
  /**
 498  
   * Retrieve the <code>AffiliateTransaction</code> as a <code>AffiliateTransaction</code>.
 499  
   *
 500  
   * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 501  
   * @param troid a Table Row Oject ID
 502  
   * @return the <code>Persistent</code> identified by the <code>troid</code>
 503  
   */
 504  
   public AffiliateTransaction getAffiliateTransactionObject(Integer troid) {
 505  0
     return (AffiliateTransaction)getObject(troid);
 506  
   }
 507  
 
 508  
 
 509  
  /**
 510  
   * Retrieve the <code>AffiliateTransaction</code> 
 511  
   * as a <code>AffiliateTransaction</code>.
 512  
   *
 513  
   * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 514  
   * @param troid a Table Row Object ID
 515  
   * @return the <code>Persistent</code> identified   */
 516  
   public AffiliateTransaction getAffiliateTransactionObject(int troid) {
 517  0
     return (AffiliateTransaction)getObject(troid);
 518  
   }
 519  
 
 520  
   protected JdbcPersistent _newPersistent() {
 521  0
     return new AffiliateTransaction();
 522  
   }
 523  
   protected String defaultDisplayName() {
 524  0
     return "AffiliateTransaction";
 525  
   }
 526  
 
 527  
   protected String defaultDescription() {
 528  0
     return "A 'hit' for this affiliate";
 529  
   }
 530  
 
 531  
   protected boolean defaultRememberAllTroids() {
 532  0
     return true;
 533  
   }
 534  
 
 535  
   protected String defaultCategory() {
 536  0
     return "Data";
 537  
   }
 538  
 
 539  
   protected int defaultDisplayOrder() {
 540  0
     return 80;
 541  
   }
 542  
 }
 543