Coverage Report - org.paneris.jammyjoes.model.generated.AffiliateTableBase
 
Classes in this File Line Coverage Branch Coverage Complexity
AffiliateTableBase
0%
0/31
N/A
1
AffiliateTableBase$1
0%
0/16
N/A
1
AffiliateTableBase$2
0%
0/18
N/A
1
AffiliateTableBase$3
0%
0/16
N/A
1
AffiliateTableBase$4
0%
0/16
N/A
1
AffiliateTableBase$5
0%
0/16
N/A
1
AffiliateTableBase$6
0%
0/15
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.DoublePoemType;
 12  
 import org.melati.poem.Field;
 13  
 import org.melati.poem.IntegerPoemType;
 14  
 import org.melati.poem.JdbcPersistent;
 15  
 import org.melati.poem.Persistent;
 16  
 import org.melati.poem.PoemException;
 17  
 import org.melati.poem.Searchability;
 18  
 import org.melati.poem.StringPoemType;
 19  
 import org.melati.poem.TimestampPoemType;
 20  
 import org.melati.poem.TroidPoemType;
 21  
 import org.melati.poem.ValidationPoemException;
 22  
 import org.paneris.jammyjoes.model.Affiliate;
 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>Affiliate</code>.
 30  
  *
 31  
  * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 32  
  */
 33  
 
 34  
 public class AffiliateTableBase extends JammyjoesTable {
 35  
 
 36  0
   private Column col_id = null;
 37  0
   private Column col_company = null;
 38  0
   private Column col_payee = null;
 39  0
   private Column col_percentage = null;
 40  0
   private Column col_cookiedays = null;
 41  0
   private Column col_registration = 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 AffiliateTableBase(
 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 ((Affiliate)g).getId();
 79  
           }
 80  
 
 81  
           public void setCooked(Persistent g, Object cooked)
 82  
               throws AccessPoemException, ValidationPoemException {
 83  0
             ((Affiliate)g).setId((Integer)cooked);
 84  0
           }
 85  
 
 86  
           public Field asField(Persistent g) {
 87  0
             return ((Affiliate)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 int defaultDisplayOrder() {
 107  0
             return 0;
 108  
           }
 109  
 
 110  
           public Object getRaw_unsafe(Persistent g)
 111  
               throws AccessPoemException {
 112  0
             return ((Affiliate)g).getId_unsafe();
 113  
           }
 114  
 
 115  
           public void setRaw_unsafe(Persistent g, Object raw)
 116  
               throws AccessPoemException {
 117  0
             ((Affiliate)g).setId_unsafe((Integer)raw);
 118  0
           }
 119  
 
 120  
           public Object getRaw(Persistent g)
 121  
               throws AccessPoemException {
 122  0
             return ((Affiliate)g).getId();
 123  
           }
 124  
 
 125  0
           public void setRaw(Persistent g, Object raw)
 126  
               throws AccessPoemException {
 127  0
             ((Affiliate)g).setId((Integer)raw);
 128  0
           }
 129  
         });
 130  
 
 131  0
     defineColumn(col_company =
 132  
         new Column(this, "company",
 133  
                    new StringPoemType(false, -1),
 134  
                    DefinitionSource.dsd) { 
 135  
           public Object getCooked(Persistent g)
 136  
               throws AccessPoemException, PoemException {
 137  0
             return ((Affiliate)g).getCompany();
 138  
           }
 139  
 
 140  
           public void setCooked(Persistent g, Object cooked)
 141  
               throws AccessPoemException, ValidationPoemException {
 142  0
             ((Affiliate)g).setCompany((String)cooked);
 143  0
           }
 144  
 
 145  
           public Field asField(Persistent g) {
 146  0
             return ((Affiliate)g).getCompanyField();
 147  
           }
 148  
 
 149  
           protected DisplayLevel defaultDisplayLevel() {
 150  0
             return DisplayLevel.primary;
 151  
           }
 152  
 
 153  
           protected Searchability defaultSearchability() {
 154  0
             return Searchability.yes;
 155  
           }
 156  
 
 157  
           protected String defaultDisplayName() {
 158  0
             return "Company";
 159  
           }
 160  
 
 161  
           protected int defaultDisplayOrder() {
 162  0
             return 1;
 163  
           }
 164  
 
 165  
           protected String defaultDescription() {
 166  0
             return "The Affiliate's Company Name";
 167  
           }
 168  
 
 169  
           protected boolean defaultUnique() {
 170  0
             return true;
 171  
           }
 172  
 
 173  
           protected int defaultWidth() {
 174  0
             return 40;
 175  
           }
 176  
 
 177  
           public Object getRaw_unsafe(Persistent g)
 178  
               throws AccessPoemException {
 179  0
             return ((Affiliate)g).getCompany_unsafe();
 180  
           }
 181  
 
 182  
           public void setRaw_unsafe(Persistent g, Object raw)
 183  
               throws AccessPoemException {
 184  0
             ((Affiliate)g).setCompany_unsafe((String)raw);
 185  0
           }
 186  
 
 187  
           public Object getRaw(Persistent g)
 188  
               throws AccessPoemException {
 189  0
             return ((Affiliate)g).getCompany();
 190  
           }
 191  
 
 192  0
           public void setRaw(Persistent g, Object raw)
 193  
               throws AccessPoemException {
 194  0
             ((Affiliate)g).setCompany((String)raw);
 195  0
           }
 196  
         });
 197  
 
 198  0
     defineColumn(col_payee =
 199  
         new Column(this, "payee",
 200  
                    new StringPoemType(false, -1),
 201  
                    DefinitionSource.dsd) { 
 202  
           public Object getCooked(Persistent g)
 203  
               throws AccessPoemException, PoemException {
 204  0
             return ((Affiliate)g).getPayee();
 205  
           }
 206  
 
 207  
           public void setCooked(Persistent g, Object cooked)
 208  
               throws AccessPoemException, ValidationPoemException {
 209  0
             ((Affiliate)g).setPayee((String)cooked);
 210  0
           }
 211  
 
 212  
           public Field asField(Persistent g) {
 213  0
             return ((Affiliate)g).getPayeeField();
 214  
           }
 215  
 
 216  
           protected Searchability defaultSearchability() {
 217  0
             return Searchability.yes;
 218  
           }
 219  
 
 220  
           protected String defaultDisplayName() {
 221  0
             return "Payee";
 222  
           }
 223  
 
 224  
           protected int defaultDisplayOrder() {
 225  0
             return 2;
 226  
           }
 227  
 
 228  
           protected String defaultDescription() {
 229  0
             return "The Payee (for cheques)";
 230  
           }
 231  
 
 232  
           protected int defaultWidth() {
 233  0
             return 40;
 234  
           }
 235  
 
 236  
           public Object getRaw_unsafe(Persistent g)
 237  
               throws AccessPoemException {
 238  0
             return ((Affiliate)g).getPayee_unsafe();
 239  
           }
 240  
 
 241  
           public void setRaw_unsafe(Persistent g, Object raw)
 242  
               throws AccessPoemException {
 243  0
             ((Affiliate)g).setPayee_unsafe((String)raw);
 244  0
           }
 245  
 
 246  
           public Object getRaw(Persistent g)
 247  
               throws AccessPoemException {
 248  0
             return ((Affiliate)g).getPayee();
 249  
           }
 250  
 
 251  0
           public void setRaw(Persistent g, Object raw)
 252  
               throws AccessPoemException {
 253  0
             ((Affiliate)g).setPayee((String)raw);
 254  0
           }
 255  
         });
 256  
 
 257  0
     defineColumn(col_percentage =
 258  
         new Column(this, "percentage",
 259  
                    new DoublePoemType(false),
 260  
                    DefinitionSource.dsd) { 
 261  
           public Object getCooked(Persistent g)
 262  
               throws AccessPoemException, PoemException {
 263  0
             return ((Affiliate)g).getPercentage();
 264  
           }
 265  
 
 266  
           public void setCooked(Persistent g, Object cooked)
 267  
               throws AccessPoemException, ValidationPoemException {
 268  0
             ((Affiliate)g).setPercentage((Double)cooked);
 269  0
           }
 270  
 
 271  
           public Field asField(Persistent g) {
 272  0
             return ((Affiliate)g).getPercentageField();
 273  
           }
 274  
 
 275  
           protected DisplayLevel defaultDisplayLevel() {
 276  0
             return DisplayLevel.record;
 277  
           }
 278  
 
 279  
           protected Searchability defaultSearchability() {
 280  0
             return Searchability.no;
 281  
           }
 282  
 
 283  
           protected String defaultDisplayName() {
 284  0
             return "Percentage";
 285  
           }
 286  
 
 287  
           protected int defaultDisplayOrder() {
 288  0
             return 3;
 289  
           }
 290  
 
 291  
           protected String defaultDescription() {
 292  0
             return "The percentage of sales for this Affiliate";
 293  
           }
 294  
 
 295  
           public Object getRaw_unsafe(Persistent g)
 296  
               throws AccessPoemException {
 297  0
             return ((Affiliate)g).getPercentage_unsafe();
 298  
           }
 299  
 
 300  
           public void setRaw_unsafe(Persistent g, Object raw)
 301  
               throws AccessPoemException {
 302  0
             ((Affiliate)g).setPercentage_unsafe((Double)raw);
 303  0
           }
 304  
 
 305  
           public Object getRaw(Persistent g)
 306  
               throws AccessPoemException {
 307  0
             return ((Affiliate)g).getPercentage();
 308  
           }
 309  
 
 310  0
           public void setRaw(Persistent g, Object raw)
 311  
               throws AccessPoemException {
 312  0
             ((Affiliate)g).setPercentage((Double)raw);
 313  0
           }
 314  
         });
 315  
 
 316  0
     defineColumn(col_cookiedays =
 317  
         new Column(this, "cookiedays",
 318  
                    new IntegerPoemType(false),
 319  
                    DefinitionSource.dsd) { 
 320  
           public Object getCooked(Persistent g)
 321  
               throws AccessPoemException, PoemException {
 322  0
             return ((Affiliate)g).getCookiedays();
 323  
           }
 324  
 
 325  
           public void setCooked(Persistent g, Object cooked)
 326  
               throws AccessPoemException, ValidationPoemException {
 327  0
             ((Affiliate)g).setCookiedays((Integer)cooked);
 328  0
           }
 329  
 
 330  
           public Field asField(Persistent g) {
 331  0
             return ((Affiliate)g).getCookiedaysField();
 332  
           }
 333  
 
 334  
           protected DisplayLevel defaultDisplayLevel() {
 335  0
             return DisplayLevel.record;
 336  
           }
 337  
 
 338  
           protected Searchability defaultSearchability() {
 339  0
             return Searchability.no;
 340  
           }
 341  
 
 342  
           protected String defaultDisplayName() {
 343  0
             return "Cookie Days";
 344  
           }
 345  
 
 346  
           protected int defaultDisplayOrder() {
 347  0
             return 4;
 348  
           }
 349  
 
 350  
           protected String defaultDescription() {
 351  0
             return "The number of days to set a cookie for for this Affiliate";
 352  
           }
 353  
 
 354  
           public Object getRaw_unsafe(Persistent g)
 355  
               throws AccessPoemException {
 356  0
             return ((Affiliate)g).getCookiedays_unsafe();
 357  
           }
 358  
 
 359  
           public void setRaw_unsafe(Persistent g, Object raw)
 360  
               throws AccessPoemException {
 361  0
             ((Affiliate)g).setCookiedays_unsafe((Integer)raw);
 362  0
           }
 363  
 
 364  
           public Object getRaw(Persistent g)
 365  
               throws AccessPoemException {
 366  0
             return ((Affiliate)g).getCookiedays();
 367  
           }
 368  
 
 369  0
           public void setRaw(Persistent g, Object raw)
 370  
               throws AccessPoemException {
 371  0
             ((Affiliate)g).setCookiedays((Integer)raw);
 372  0
           }
 373  
         });
 374  
 
 375  0
     defineColumn(col_registration =
 376  
         new Column(this, "registration",
 377  
                    new TimestampPoemType(false),
 378  
                    DefinitionSource.dsd) { 
 379  
           public Object getCooked(Persistent g)
 380  
               throws AccessPoemException, PoemException {
 381  0
             return ((Affiliate)g).getRegistration();
 382  
           }
 383  
 
 384  
           public void setCooked(Persistent g, Object cooked)
 385  
               throws AccessPoemException, ValidationPoemException {
 386  0
             ((Affiliate)g).setRegistration((Timestamp)cooked);
 387  0
           }
 388  
 
 389  
           public Field asField(Persistent g) {
 390  0
             return ((Affiliate)g).getRegistrationField();
 391  
           }
 392  
 
 393  
           protected DisplayLevel defaultDisplayLevel() {
 394  0
             return DisplayLevel.record;
 395  
           }
 396  
 
 397  
           protected String defaultDisplayName() {
 398  0
             return "Date of Registration";
 399  
           }
 400  
 
 401  
           protected int defaultDisplayOrder() {
 402  0
             return 5;
 403  
           }
 404  
 
 405  
           protected String defaultDescription() {
 406  0
             return "The date when this Affiliate Registered";
 407  
           }
 408  
 
 409  
           public Object getRaw_unsafe(Persistent g)
 410  
               throws AccessPoemException {
 411  0
             return ((Affiliate)g).getRegistration_unsafe();
 412  
           }
 413  
 
 414  
           public void setRaw_unsafe(Persistent g, Object raw)
 415  
               throws AccessPoemException {
 416  0
             ((Affiliate)g).setRegistration_unsafe((Timestamp)raw);
 417  0
           }
 418  
 
 419  
           public Object getRaw(Persistent g)
 420  
               throws AccessPoemException {
 421  0
             return ((Affiliate)g).getRegistration();
 422  
           }
 423  
 
 424  0
           public void setRaw(Persistent g, Object raw)
 425  
               throws AccessPoemException {
 426  0
             ((Affiliate)g).setRegistration((Timestamp)raw);
 427  0
           }
 428  
         });
 429  0
   }
 430  
 
 431  
 
 432  
  /**
 433  
   * Retrieves the <code>Id</code> <code>Column</code> for this 
 434  
   * <code>Affiliate</code> <code>Table</code>.
 435  
   * 
 436  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 437  
   * @return the id <code>Column</code>
 438  
   */
 439  
   public final Column getIdColumn() {
 440  0
     return col_id;
 441  
   }
 442  
 
 443  
 
 444  
  /**
 445  
   * Retrieves the <code>Company</code> <code>Column</code> for this 
 446  
   * <code>Affiliate</code> <code>Table</code>.
 447  
   * 
 448  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 449  
   * @return the company <code>Column</code>
 450  
   */
 451  
   public final Column getCompanyColumn() {
 452  0
     return col_company;
 453  
   }
 454  
 
 455  
 
 456  
  /**
 457  
   * Retrieves the <code>Payee</code> <code>Column</code> for this 
 458  
   * <code>Affiliate</code> <code>Table</code>.
 459  
   * 
 460  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 461  
   * @return the payee <code>Column</code>
 462  
   */
 463  
   public final Column getPayeeColumn() {
 464  0
     return col_payee;
 465  
   }
 466  
 
 467  
 
 468  
  /**
 469  
   * Retrieves the <code>Percentage</code> <code>Column</code> for this 
 470  
   * <code>Affiliate</code> <code>Table</code>.
 471  
   * 
 472  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 473  
   * @return the percentage <code>Column</code>
 474  
   */
 475  
   public final Column getPercentageColumn() {
 476  0
     return col_percentage;
 477  
   }
 478  
 
 479  
 
 480  
  /**
 481  
   * Retrieves the <code>Cookiedays</code> <code>Column</code> for this 
 482  
   * <code>Affiliate</code> <code>Table</code>.
 483  
   * 
 484  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 485  
   * @return the cookiedays <code>Column</code>
 486  
   */
 487  
   public final Column getCookiedaysColumn() {
 488  0
     return col_cookiedays;
 489  
   }
 490  
 
 491  
 
 492  
  /**
 493  
   * Retrieves the <code>Registration</code> <code>Column</code> for this 
 494  
   * <code>Affiliate</code> <code>Table</code>.
 495  
   * 
 496  
   * @generator org.melati.poem.prepro.FieldDef#generateColAccessor 
 497  
   * @return the registration <code>Column</code>
 498  
   */
 499  
   public final Column getRegistrationColumn() {
 500  0
     return col_registration;
 501  
   }
 502  
 
 503  
 
 504  
  /**
 505  
   * Retrieve the <code>Affiliate</code> as a <code>Affiliate</code>.
 506  
   *
 507  
   * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 508  
   * @param troid a Table Row Oject ID
 509  
   * @return the <code>Persistent</code> identified by the <code>troid</code>
 510  
   */
 511  
   public Affiliate getAffiliateObject(Integer troid) {
 512  0
     return (Affiliate)getObject(troid);
 513  
   }
 514  
 
 515  
 
 516  
  /**
 517  
   * Retrieve the <code>Affiliate</code> 
 518  
   * as a <code>Affiliate</code>.
 519  
   *
 520  
   * @generator org.melati.poem.prepro.TableDef#generateTableBaseJava 
 521  
   * @param troid a Table Row Object ID
 522  
   * @return the <code>Persistent</code> identified   */
 523  
   public Affiliate getAffiliateObject(int troid) {
 524  0
     return (Affiliate)getObject(troid);
 525  
   }
 526  
 
 527  
   protected JdbcPersistent _newPersistent() {
 528  0
     return new Affiliate();
 529  
   }
 530  
   protected String defaultDisplayName() {
 531  0
     return "Affiliate";
 532  
   }
 533  
 
 534  
   protected String defaultDescription() {
 535  0
     return "A JammyJoes Affiliate";
 536  
   }
 537  
 
 538  
   protected boolean defaultRememberAllTroids() {
 539  0
     return true;
 540  
   }
 541  
 
 542  
   protected String defaultCategory() {
 543  0
     return "Data";
 544  
   }
 545  
 
 546  
   protected int defaultDisplayOrder() {
 547  0
     return 80;
 548  
   }
 549  
 }
 550