| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| UserBase |
|
| 1.05;1.05 |
| 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 | ||
| 6 | import org.melati.poem.AccessPoemException; | |
| 7 | import org.melati.poem.Column; | |
| 8 | import org.melati.poem.Field; | |
| 9 | import org.melati.poem.NoSuchRowPoemException; | |
| 10 | import org.melati.poem.User; | |
| 11 | import org.melati.poem.ValidationPoemException; | |
| 12 | import org.paneris.jammyjoes.model.Affiliate; | |
| 13 | import org.paneris.jammyjoes.model.DeliveryZone; | |
| 14 | import org.paneris.jammyjoes.model.JammyjoesDatabaseTables; | |
| 15 | import org.paneris.jammyjoes.model.ShopCurrency; | |
| 16 | import org.paneris.jammyjoes.model.UserTable; | |
| 17 | ||
| 18 | ||
| 19 | /** | |
| 20 | * Melati POEM generated abstract base class for a <code>Persistent</code> | |
| 21 | * <code>User</code> Object. | |
| 22 | * | |
| 23 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 24 | */ | |
| 25 | 0 | public abstract class UserBase extends User { |
| 26 | ||
| 27 | ||
| 28 | /** | |
| 29 | * Retrieves the Database object. | |
| 30 | * | |
| 31 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 32 | * @return the database | |
| 33 | */ | |
| 34 | public JammyjoesDatabaseTables getJammyjoesDatabaseTables() { | |
| 35 | 0 | return (JammyjoesDatabaseTables)getDatabase(); |
| 36 | } | |
| 37 | ||
| 38 | ||
| 39 | /** | |
| 40 | * Retrieves the <code>UserTable</code> table | |
| 41 | * which this <code>Persistent</code> is from. | |
| 42 | * | |
| 43 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 44 | * @return the org.melati.poem.UserTable | |
| 45 | */ | |
| 46 | public org.melati.poem.UserTable getUserTable() { | |
| 47 | 0 | return (org.melati.poem.UserTable)getTable(); |
| 48 | } | |
| 49 | ||
| 50 | private UserTable _getUserTable() { | |
| 51 | 0 | return (UserTable)getTable(); |
| 52 | } | |
| 53 | ||
| 54 | // Fields in this table | |
| 55 | /** | |
| 56 | * email - The user's email address | |
| 57 | */ | |
| 58 | protected String email; | |
| 59 | /** | |
| 60 | * Address | |
| 61 | */ | |
| 62 | protected String address; | |
| 63 | /** | |
| 64 | * Town / City | |
| 65 | */ | |
| 66 | protected String town; | |
| 67 | /** | |
| 68 | * Telephone - Order telephone number | |
| 69 | */ | |
| 70 | protected String tel; | |
| 71 | /** | |
| 72 | * Postcode - Order postcode | |
| 73 | */ | |
| 74 | protected String postcode; | |
| 75 | /** | |
| 76 | * Country | |
| 77 | */ | |
| 78 | protected String country; | |
| 79 | /** | |
| 80 | * currency - The detault currency for this user | |
| 81 | */ | |
| 82 | protected Integer currency; | |
| 83 | /** | |
| 84 | * zone - The delivery zone for this customer | |
| 85 | */ | |
| 86 | protected Integer zone; | |
| 87 | /** | |
| 88 | * affiliate - The affiliate (if this user represents an affiliate) | |
| 89 | */ | |
| 90 | protected Integer affiliate; | |
| 91 | /** | |
| 92 | * Want Spam? - Does the user want to receive spam email? | |
| 93 | */ | |
| 94 | protected Boolean spam; | |
| 95 | ||
| 96 | ||
| 97 | /** | |
| 98 | * Retrieves the <code>Email</code> value, without locking, | |
| 99 | * for this <code>User</code> <code>Persistent</code>. | |
| 100 | * | |
| 101 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 102 | * @return the String email | |
| 103 | */ | |
| 104 | public String getEmail_unsafe() { | |
| 105 | 0 | return email; |
| 106 | } | |
| 107 | ||
| 108 | ||
| 109 | /** | |
| 110 | * Sets the <code>Email</code> value directly, without checking, | |
| 111 | * for this User <code>Persistent</code>. | |
| 112 | * | |
| 113 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 114 | * @param cooked the pre-validated value to set | |
| 115 | */ | |
| 116 | public void setEmail_unsafe(String cooked) { | |
| 117 | 0 | email = cooked; |
| 118 | 0 | } |
| 119 | ||
| 120 | /** | |
| 121 | * Retrieves the Email value, with locking, for this | |
| 122 | * <code>User</code> <code>Persistent</code>. | |
| 123 | * Field description: | |
| 124 | * The user's email address | |
| 125 | * | |
| 126 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 127 | * @throws AccessPoemException | |
| 128 | * if the current <code>AccessToken</code> | |
| 129 | * does not confer write access rights | |
| 130 | * @return the value of the field <code>Email</code> for this | |
| 131 | * <code>User</code> <code>Persistent</code> | |
| 132 | */ | |
| 133 | ||
| 134 | public String getEmail() | |
| 135 | throws AccessPoemException { | |
| 136 | 0 | readLock(); |
| 137 | 0 | return getEmail_unsafe(); |
| 138 | } | |
| 139 | ||
| 140 | ||
| 141 | /** | |
| 142 | * Sets the <code>Email</code> value, with checking, for this | |
| 143 | * <code>User</code> <code>Persistent</code>. | |
| 144 | * Field description: | |
| 145 | * The user's email address | |
| 146 | * | |
| 147 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 148 | * @param cooked a validated <code>int</code> | |
| 149 | * @throws AccessPoemException | |
| 150 | * if the current <code>AccessToken</code> | |
| 151 | * does not confer write access rights | |
| 152 | * @throws ValidationPoemException | |
| 153 | * if the value is not valid | |
| 154 | */ | |
| 155 | public void setEmail(String cooked) | |
| 156 | throws AccessPoemException, ValidationPoemException { | |
| 157 | 0 | _getUserTable().getEmailColumn(). |
| 158 | getType().assertValidCooked(cooked); | |
| 159 | 0 | writeLock(); |
| 160 | 0 | setEmail_unsafe(cooked); |
| 161 | 0 | } |
| 162 | ||
| 163 | ||
| 164 | /** | |
| 165 | * Retrieves the <code>Email</code> value as a <code>Field</code> | |
| 166 | * from this <code>User</code> <code>Persistent</code>. | |
| 167 | * | |
| 168 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 169 | * @throws AccessPoemException | |
| 170 | * if the current <code>AccessToken</code> | |
| 171 | * does not confer write access rights | |
| 172 | * @return the String email | |
| 173 | */ | |
| 174 | public Field getEmailField() throws AccessPoemException { | |
| 175 | 0 | Column c = _getUserTable().getEmailColumn(); |
| 176 | 0 | return new Field(c.getRaw(this), c); |
| 177 | } | |
| 178 | ||
| 179 | ||
| 180 | /** | |
| 181 | * Retrieves the <code>Address</code> value, without locking, | |
| 182 | * for this <code>User</code> <code>Persistent</code>. | |
| 183 | * | |
| 184 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 185 | * @return the String address | |
| 186 | */ | |
| 187 | public String getAddress_unsafe() { | |
| 188 | 0 | return address; |
| 189 | } | |
| 190 | ||
| 191 | ||
| 192 | /** | |
| 193 | * Sets the <code>Address</code> value directly, without checking, | |
| 194 | * for this User <code>Persistent</code>. | |
| 195 | * | |
| 196 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 197 | * @param cooked the pre-validated value to set | |
| 198 | */ | |
| 199 | public void setAddress_unsafe(String cooked) { | |
| 200 | 0 | address = cooked; |
| 201 | 0 | } |
| 202 | ||
| 203 | /** | |
| 204 | * Retrieves the Address value, with locking, for this | |
| 205 | * <code>User</code> <code>Persistent</code>. | |
| 206 | * | |
| 207 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 208 | * @throws AccessPoemException | |
| 209 | * if the current <code>AccessToken</code> | |
| 210 | * does not confer write access rights | |
| 211 | * @return the value of the field <code>Address</code> for this | |
| 212 | * <code>User</code> <code>Persistent</code> | |
| 213 | */ | |
| 214 | ||
| 215 | public String getAddress() | |
| 216 | throws AccessPoemException { | |
| 217 | 0 | readLock(); |
| 218 | 0 | return getAddress_unsafe(); |
| 219 | } | |
| 220 | ||
| 221 | ||
| 222 | /** | |
| 223 | * Sets the <code>Address</code> value, with checking, for this | |
| 224 | * <code>User</code> <code>Persistent</code>. | |
| 225 | * | |
| 226 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 227 | * @param cooked a validated <code>int</code> | |
| 228 | * @throws AccessPoemException | |
| 229 | * if the current <code>AccessToken</code> | |
| 230 | * does not confer write access rights | |
| 231 | * @throws ValidationPoemException | |
| 232 | * if the value is not valid | |
| 233 | */ | |
| 234 | public void setAddress(String cooked) | |
| 235 | throws AccessPoemException, ValidationPoemException { | |
| 236 | 0 | _getUserTable().getAddressColumn(). |
| 237 | getType().assertValidCooked(cooked); | |
| 238 | 0 | writeLock(); |
| 239 | 0 | setAddress_unsafe(cooked); |
| 240 | 0 | } |
| 241 | ||
| 242 | ||
| 243 | /** | |
| 244 | * Retrieves the <code>Address</code> value as a <code>Field</code> | |
| 245 | * from this <code>User</code> <code>Persistent</code>. | |
| 246 | * | |
| 247 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 248 | * @throws AccessPoemException | |
| 249 | * if the current <code>AccessToken</code> | |
| 250 | * does not confer write access rights | |
| 251 | * @return the String address | |
| 252 | */ | |
| 253 | public Field getAddressField() throws AccessPoemException { | |
| 254 | 0 | Column c = _getUserTable().getAddressColumn(); |
| 255 | 0 | return new Field(c.getRaw(this), c); |
| 256 | } | |
| 257 | ||
| 258 | ||
| 259 | /** | |
| 260 | * Retrieves the <code>Town</code> value, without locking, | |
| 261 | * for this <code>User</code> <code>Persistent</code>. | |
| 262 | * | |
| 263 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 264 | * @return the String town | |
| 265 | */ | |
| 266 | public String getTown_unsafe() { | |
| 267 | 0 | return town; |
| 268 | } | |
| 269 | ||
| 270 | ||
| 271 | /** | |
| 272 | * Sets the <code>Town</code> value directly, without checking, | |
| 273 | * for this User <code>Persistent</code>. | |
| 274 | * | |
| 275 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 276 | * @param cooked the pre-validated value to set | |
| 277 | */ | |
| 278 | public void setTown_unsafe(String cooked) { | |
| 279 | 0 | town = cooked; |
| 280 | 0 | } |
| 281 | ||
| 282 | /** | |
| 283 | * Retrieves the Town value, with locking, for this | |
| 284 | * <code>User</code> <code>Persistent</code>. | |
| 285 | * | |
| 286 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 287 | * @throws AccessPoemException | |
| 288 | * if the current <code>AccessToken</code> | |
| 289 | * does not confer write access rights | |
| 290 | * @return the value of the field <code>Town</code> for this | |
| 291 | * <code>User</code> <code>Persistent</code> | |
| 292 | */ | |
| 293 | ||
| 294 | public String getTown() | |
| 295 | throws AccessPoemException { | |
| 296 | 0 | readLock(); |
| 297 | 0 | return getTown_unsafe(); |
| 298 | } | |
| 299 | ||
| 300 | ||
| 301 | /** | |
| 302 | * Sets the <code>Town</code> value, with checking, for this | |
| 303 | * <code>User</code> <code>Persistent</code>. | |
| 304 | * | |
| 305 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 306 | * @param cooked a validated <code>int</code> | |
| 307 | * @throws AccessPoemException | |
| 308 | * if the current <code>AccessToken</code> | |
| 309 | * does not confer write access rights | |
| 310 | * @throws ValidationPoemException | |
| 311 | * if the value is not valid | |
| 312 | */ | |
| 313 | public void setTown(String cooked) | |
| 314 | throws AccessPoemException, ValidationPoemException { | |
| 315 | 0 | _getUserTable().getTownColumn(). |
| 316 | getType().assertValidCooked(cooked); | |
| 317 | 0 | writeLock(); |
| 318 | 0 | setTown_unsafe(cooked); |
| 319 | 0 | } |
| 320 | ||
| 321 | ||
| 322 | /** | |
| 323 | * Retrieves the <code>Town</code> value as a <code>Field</code> | |
| 324 | * from this <code>User</code> <code>Persistent</code>. | |
| 325 | * | |
| 326 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 327 | * @throws AccessPoemException | |
| 328 | * if the current <code>AccessToken</code> | |
| 329 | * does not confer write access rights | |
| 330 | * @return the String town | |
| 331 | */ | |
| 332 | public Field getTownField() throws AccessPoemException { | |
| 333 | 0 | Column c = _getUserTable().getTownColumn(); |
| 334 | 0 | return new Field(c.getRaw(this), c); |
| 335 | } | |
| 336 | ||
| 337 | ||
| 338 | /** | |
| 339 | * Retrieves the <code>Tel</code> value, without locking, | |
| 340 | * for this <code>User</code> <code>Persistent</code>. | |
| 341 | * | |
| 342 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 343 | * @return the String tel | |
| 344 | */ | |
| 345 | public String getTel_unsafe() { | |
| 346 | 0 | return tel; |
| 347 | } | |
| 348 | ||
| 349 | ||
| 350 | /** | |
| 351 | * Sets the <code>Tel</code> value directly, without checking, | |
| 352 | * for this User <code>Persistent</code>. | |
| 353 | * | |
| 354 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 355 | * @param cooked the pre-validated value to set | |
| 356 | */ | |
| 357 | public void setTel_unsafe(String cooked) { | |
| 358 | 0 | tel = cooked; |
| 359 | 0 | } |
| 360 | ||
| 361 | /** | |
| 362 | * Retrieves the Tel value, with locking, for this | |
| 363 | * <code>User</code> <code>Persistent</code>. | |
| 364 | * Field description: | |
| 365 | * Order telephone number | |
| 366 | * | |
| 367 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 368 | * @throws AccessPoemException | |
| 369 | * if the current <code>AccessToken</code> | |
| 370 | * does not confer write access rights | |
| 371 | * @return the value of the field <code>Tel</code> for this | |
| 372 | * <code>User</code> <code>Persistent</code> | |
| 373 | */ | |
| 374 | ||
| 375 | public String getTel() | |
| 376 | throws AccessPoemException { | |
| 377 | 0 | readLock(); |
| 378 | 0 | return getTel_unsafe(); |
| 379 | } | |
| 380 | ||
| 381 | ||
| 382 | /** | |
| 383 | * Sets the <code>Tel</code> value, with checking, for this | |
| 384 | * <code>User</code> <code>Persistent</code>. | |
| 385 | * Field description: | |
| 386 | * Order telephone number | |
| 387 | * | |
| 388 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 389 | * @param cooked a validated <code>int</code> | |
| 390 | * @throws AccessPoemException | |
| 391 | * if the current <code>AccessToken</code> | |
| 392 | * does not confer write access rights | |
| 393 | * @throws ValidationPoemException | |
| 394 | * if the value is not valid | |
| 395 | */ | |
| 396 | public void setTel(String cooked) | |
| 397 | throws AccessPoemException, ValidationPoemException { | |
| 398 | 0 | _getUserTable().getTelColumn(). |
| 399 | getType().assertValidCooked(cooked); | |
| 400 | 0 | writeLock(); |
| 401 | 0 | setTel_unsafe(cooked); |
| 402 | 0 | } |
| 403 | ||
| 404 | ||
| 405 | /** | |
| 406 | * Retrieves the <code>Tel</code> value as a <code>Field</code> | |
| 407 | * from this <code>User</code> <code>Persistent</code>. | |
| 408 | * | |
| 409 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 410 | * @throws AccessPoemException | |
| 411 | * if the current <code>AccessToken</code> | |
| 412 | * does not confer write access rights | |
| 413 | * @return the String tel | |
| 414 | */ | |
| 415 | public Field getTelField() throws AccessPoemException { | |
| 416 | 0 | Column c = _getUserTable().getTelColumn(); |
| 417 | 0 | return new Field(c.getRaw(this), c); |
| 418 | } | |
| 419 | ||
| 420 | ||
| 421 | /** | |
| 422 | * Retrieves the <code>Postcode</code> value, without locking, | |
| 423 | * for this <code>User</code> <code>Persistent</code>. | |
| 424 | * | |
| 425 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 426 | * @return the String postcode | |
| 427 | */ | |
| 428 | public String getPostcode_unsafe() { | |
| 429 | 0 | return postcode; |
| 430 | } | |
| 431 | ||
| 432 | ||
| 433 | /** | |
| 434 | * Sets the <code>Postcode</code> value directly, without checking, | |
| 435 | * for this User <code>Persistent</code>. | |
| 436 | * | |
| 437 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 438 | * @param cooked the pre-validated value to set | |
| 439 | */ | |
| 440 | public void setPostcode_unsafe(String cooked) { | |
| 441 | 0 | postcode = cooked; |
| 442 | 0 | } |
| 443 | ||
| 444 | /** | |
| 445 | * Retrieves the Postcode value, with locking, for this | |
| 446 | * <code>User</code> <code>Persistent</code>. | |
| 447 | * Field description: | |
| 448 | * Order postcode | |
| 449 | * | |
| 450 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 451 | * @throws AccessPoemException | |
| 452 | * if the current <code>AccessToken</code> | |
| 453 | * does not confer write access rights | |
| 454 | * @return the value of the field <code>Postcode</code> for this | |
| 455 | * <code>User</code> <code>Persistent</code> | |
| 456 | */ | |
| 457 | ||
| 458 | public String getPostcode() | |
| 459 | throws AccessPoemException { | |
| 460 | 0 | readLock(); |
| 461 | 0 | return getPostcode_unsafe(); |
| 462 | } | |
| 463 | ||
| 464 | ||
| 465 | /** | |
| 466 | * Sets the <code>Postcode</code> value, with checking, for this | |
| 467 | * <code>User</code> <code>Persistent</code>. | |
| 468 | * Field description: | |
| 469 | * Order postcode | |
| 470 | * | |
| 471 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 472 | * @param cooked a validated <code>int</code> | |
| 473 | * @throws AccessPoemException | |
| 474 | * if the current <code>AccessToken</code> | |
| 475 | * does not confer write access rights | |
| 476 | * @throws ValidationPoemException | |
| 477 | * if the value is not valid | |
| 478 | */ | |
| 479 | public void setPostcode(String cooked) | |
| 480 | throws AccessPoemException, ValidationPoemException { | |
| 481 | 0 | _getUserTable().getPostcodeColumn(). |
| 482 | getType().assertValidCooked(cooked); | |
| 483 | 0 | writeLock(); |
| 484 | 0 | setPostcode_unsafe(cooked); |
| 485 | 0 | } |
| 486 | ||
| 487 | ||
| 488 | /** | |
| 489 | * Retrieves the <code>Postcode</code> value as a <code>Field</code> | |
| 490 | * from this <code>User</code> <code>Persistent</code>. | |
| 491 | * | |
| 492 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 493 | * @throws AccessPoemException | |
| 494 | * if the current <code>AccessToken</code> | |
| 495 | * does not confer write access rights | |
| 496 | * @return the String postcode | |
| 497 | */ | |
| 498 | public Field getPostcodeField() throws AccessPoemException { | |
| 499 | 0 | Column c = _getUserTable().getPostcodeColumn(); |
| 500 | 0 | return new Field(c.getRaw(this), c); |
| 501 | } | |
| 502 | ||
| 503 | ||
| 504 | /** | |
| 505 | * Retrieves the <code>Country</code> value, without locking, | |
| 506 | * for this <code>User</code> <code>Persistent</code>. | |
| 507 | * | |
| 508 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 509 | * @return the String country | |
| 510 | */ | |
| 511 | public String getCountry_unsafe() { | |
| 512 | 0 | return country; |
| 513 | } | |
| 514 | ||
| 515 | ||
| 516 | /** | |
| 517 | * Sets the <code>Country</code> value directly, without checking, | |
| 518 | * for this User <code>Persistent</code>. | |
| 519 | * | |
| 520 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 521 | * @param cooked the pre-validated value to set | |
| 522 | */ | |
| 523 | public void setCountry_unsafe(String cooked) { | |
| 524 | 0 | country = cooked; |
| 525 | 0 | } |
| 526 | ||
| 527 | /** | |
| 528 | * Retrieves the Country value, with locking, for this | |
| 529 | * <code>User</code> <code>Persistent</code>. | |
| 530 | * | |
| 531 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 532 | * @throws AccessPoemException | |
| 533 | * if the current <code>AccessToken</code> | |
| 534 | * does not confer write access rights | |
| 535 | * @return the value of the field <code>Country</code> for this | |
| 536 | * <code>User</code> <code>Persistent</code> | |
| 537 | */ | |
| 538 | ||
| 539 | public String getCountry() | |
| 540 | throws AccessPoemException { | |
| 541 | 0 | readLock(); |
| 542 | 0 | return getCountry_unsafe(); |
| 543 | } | |
| 544 | ||
| 545 | ||
| 546 | /** | |
| 547 | * Sets the <code>Country</code> value, with checking, for this | |
| 548 | * <code>User</code> <code>Persistent</code>. | |
| 549 | * | |
| 550 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 551 | * @param cooked a validated <code>int</code> | |
| 552 | * @throws AccessPoemException | |
| 553 | * if the current <code>AccessToken</code> | |
| 554 | * does not confer write access rights | |
| 555 | * @throws ValidationPoemException | |
| 556 | * if the value is not valid | |
| 557 | */ | |
| 558 | public void setCountry(String cooked) | |
| 559 | throws AccessPoemException, ValidationPoemException { | |
| 560 | 0 | _getUserTable().getCountryColumn(). |
| 561 | getType().assertValidCooked(cooked); | |
| 562 | 0 | writeLock(); |
| 563 | 0 | setCountry_unsafe(cooked); |
| 564 | 0 | } |
| 565 | ||
| 566 | ||
| 567 | /** | |
| 568 | * Retrieves the <code>Country</code> value as a <code>Field</code> | |
| 569 | * from this <code>User</code> <code>Persistent</code>. | |
| 570 | * | |
| 571 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 572 | * @throws AccessPoemException | |
| 573 | * if the current <code>AccessToken</code> | |
| 574 | * does not confer write access rights | |
| 575 | * @return the String country | |
| 576 | */ | |
| 577 | public Field getCountryField() throws AccessPoemException { | |
| 578 | 0 | Column c = _getUserTable().getCountryColumn(); |
| 579 | 0 | return new Field(c.getRaw(this), c); |
| 580 | } | |
| 581 | ||
| 582 | ||
| 583 | /** | |
| 584 | * Retrieves the <code>Currency</code> value, without locking, | |
| 585 | * for this <code>User</code> <code>Persistent</code>. | |
| 586 | * | |
| 587 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 588 | * @return the Integer currency | |
| 589 | */ | |
| 590 | public Integer getCurrency_unsafe() { | |
| 591 | 0 | return currency; |
| 592 | } | |
| 593 | ||
| 594 | ||
| 595 | /** | |
| 596 | * Sets the <code>Currency</code> value directly, without checking, | |
| 597 | * for this User <code>Persistent</code>. | |
| 598 | * | |
| 599 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 600 | * @param cooked the pre-validated value to set | |
| 601 | */ | |
| 602 | public void setCurrency_unsafe(Integer cooked) { | |
| 603 | 0 | currency = cooked; |
| 604 | 0 | } |
| 605 | ||
| 606 | /** | |
| 607 | * Retrieves the Table Row Object ID. | |
| 608 | * | |
| 609 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 610 | * @throws AccessPoemException | |
| 611 | * if the current <code>AccessToken</code> | |
| 612 | * does not confer read access rights | |
| 613 | * @return the TROID as an <code>Integer</code> | |
| 614 | */ | |
| 615 | ||
| 616 | public Integer getCurrencyTroid() | |
| 617 | throws AccessPoemException { | |
| 618 | 0 | readLock(); |
| 619 | 0 | return getCurrency_unsafe(); |
| 620 | } | |
| 621 | ||
| 622 | ||
| 623 | /** | |
| 624 | * Sets the Table Row Object ID. | |
| 625 | * | |
| 626 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 627 | * @param raw a Table Row Object Id | |
| 628 | * @throws AccessPoemException | |
| 629 | * if the current <code>AccessToken</code> | |
| 630 | * does not confer write access rights | |
| 631 | */ | |
| 632 | public void setCurrencyTroid(Integer raw) | |
| 633 | throws AccessPoemException { | |
| 634 | 0 | setCurrency(raw == null ? null : |
| 635 | getJammyjoesDatabaseTables().getShopCurrencyTable().getShopCurrencyObject(raw)); | |
| 636 | 0 | } |
| 637 | ||
| 638 | ||
| 639 | /** | |
| 640 | * Retrieves the <code>Currency</code> object referred to. | |
| 641 | * | |
| 642 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 643 | * @throws AccessPoemException | |
| 644 | * if the current <code>AccessToken</code> | |
| 645 | * does not confer read access rights | |
| 646 | * @throws NoSuchRowPoemException | |
| 647 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
| 648 | * @return the <code>Currency</code> as a <code>ShopCurrency</code> | |
| 649 | */ | |
| 650 | public ShopCurrency getCurrency() | |
| 651 | throws AccessPoemException, NoSuchRowPoemException { | |
| 652 | 0 | Integer troid = getCurrencyTroid(); |
| 653 | 0 | return troid == null ? null : |
| 654 | getJammyjoesDatabaseTables().getShopCurrencyTable().getShopCurrencyObject(troid); | |
| 655 | } | |
| 656 | ||
| 657 | ||
| 658 | /** | |
| 659 | * Set the Currency. | |
| 660 | * | |
| 661 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 662 | * @param cooked a validated <code>ShopCurrency</code> | |
| 663 | * @throws AccessPoemException | |
| 664 | * if the current <code>AccessToken</code> | |
| 665 | * does not confer write access rights | |
| 666 | */ | |
| 667 | public void setCurrency(ShopCurrency cooked) | |
| 668 | throws AccessPoemException { | |
| 669 | 0 | _getUserTable(). |
| 670 | getCurrencyColumn(). | |
| 671 | getType().assertValidCooked(cooked); | |
| 672 | 0 | writeLock(); |
| 673 | 0 | if (cooked == null) |
| 674 | 0 | setCurrency_unsafe(null); |
| 675 | else { | |
| 676 | 0 | cooked.existenceLock(); |
| 677 | 0 | setCurrency_unsafe(cooked.troid()); |
| 678 | } | |
| 679 | 0 | } |
| 680 | ||
| 681 | ||
| 682 | /** | |
| 683 | * Retrieves the <code>Currency</code> value as a <code>Field</code> | |
| 684 | * from this <code>User</code> <code>Persistent</code>. | |
| 685 | * | |
| 686 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 687 | * @throws AccessPoemException | |
| 688 | * if the current <code>AccessToken</code> | |
| 689 | * does not confer write access rights | |
| 690 | * @return the Integer currency | |
| 691 | */ | |
| 692 | public Field getCurrencyField() throws AccessPoemException { | |
| 693 | 0 | Column c = _getUserTable().getCurrencyColumn(); |
| 694 | 0 | return new Field(c.getRaw(this), c); |
| 695 | } | |
| 696 | ||
| 697 | ||
| 698 | /** | |
| 699 | * Retrieves the <code>Zone</code> value, without locking, | |
| 700 | * for this <code>User</code> <code>Persistent</code>. | |
| 701 | * | |
| 702 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 703 | * @return the Integer zone | |
| 704 | */ | |
| 705 | public Integer getZone_unsafe() { | |
| 706 | 0 | return zone; |
| 707 | } | |
| 708 | ||
| 709 | ||
| 710 | /** | |
| 711 | * Sets the <code>Zone</code> value directly, without checking, | |
| 712 | * for this User <code>Persistent</code>. | |
| 713 | * | |
| 714 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 715 | * @param cooked the pre-validated value to set | |
| 716 | */ | |
| 717 | public void setZone_unsafe(Integer cooked) { | |
| 718 | 0 | zone = cooked; |
| 719 | 0 | } |
| 720 | ||
| 721 | /** | |
| 722 | * Retrieves the Table Row Object ID. | |
| 723 | * | |
| 724 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 725 | * @throws AccessPoemException | |
| 726 | * if the current <code>AccessToken</code> | |
| 727 | * does not confer read access rights | |
| 728 | * @return the TROID as an <code>Integer</code> | |
| 729 | */ | |
| 730 | ||
| 731 | public Integer getZoneTroid() | |
| 732 | throws AccessPoemException { | |
| 733 | 0 | readLock(); |
| 734 | 0 | return getZone_unsafe(); |
| 735 | } | |
| 736 | ||
| 737 | ||
| 738 | /** | |
| 739 | * Sets the Table Row Object ID. | |
| 740 | * | |
| 741 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 742 | * @param raw a Table Row Object Id | |
| 743 | * @throws AccessPoemException | |
| 744 | * if the current <code>AccessToken</code> | |
| 745 | * does not confer write access rights | |
| 746 | */ | |
| 747 | public void setZoneTroid(Integer raw) | |
| 748 | throws AccessPoemException { | |
| 749 | 0 | setZone(raw == null ? null : |
| 750 | getJammyjoesDatabaseTables().getDeliveryZoneTable().getDeliveryZoneObject(raw)); | |
| 751 | 0 | } |
| 752 | ||
| 753 | ||
| 754 | /** | |
| 755 | * Retrieves the <code>Zone</code> object referred to. | |
| 756 | * | |
| 757 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 758 | * @throws AccessPoemException | |
| 759 | * if the current <code>AccessToken</code> | |
| 760 | * does not confer read access rights | |
| 761 | * @throws NoSuchRowPoemException | |
| 762 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
| 763 | * @return the <code>Zone</code> as a <code>DeliveryZone</code> | |
| 764 | */ | |
| 765 | public DeliveryZone getZone() | |
| 766 | throws AccessPoemException, NoSuchRowPoemException { | |
| 767 | 0 | Integer troid = getZoneTroid(); |
| 768 | 0 | return troid == null ? null : |
| 769 | getJammyjoesDatabaseTables().getDeliveryZoneTable().getDeliveryZoneObject(troid); | |
| 770 | } | |
| 771 | ||
| 772 | ||
| 773 | /** | |
| 774 | * Set the Zone. | |
| 775 | * | |
| 776 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 777 | * @param cooked a validated <code>DeliveryZone</code> | |
| 778 | * @throws AccessPoemException | |
| 779 | * if the current <code>AccessToken</code> | |
| 780 | * does not confer write access rights | |
| 781 | */ | |
| 782 | public void setZone(DeliveryZone cooked) | |
| 783 | throws AccessPoemException { | |
| 784 | 0 | _getUserTable(). |
| 785 | getZoneColumn(). | |
| 786 | getType().assertValidCooked(cooked); | |
| 787 | 0 | writeLock(); |
| 788 | 0 | if (cooked == null) |
| 789 | 0 | setZone_unsafe(null); |
| 790 | else { | |
| 791 | 0 | cooked.existenceLock(); |
| 792 | 0 | setZone_unsafe(cooked.troid()); |
| 793 | } | |
| 794 | 0 | } |
| 795 | ||
| 796 | ||
| 797 | /** | |
| 798 | * Retrieves the <code>Zone</code> value as a <code>Field</code> | |
| 799 | * from this <code>User</code> <code>Persistent</code>. | |
| 800 | * | |
| 801 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 802 | * @throws AccessPoemException | |
| 803 | * if the current <code>AccessToken</code> | |
| 804 | * does not confer write access rights | |
| 805 | * @return the Integer zone | |
| 806 | */ | |
| 807 | public Field getZoneField() throws AccessPoemException { | |
| 808 | 0 | Column c = _getUserTable().getZoneColumn(); |
| 809 | 0 | return new Field(c.getRaw(this), c); |
| 810 | } | |
| 811 | ||
| 812 | ||
| 813 | /** | |
| 814 | * Retrieves the <code>Affiliate</code> value, without locking, | |
| 815 | * for this <code>User</code> <code>Persistent</code>. | |
| 816 | * | |
| 817 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 818 | * @return the Integer affiliate | |
| 819 | */ | |
| 820 | public Integer getAffiliate_unsafe() { | |
| 821 | 0 | return affiliate; |
| 822 | } | |
| 823 | ||
| 824 | ||
| 825 | /** | |
| 826 | * Sets the <code>Affiliate</code> value directly, without checking, | |
| 827 | * for this User <code>Persistent</code>. | |
| 828 | * | |
| 829 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 830 | * @param cooked the pre-validated value to set | |
| 831 | */ | |
| 832 | public void setAffiliate_unsafe(Integer cooked) { | |
| 833 | 0 | affiliate = cooked; |
| 834 | 0 | } |
| 835 | ||
| 836 | /** | |
| 837 | * Retrieves the Table Row Object ID. | |
| 838 | * | |
| 839 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 840 | * @throws AccessPoemException | |
| 841 | * if the current <code>AccessToken</code> | |
| 842 | * does not confer read access rights | |
| 843 | * @return the TROID as an <code>Integer</code> | |
| 844 | */ | |
| 845 | ||
| 846 | public Integer getAffiliateTroid() | |
| 847 | throws AccessPoemException { | |
| 848 | 0 | readLock(); |
| 849 | 0 | return getAffiliate_unsafe(); |
| 850 | } | |
| 851 | ||
| 852 | ||
| 853 | /** | |
| 854 | * Sets the Table Row Object ID. | |
| 855 | * | |
| 856 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 857 | * @param raw a Table Row Object Id | |
| 858 | * @throws AccessPoemException | |
| 859 | * if the current <code>AccessToken</code> | |
| 860 | * does not confer write access rights | |
| 861 | */ | |
| 862 | public void setAffiliateTroid(Integer raw) | |
| 863 | throws AccessPoemException { | |
| 864 | 0 | setAffiliate(raw == null ? null : |
| 865 | getJammyjoesDatabaseTables().getAffiliateTable().getAffiliateObject(raw)); | |
| 866 | 0 | } |
| 867 | ||
| 868 | ||
| 869 | /** | |
| 870 | * Retrieves the <code>Affiliate</code> object referred to. | |
| 871 | * | |
| 872 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 873 | * @throws AccessPoemException | |
| 874 | * if the current <code>AccessToken</code> | |
| 875 | * does not confer read access rights | |
| 876 | * @throws NoSuchRowPoemException | |
| 877 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
| 878 | * @return the <code>Affiliate</code> as a <code>Affiliate</code> | |
| 879 | */ | |
| 880 | public Affiliate getAffiliate() | |
| 881 | throws AccessPoemException, NoSuchRowPoemException { | |
| 882 | 0 | Integer troid = getAffiliateTroid(); |
| 883 | 0 | return troid == null ? null : |
| 884 | getJammyjoesDatabaseTables().getAffiliateTable().getAffiliateObject(troid); | |
| 885 | } | |
| 886 | ||
| 887 | ||
| 888 | /** | |
| 889 | * Set the Affiliate. | |
| 890 | * | |
| 891 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 892 | * @param cooked a validated <code>Affiliate</code> | |
| 893 | * @throws AccessPoemException | |
| 894 | * if the current <code>AccessToken</code> | |
| 895 | * does not confer write access rights | |
| 896 | */ | |
| 897 | public void setAffiliate(Affiliate cooked) | |
| 898 | throws AccessPoemException { | |
| 899 | 0 | _getUserTable(). |
| 900 | getAffiliateColumn(). | |
| 901 | getType().assertValidCooked(cooked); | |
| 902 | 0 | writeLock(); |
| 903 | 0 | if (cooked == null) |
| 904 | 0 | setAffiliate_unsafe(null); |
| 905 | else { | |
| 906 | 0 | cooked.existenceLock(); |
| 907 | 0 | setAffiliate_unsafe(cooked.troid()); |
| 908 | } | |
| 909 | 0 | } |
| 910 | ||
| 911 | ||
| 912 | /** | |
| 913 | * Retrieves the <code>Affiliate</code> value as a <code>Field</code> | |
| 914 | * from this <code>User</code> <code>Persistent</code>. | |
| 915 | * | |
| 916 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 917 | * @throws AccessPoemException | |
| 918 | * if the current <code>AccessToken</code> | |
| 919 | * does not confer write access rights | |
| 920 | * @return the Integer affiliate | |
| 921 | */ | |
| 922 | public Field getAffiliateField() throws AccessPoemException { | |
| 923 | 0 | Column c = _getUserTable().getAffiliateColumn(); |
| 924 | 0 | return new Field(c.getRaw(this), c); |
| 925 | } | |
| 926 | ||
| 927 | ||
| 928 | /** | |
| 929 | * Retrieves the <code>Spam</code> value, without locking, | |
| 930 | * for this <code>User</code> <code>Persistent</code>. | |
| 931 | * | |
| 932 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 933 | * @return the Boolean spam | |
| 934 | */ | |
| 935 | public Boolean getSpam_unsafe() { | |
| 936 | 0 | return spam; |
| 937 | } | |
| 938 | ||
| 939 | ||
| 940 | /** | |
| 941 | * Sets the <code>Spam</code> value directly, without checking, | |
| 942 | * for this User <code>Persistent</code>. | |
| 943 | * | |
| 944 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 945 | * @param cooked the pre-validated value to set | |
| 946 | */ | |
| 947 | public void setSpam_unsafe(Boolean cooked) { | |
| 948 | 0 | spam = cooked; |
| 949 | 0 | } |
| 950 | ||
| 951 | /** | |
| 952 | * Retrieves the Spam value, with locking, for this | |
| 953 | * <code>User</code> <code>Persistent</code>. | |
| 954 | * Field description: | |
| 955 | * Does the user want to receive spam email? | |
| 956 | * | |
| 957 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 958 | * @throws AccessPoemException | |
| 959 | * if the current <code>AccessToken</code> | |
| 960 | * does not confer write access rights | |
| 961 | * @return the value of the field <code>Spam</code> for this | |
| 962 | * <code>User</code> <code>Persistent</code> | |
| 963 | */ | |
| 964 | ||
| 965 | public Boolean getSpam() | |
| 966 | throws AccessPoemException { | |
| 967 | 0 | readLock(); |
| 968 | 0 | return getSpam_unsafe(); |
| 969 | } | |
| 970 | ||
| 971 | ||
| 972 | /** | |
| 973 | * Sets the <code>Spam</code> value, with checking, for this | |
| 974 | * <code>User</code> <code>Persistent</code>. | |
| 975 | * Field description: | |
| 976 | * Does the user want to receive spam email? | |
| 977 | * | |
| 978 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 979 | * @param cooked a validated <code>int</code> | |
| 980 | * @throws AccessPoemException | |
| 981 | * if the current <code>AccessToken</code> | |
| 982 | * does not confer write access rights | |
| 983 | * @throws ValidationPoemException | |
| 984 | * if the value is not valid | |
| 985 | */ | |
| 986 | public void setSpam(Boolean cooked) | |
| 987 | throws AccessPoemException, ValidationPoemException { | |
| 988 | 0 | _getUserTable().getSpamColumn(). |
| 989 | getType().assertValidCooked(cooked); | |
| 990 | 0 | writeLock(); |
| 991 | 0 | setSpam_unsafe(cooked); |
| 992 | 0 | } |
| 993 | ||
| 994 | /** | |
| 995 | * Sets the <code>Spam</code> value, with checking, | |
| 996 | * from a <code>boolean</code>, for this | |
| 997 | * <code>User</code> <code>Persistent</code>. | |
| 998 | * Field description: | |
| 999 | * Does the user want to receive spam email? | |
| 1000 | * | |
| 1001 | * | |
| 1002 | * @generator org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods | |
| 1003 | * @param cooked a <code>boolean</code> | |
| 1004 | * @throws AccessPoemException | |
| 1005 | * if the current <code>AccessToken</code> | |
| 1006 | * does not confer write access rights | |
| 1007 | * @throws ValidationPoemException | |
| 1008 | * if the value is not valid | |
| 1009 | */ | |
| 1010 | ||
| 1011 | public final void setSpam(boolean cooked) | |
| 1012 | throws AccessPoemException, ValidationPoemException { | |
| 1013 | 0 | setSpam(cooked ? Boolean.TRUE : Boolean.FALSE); |
| 1014 | 0 | } |
| 1015 | ||
| 1016 | ||
| 1017 | /** | |
| 1018 | * Retrieves the <code>Spam</code> value as a <code>Field</code> | |
| 1019 | * from this <code>User</code> <code>Persistent</code>. | |
| 1020 | * | |
| 1021 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 1022 | * @throws AccessPoemException | |
| 1023 | * if the current <code>AccessToken</code> | |
| 1024 | * does not confer write access rights | |
| 1025 | * @return the Boolean spam | |
| 1026 | */ | |
| 1027 | public Field getSpamField() throws AccessPoemException { | |
| 1028 | 0 | Column c = _getUserTable().getSpamColumn(); |
| 1029 | 0 | return new Field(c.getRaw(this), c); |
| 1030 | } | |
| 1031 | } | |
| 1032 |