1
2
3 package org.paneris.jammyjoes.model.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.Field;
10 import org.melati.poem.JdbcPersistent;
11 import org.melati.poem.NoSuchRowPoemException;
12 import org.melati.poem.ValidationPoemException;
13 import org.paneris.jammyjoes.model.Affiliate;
14 import org.paneris.jammyjoes.model.AffiliateTransactionTable;
15 import org.paneris.jammyjoes.model.JammyjoesDatabaseTables;
16
17
18 /**
19 * Melati POEM generated abstract base class for a <code>Persistent</code>
20 * <code>AffiliateTransaction</code> Object.
21 *
22 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
23 */
24 public abstract class AffiliateTransactionBase extends JdbcPersistent {
25
26
27 /**
28 * Retrieves the Database object.
29 *
30 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
31 * @return the database
32 */
33 public JammyjoesDatabaseTables getJammyjoesDatabaseTables() {
34 return (JammyjoesDatabaseTables)getDatabase();
35 }
36
37
38 /**
39 * Retrieves the <code>AffiliateTransactionTable</code> table
40 * which this <code>Persistent</code> is from.
41 *
42 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
43 * @return the AffiliateTransactionTable
44 */
45 public AffiliateTransactionTable getAffiliateTransactionTable() {
46 return (AffiliateTransactionTable)getTable();
47 }
48
49 private AffiliateTransactionTable _getAffiliateTransactionTable() {
50 return (AffiliateTransactionTable)getTable();
51 }
52
53
54 /**
55 * id
56 */
57 protected Integer id;
58 /**
59 * affiliate - The Affiliate that generated this hit
60 */
61 protected Integer affiliate;
62 /**
63 * Date of hit - The date when this hit came in
64 */
65 protected Timestamp hit;
66 /**
67 * URL - The Referring URL
68 */
69 protected String referrerURL;
70 /**
71 * URL - The Landing Page
72 */
73 protected String landingPage;
74 /**
75 * IP Address - The User's IP Address
76 */
77 protected String userIpAddress;
78
79
80 /**
81 * Retrieves the <code>Id</code> value, without locking,
82 * for this <code>AffiliateTransaction</code> <code>Persistent</code>.
83 *
84 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
85 * @return the Integer id
86 */
87 public Integer getId_unsafe() {
88 return id;
89 }
90
91
92 /**
93 * Sets the <code>Id</code> value directly, without checking,
94 * for this AffiliateTransaction <code>Persistent</code>.
95 *
96 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
97 * @param cooked the pre-validated value to set
98 */
99 public void setId_unsafe(Integer cooked) {
100 id = cooked;
101 }
102
103 /**
104 * Retrieves the Id value, with locking, for this
105 * <code>AffiliateTransaction</code> <code>Persistent</code>.
106 *
107 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
108 * @throws AccessPoemException
109 * if the current <code>AccessToken</code>
110 * does not confer write access rights
111 * @return the value of the field <code>Id</code> for this
112 * <code>AffiliateTransaction</code> <code>Persistent</code>
113 */
114
115 public Integer getId()
116 throws AccessPoemException {
117 readLock();
118 return getId_unsafe();
119 }
120
121
122 /**
123 * Sets the <code>Id</code> value, with checking, for this
124 * <code>AffiliateTransaction</code> <code>Persistent</code>.
125 *
126 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
127 * @param cooked a validated <code>int</code>
128 * @throws AccessPoemException
129 * if the current <code>AccessToken</code>
130 * does not confer write access rights
131 * @throws ValidationPoemException
132 * if the value is not valid
133 */
134 public void setId(Integer cooked)
135 throws AccessPoemException, ValidationPoemException {
136 _getAffiliateTransactionTable().getIdColumn().
137 getType().assertValidCooked(cooked);
138 writeLock();
139 setId_unsafe(cooked);
140 }
141
142 /**
143 * Sets the <code>Id</code> value, with checking, for this
144 * <code>AffiliateTransaction</code> <code>Persistent</code>.
145 *
146 * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods
147 * @param cooked a validated <code>int</code>
148 * @throws AccessPoemException
149 * if the current <code>AccessToken</code>
150 * does not confer write access rights
151 * @throws ValidationPoemException
152 * if the value is not valid
153 */
154
155 public final void setId(int cooked)
156 throws AccessPoemException, ValidationPoemException {
157 setId(new Integer(cooked));
158 }
159
160
161 /**
162 * Retrieves the <code>Id</code> value as a <code>Field</code>
163 * from this <code>AffiliateTransaction</code> <code>Persistent</code>.
164 *
165 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
166 * @throws AccessPoemException
167 * if the current <code>AccessToken</code>
168 * does not confer write access rights
169 * @return the Integer id
170 */
171 public Field getIdField() throws AccessPoemException {
172 Column c = _getAffiliateTransactionTable().getIdColumn();
173 return new Field(c.getRaw(this), c);
174 }
175
176
177 /**
178 * Retrieves the <code>Affiliate</code> value, without locking,
179 * for this <code>AffiliateTransaction</code> <code>Persistent</code>.
180 *
181 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
182 * @return the Integer affiliate
183 */
184 public Integer getAffiliate_unsafe() {
185 return affiliate;
186 }
187
188
189 /**
190 * Sets the <code>Affiliate</code> value directly, without checking,
191 * for this AffiliateTransaction <code>Persistent</code>.
192 *
193 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
194 * @param cooked the pre-validated value to set
195 */
196 public void setAffiliate_unsafe(Integer cooked) {
197 affiliate = cooked;
198 }
199
200 /**
201 * Retrieves the Table Row Object ID.
202 *
203 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
204 * @throws AccessPoemException
205 * if the current <code>AccessToken</code>
206 * does not confer read access rights
207 * @return the TROID as an <code>Integer</code>
208 */
209
210 public Integer getAffiliateTroid()
211 throws AccessPoemException {
212 readLock();
213 return getAffiliate_unsafe();
214 }
215
216
217 /**
218 * Sets the Table Row Object ID.
219 *
220 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
221 * @param raw a Table Row Object Id
222 * @throws AccessPoemException
223 * if the current <code>AccessToken</code>
224 * does not confer write access rights
225 */
226 public void setAffiliateTroid(Integer raw)
227 throws AccessPoemException {
228 setAffiliate(raw == null ? null :
229 getJammyjoesDatabaseTables().getAffiliateTable().getAffiliateObject(raw));
230 }
231
232
233 /**
234 * Retrieves the <code>Affiliate</code> object referred to.
235 *
236 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
237 * @throws AccessPoemException
238 * if the current <code>AccessToken</code>
239 * does not confer read access rights
240 * @throws NoSuchRowPoemException
241 * if the <code>Persistent</code> has yet to be allocated a TROID
242 * @return the <code>Affiliate</code> as a <code>Affiliate</code>
243 */
244 public Affiliate getAffiliate()
245 throws AccessPoemException, NoSuchRowPoemException {
246 Integer troid = getAffiliateTroid();
247 return troid == null ? null :
248 getJammyjoesDatabaseTables().getAffiliateTable().getAffiliateObject(troid);
249 }
250
251
252 /**
253 * Set the Affiliate.
254 *
255 * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
256 * @param cooked a validated <code>Affiliate</code>
257 * @throws AccessPoemException
258 * if the current <code>AccessToken</code>
259 * does not confer write access rights
260 */
261 public void setAffiliate(Affiliate cooked)
262 throws AccessPoemException {
263 _getAffiliateTransactionTable().
264 getAffiliateColumn().
265 getType().assertValidCooked(cooked);
266 writeLock();
267 if (cooked == null)
268 setAffiliate_unsafe(null);
269 else {
270 cooked.existenceLock();
271 setAffiliate_unsafe(cooked.troid());
272 }
273 }
274
275
276 /**
277 * Retrieves the <code>Affiliate</code> value as a <code>Field</code>
278 * from this <code>AffiliateTransaction</code> <code>Persistent</code>.
279 *
280 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
281 * @throws AccessPoemException
282 * if the current <code>AccessToken</code>
283 * does not confer write access rights
284 * @return the Integer affiliate
285 */
286 public Field getAffiliateField() throws AccessPoemException {
287 Column c = _getAffiliateTransactionTable().getAffiliateColumn();
288 return new Field(c.getRaw(this), c);
289 }
290
291
292 /**
293 * Retrieves the <code>Hit</code> value, without locking,
294 * for this <code>AffiliateTransaction</code> <code>Persistent</code>.
295 *
296 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
297 * @return the Timestamp hit
298 */
299 public Timestamp getHit_unsafe() {
300 return hit;
301 }
302
303
304 /**
305 * Sets the <code>Hit</code> value directly, without checking,
306 * for this AffiliateTransaction <code>Persistent</code>.
307 *
308 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
309 * @param cooked the pre-validated value to set
310 */
311 public void setHit_unsafe(Timestamp cooked) {
312 hit = cooked;
313 }
314
315 /**
316 * Retrieves the Hit value, with locking, for this
317 * <code>AffiliateTransaction</code> <code>Persistent</code>.
318 * Field description:
319 * The date when this hit came in
320 *
321 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
322 * @throws AccessPoemException
323 * if the current <code>AccessToken</code>
324 * does not confer write access rights
325 * @return the value of the field <code>Hit</code> for this
326 * <code>AffiliateTransaction</code> <code>Persistent</code>
327 */
328
329 public Timestamp getHit()
330 throws AccessPoemException {
331 readLock();
332 return getHit_unsafe();
333 }
334
335
336 /**
337 * Sets the <code>Hit</code> value, with checking, for this
338 * <code>AffiliateTransaction</code> <code>Persistent</code>.
339 * Field description:
340 * The date when this hit came in
341 *
342 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
343 * @param cooked a validated <code>int</code>
344 * @throws AccessPoemException
345 * if the current <code>AccessToken</code>
346 * does not confer write access rights
347 * @throws ValidationPoemException
348 * if the value is not valid
349 */
350 public void setHit(Timestamp cooked)
351 throws AccessPoemException, ValidationPoemException {
352 _getAffiliateTransactionTable().getHitColumn().
353 getType().assertValidCooked(cooked);
354 writeLock();
355 setHit_unsafe(cooked);
356 }
357
358
359 /**
360 * Retrieves the <code>Hit</code> value as a <code>Field</code>
361 * from this <code>AffiliateTransaction</code> <code>Persistent</code>.
362 *
363 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
364 * @throws AccessPoemException
365 * if the current <code>AccessToken</code>
366 * does not confer write access rights
367 * @return the Timestamp hit
368 */
369 public Field getHitField() throws AccessPoemException {
370 Column c = _getAffiliateTransactionTable().getHitColumn();
371 return new Field(c.getRaw(this), c);
372 }
373
374
375 /**
376 * Retrieves the <code>ReferrerURL</code> value, without locking,
377 * for this <code>AffiliateTransaction</code> <code>Persistent</code>.
378 *
379 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
380 * @return the String referrerURL
381 */
382 public String getReferrerURL_unsafe() {
383 return referrerURL;
384 }
385
386
387 /**
388 * Sets the <code>ReferrerURL</code> value directly, without checking,
389 * for this AffiliateTransaction <code>Persistent</code>.
390 *
391 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
392 * @param cooked the pre-validated value to set
393 */
394 public void setReferrerURL_unsafe(String cooked) {
395 referrerURL = cooked;
396 }
397
398 /**
399 * Retrieves the ReferrerURL value, with locking, for this
400 * <code>AffiliateTransaction</code> <code>Persistent</code>.
401 * Field description:
402 * The Referring URL
403 *
404 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
405 * @throws AccessPoemException
406 * if the current <code>AccessToken</code>
407 * does not confer write access rights
408 * @return the value of the field <code>ReferrerURL</code> for this
409 * <code>AffiliateTransaction</code> <code>Persistent</code>
410 */
411
412 public String getReferrerURL()
413 throws AccessPoemException {
414 readLock();
415 return getReferrerURL_unsafe();
416 }
417
418
419 /**
420 * Sets the <code>ReferrerURL</code> value, with checking, for this
421 * <code>AffiliateTransaction</code> <code>Persistent</code>.
422 * Field description:
423 * The Referring URL
424 *
425 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
426 * @param cooked a validated <code>int</code>
427 * @throws AccessPoemException
428 * if the current <code>AccessToken</code>
429 * does not confer write access rights
430 * @throws ValidationPoemException
431 * if the value is not valid
432 */
433 public void setReferrerURL(String cooked)
434 throws AccessPoemException, ValidationPoemException {
435 _getAffiliateTransactionTable().getReferrerURLColumn().
436 getType().assertValidCooked(cooked);
437 writeLock();
438 setReferrerURL_unsafe(cooked);
439 }
440
441
442 /**
443 * Retrieves the <code>ReferrerURL</code> value as a <code>Field</code>
444 * from this <code>AffiliateTransaction</code> <code>Persistent</code>.
445 *
446 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
447 * @throws AccessPoemException
448 * if the current <code>AccessToken</code>
449 * does not confer write access rights
450 * @return the String referrerURL
451 */
452 public Field getReferrerURLField() throws AccessPoemException {
453 Column c = _getAffiliateTransactionTable().getReferrerURLColumn();
454 return new Field(c.getRaw(this), c);
455 }
456
457
458 /**
459 * Retrieves the <code>LandingPage</code> value, without locking,
460 * for this <code>AffiliateTransaction</code> <code>Persistent</code>.
461 *
462 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
463 * @return the String landingPage
464 */
465 public String getLandingPage_unsafe() {
466 return landingPage;
467 }
468
469
470 /**
471 * Sets the <code>LandingPage</code> value directly, without checking,
472 * for this AffiliateTransaction <code>Persistent</code>.
473 *
474 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
475 * @param cooked the pre-validated value to set
476 */
477 public void setLandingPage_unsafe(String cooked) {
478 landingPage = cooked;
479 }
480
481 /**
482 * Retrieves the LandingPage value, with locking, for this
483 * <code>AffiliateTransaction</code> <code>Persistent</code>.
484 * Field description:
485 * The Landing Page
486 *
487 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
488 * @throws AccessPoemException
489 * if the current <code>AccessToken</code>
490 * does not confer write access rights
491 * @return the value of the field <code>LandingPage</code> for this
492 * <code>AffiliateTransaction</code> <code>Persistent</code>
493 */
494
495 public String getLandingPage()
496 throws AccessPoemException {
497 readLock();
498 return getLandingPage_unsafe();
499 }
500
501
502 /**
503 * Sets the <code>LandingPage</code> value, with checking, for this
504 * <code>AffiliateTransaction</code> <code>Persistent</code>.
505 * Field description:
506 * The Landing Page
507 *
508 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
509 * @param cooked a validated <code>int</code>
510 * @throws AccessPoemException
511 * if the current <code>AccessToken</code>
512 * does not confer write access rights
513 * @throws ValidationPoemException
514 * if the value is not valid
515 */
516 public void setLandingPage(String cooked)
517 throws AccessPoemException, ValidationPoemException {
518 _getAffiliateTransactionTable().getLandingPageColumn().
519 getType().assertValidCooked(cooked);
520 writeLock();
521 setLandingPage_unsafe(cooked);
522 }
523
524
525 /**
526 * Retrieves the <code>LandingPage</code> value as a <code>Field</code>
527 * from this <code>AffiliateTransaction</code> <code>Persistent</code>.
528 *
529 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
530 * @throws AccessPoemException
531 * if the current <code>AccessToken</code>
532 * does not confer write access rights
533 * @return the String landingPage
534 */
535 public Field getLandingPageField() throws AccessPoemException {
536 Column c = _getAffiliateTransactionTable().getLandingPageColumn();
537 return new Field(c.getRaw(this), c);
538 }
539
540
541 /**
542 * Retrieves the <code>UserIpAddress</code> value, without locking,
543 * for this <code>AffiliateTransaction</code> <code>Persistent</code>.
544 *
545 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
546 * @return the String userIpAddress
547 */
548 public String getUserIpAddress_unsafe() {
549 return userIpAddress;
550 }
551
552
553 /**
554 * Sets the <code>UserIpAddress</code> value directly, without checking,
555 * for this AffiliateTransaction <code>Persistent</code>.
556 *
557 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
558 * @param cooked the pre-validated value to set
559 */
560 public void setUserIpAddress_unsafe(String cooked) {
561 userIpAddress = cooked;
562 }
563
564 /**
565 * Retrieves the UserIpAddress value, with locking, for this
566 * <code>AffiliateTransaction</code> <code>Persistent</code>.
567 * Field description:
568 * The User's IP Address
569 *
570 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
571 * @throws AccessPoemException
572 * if the current <code>AccessToken</code>
573 * does not confer write access rights
574 * @return the value of the field <code>UserIpAddress</code> for this
575 * <code>AffiliateTransaction</code> <code>Persistent</code>
576 */
577
578 public String getUserIpAddress()
579 throws AccessPoemException {
580 readLock();
581 return getUserIpAddress_unsafe();
582 }
583
584
585 /**
586 * Sets the <code>UserIpAddress</code> value, with checking, for this
587 * <code>AffiliateTransaction</code> <code>Persistent</code>.
588 * Field description:
589 * The User's IP Address
590 *
591 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
592 * @param cooked a validated <code>int</code>
593 * @throws AccessPoemException
594 * if the current <code>AccessToken</code>
595 * does not confer write access rights
596 * @throws ValidationPoemException
597 * if the value is not valid
598 */
599 public void setUserIpAddress(String cooked)
600 throws AccessPoemException, ValidationPoemException {
601 _getAffiliateTransactionTable().getUserIpAddressColumn().
602 getType().assertValidCooked(cooked);
603 writeLock();
604 setUserIpAddress_unsafe(cooked);
605 }
606
607
608 /**
609 * Retrieves the <code>UserIpAddress</code> value as a <code>Field</code>
610 * from this <code>AffiliateTransaction</code> <code>Persistent</code>.
611 *
612 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
613 * @throws AccessPoemException
614 * if the current <code>AccessToken</code>
615 * does not confer write access rights
616 * @return the String userIpAddress
617 */
618 public Field getUserIpAddressField() throws AccessPoemException {
619 Column c = _getAffiliateTransactionTable().getUserIpAddressColumn();
620 return new Field(c.getRaw(this), c);
621 }
622 }
623