| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| DeliveryZoneBase |
|
| 1.0;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 | ||
| 6 | import org.melati.poem.AccessPoemException; | |
| 7 | import org.melati.poem.Column; | |
| 8 | import org.melati.poem.Field; | |
| 9 | import org.melati.poem.JdbcPersistent; | |
| 10 | import org.melati.poem.ValidationPoemException; | |
| 11 | import org.paneris.jammyjoes.model.DeliveryZoneTable; | |
| 12 | import org.paneris.jammyjoes.model.JammyjoesDatabaseTables; | |
| 13 | ||
| 14 | ||
| 15 | /** | |
| 16 | * Melati POEM generated abstract base class for a <code>Persistent</code> | |
| 17 | * <code>DeliveryZone</code> Object. | |
| 18 | * | |
| 19 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 20 | */ | |
| 21 | 0 | public abstract class DeliveryZoneBase extends JdbcPersistent { |
| 22 | ||
| 23 | ||
| 24 | /** | |
| 25 | * Retrieves the Database object. | |
| 26 | * | |
| 27 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 28 | * @return the database | |
| 29 | */ | |
| 30 | public JammyjoesDatabaseTables getJammyjoesDatabaseTables() { | |
| 31 | 0 | return (JammyjoesDatabaseTables)getDatabase(); |
| 32 | } | |
| 33 | ||
| 34 | ||
| 35 | /** | |
| 36 | * Retrieves the <code>DeliveryZoneTable</code> table | |
| 37 | * which this <code>Persistent</code> is from. | |
| 38 | * | |
| 39 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 40 | * @return the DeliveryZoneTable | |
| 41 | */ | |
| 42 | public DeliveryZoneTable getDeliveryZoneTable() { | |
| 43 | 0 | return (DeliveryZoneTable)getTable(); |
| 44 | } | |
| 45 | ||
| 46 | private DeliveryZoneTable _getDeliveryZoneTable() { | |
| 47 | 0 | return (DeliveryZoneTable)getTable(); |
| 48 | } | |
| 49 | ||
| 50 | // Fields in this table | |
| 51 | /** | |
| 52 | * id | |
| 53 | */ | |
| 54 | protected Integer id; | |
| 55 | /** | |
| 56 | * Display name - The zone's name | |
| 57 | */ | |
| 58 | protected String displayname; | |
| 59 | /** | |
| 60 | * The order to display the zone | |
| 61 | */ | |
| 62 | protected Integer displayorder; | |
| 63 | /** | |
| 64 | * Charge by Value? - Charge by value for deliveries to this zone? | |
| 65 | */ | |
| 66 | protected Boolean chargeByValue; | |
| 67 | ||
| 68 | ||
| 69 | /** | |
| 70 | * Retrieves the <code>Id</code> value, without locking, | |
| 71 | * for this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 72 | * | |
| 73 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 74 | * @return the Integer id | |
| 75 | */ | |
| 76 | public Integer getId_unsafe() { | |
| 77 | 0 | return id; |
| 78 | } | |
| 79 | ||
| 80 | ||
| 81 | /** | |
| 82 | * Sets the <code>Id</code> value directly, without checking, | |
| 83 | * for this DeliveryZone <code>Persistent</code>. | |
| 84 | * | |
| 85 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 86 | * @param cooked the pre-validated value to set | |
| 87 | */ | |
| 88 | public void setId_unsafe(Integer cooked) { | |
| 89 | 0 | id = cooked; |
| 90 | 0 | } |
| 91 | ||
| 92 | /** | |
| 93 | * Retrieves the Id value, with locking, for this | |
| 94 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 95 | * | |
| 96 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 97 | * @throws AccessPoemException | |
| 98 | * if the current <code>AccessToken</code> | |
| 99 | * does not confer write access rights | |
| 100 | * @return the value of the field <code>Id</code> for this | |
| 101 | * <code>DeliveryZone</code> <code>Persistent</code> | |
| 102 | */ | |
| 103 | ||
| 104 | public Integer getId() | |
| 105 | throws AccessPoemException { | |
| 106 | 0 | readLock(); |
| 107 | 0 | return getId_unsafe(); |
| 108 | } | |
| 109 | ||
| 110 | ||
| 111 | /** | |
| 112 | * Sets the <code>Id</code> value, with checking, for this | |
| 113 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 114 | * | |
| 115 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 116 | * @param cooked a validated <code>int</code> | |
| 117 | * @throws AccessPoemException | |
| 118 | * if the current <code>AccessToken</code> | |
| 119 | * does not confer write access rights | |
| 120 | * @throws ValidationPoemException | |
| 121 | * if the value is not valid | |
| 122 | */ | |
| 123 | public void setId(Integer cooked) | |
| 124 | throws AccessPoemException, ValidationPoemException { | |
| 125 | 0 | _getDeliveryZoneTable().getIdColumn(). |
| 126 | getType().assertValidCooked(cooked); | |
| 127 | 0 | writeLock(); |
| 128 | 0 | setId_unsafe(cooked); |
| 129 | 0 | } |
| 130 | ||
| 131 | /** | |
| 132 | * Sets the <code>Id</code> value, with checking, for this | |
| 133 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 134 | * | |
| 135 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
| 136 | * @param cooked a validated <code>int</code> | |
| 137 | * @throws AccessPoemException | |
| 138 | * if the current <code>AccessToken</code> | |
| 139 | * does not confer write access rights | |
| 140 | * @throws ValidationPoemException | |
| 141 | * if the value is not valid | |
| 142 | */ | |
| 143 | ||
| 144 | public final void setId(int cooked) | |
| 145 | throws AccessPoemException, ValidationPoemException { | |
| 146 | 0 | setId(new Integer(cooked)); |
| 147 | 0 | } |
| 148 | ||
| 149 | ||
| 150 | /** | |
| 151 | * Retrieves the <code>Id</code> value as a <code>Field</code> | |
| 152 | * from this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 153 | * | |
| 154 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 155 | * @throws AccessPoemException | |
| 156 | * if the current <code>AccessToken</code> | |
| 157 | * does not confer write access rights | |
| 158 | * @return the Integer id | |
| 159 | */ | |
| 160 | public Field getIdField() throws AccessPoemException { | |
| 161 | 0 | Column c = _getDeliveryZoneTable().getIdColumn(); |
| 162 | 0 | return new Field(c.getRaw(this), c); |
| 163 | } | |
| 164 | ||
| 165 | ||
| 166 | /** | |
| 167 | * Retrieves the <code>Displayname</code> value, without locking, | |
| 168 | * for this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 169 | * | |
| 170 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 171 | * @return the String displayname | |
| 172 | */ | |
| 173 | public String getDisplayname_unsafe() { | |
| 174 | 0 | return displayname; |
| 175 | } | |
| 176 | ||
| 177 | ||
| 178 | /** | |
| 179 | * Sets the <code>Displayname</code> value directly, without checking, | |
| 180 | * for this DeliveryZone <code>Persistent</code>. | |
| 181 | * | |
| 182 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 183 | * @param cooked the pre-validated value to set | |
| 184 | */ | |
| 185 | public void setDisplayname_unsafe(String cooked) { | |
| 186 | 0 | displayname = cooked; |
| 187 | 0 | } |
| 188 | ||
| 189 | /** | |
| 190 | * Retrieves the Displayname value, with locking, for this | |
| 191 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 192 | * Field description: | |
| 193 | * The zone's name | |
| 194 | * | |
| 195 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 196 | * @throws AccessPoemException | |
| 197 | * if the current <code>AccessToken</code> | |
| 198 | * does not confer write access rights | |
| 199 | * @return the value of the field <code>Displayname</code> for this | |
| 200 | * <code>DeliveryZone</code> <code>Persistent</code> | |
| 201 | */ | |
| 202 | ||
| 203 | public String getDisplayname() | |
| 204 | throws AccessPoemException { | |
| 205 | 0 | readLock(); |
| 206 | 0 | return getDisplayname_unsafe(); |
| 207 | } | |
| 208 | ||
| 209 | ||
| 210 | /** | |
| 211 | * Sets the <code>Displayname</code> value, with checking, for this | |
| 212 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 213 | * Field description: | |
| 214 | * The zone's name | |
| 215 | * | |
| 216 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 217 | * @param cooked a validated <code>int</code> | |
| 218 | * @throws AccessPoemException | |
| 219 | * if the current <code>AccessToken</code> | |
| 220 | * does not confer write access rights | |
| 221 | * @throws ValidationPoemException | |
| 222 | * if the value is not valid | |
| 223 | */ | |
| 224 | public void setDisplayname(String cooked) | |
| 225 | throws AccessPoemException, ValidationPoemException { | |
| 226 | 0 | _getDeliveryZoneTable().getDisplaynameColumn(). |
| 227 | getType().assertValidCooked(cooked); | |
| 228 | 0 | writeLock(); |
| 229 | 0 | setDisplayname_unsafe(cooked); |
| 230 | 0 | } |
| 231 | ||
| 232 | ||
| 233 | /** | |
| 234 | * Retrieves the <code>Displayname</code> value as a <code>Field</code> | |
| 235 | * from this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 236 | * | |
| 237 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 238 | * @throws AccessPoemException | |
| 239 | * if the current <code>AccessToken</code> | |
| 240 | * does not confer write access rights | |
| 241 | * @return the String displayname | |
| 242 | */ | |
| 243 | public Field getDisplaynameField() throws AccessPoemException { | |
| 244 | 0 | Column c = _getDeliveryZoneTable().getDisplaynameColumn(); |
| 245 | 0 | return new Field(c.getRaw(this), c); |
| 246 | } | |
| 247 | ||
| 248 | ||
| 249 | /** | |
| 250 | * Retrieves the <code>Displayorder</code> value, without locking, | |
| 251 | * for this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 252 | * | |
| 253 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 254 | * @return the Integer displayorder | |
| 255 | */ | |
| 256 | public Integer getDisplayorder_unsafe() { | |
| 257 | 0 | return displayorder; |
| 258 | } | |
| 259 | ||
| 260 | ||
| 261 | /** | |
| 262 | * Sets the <code>Displayorder</code> value directly, without checking, | |
| 263 | * for this DeliveryZone <code>Persistent</code>. | |
| 264 | * | |
| 265 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 266 | * @param cooked the pre-validated value to set | |
| 267 | */ | |
| 268 | public void setDisplayorder_unsafe(Integer cooked) { | |
| 269 | 0 | displayorder = cooked; |
| 270 | 0 | } |
| 271 | ||
| 272 | /** | |
| 273 | * Retrieves the Displayorder value, with locking, for this | |
| 274 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 275 | * | |
| 276 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 277 | * @throws AccessPoemException | |
| 278 | * if the current <code>AccessToken</code> | |
| 279 | * does not confer write access rights | |
| 280 | * @return the value of the field <code>Displayorder</code> for this | |
| 281 | * <code>DeliveryZone</code> <code>Persistent</code> | |
| 282 | */ | |
| 283 | ||
| 284 | public Integer getDisplayorder() | |
| 285 | throws AccessPoemException { | |
| 286 | 0 | readLock(); |
| 287 | 0 | return getDisplayorder_unsafe(); |
| 288 | } | |
| 289 | ||
| 290 | ||
| 291 | /** | |
| 292 | * Sets the <code>Displayorder</code> value, with checking, for this | |
| 293 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 294 | * | |
| 295 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 296 | * @param cooked a validated <code>int</code> | |
| 297 | * @throws AccessPoemException | |
| 298 | * if the current <code>AccessToken</code> | |
| 299 | * does not confer write access rights | |
| 300 | * @throws ValidationPoemException | |
| 301 | * if the value is not valid | |
| 302 | */ | |
| 303 | public void setDisplayorder(Integer cooked) | |
| 304 | throws AccessPoemException, ValidationPoemException { | |
| 305 | 0 | _getDeliveryZoneTable().getDisplayorderColumn(). |
| 306 | getType().assertValidCooked(cooked); | |
| 307 | 0 | writeLock(); |
| 308 | 0 | setDisplayorder_unsafe(cooked); |
| 309 | 0 | } |
| 310 | ||
| 311 | /** | |
| 312 | * Sets the <code>Displayorder</code> value, with checking, for this | |
| 313 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 314 | * | |
| 315 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
| 316 | * @param cooked a validated <code>int</code> | |
| 317 | * @throws AccessPoemException | |
| 318 | * if the current <code>AccessToken</code> | |
| 319 | * does not confer write access rights | |
| 320 | * @throws ValidationPoemException | |
| 321 | * if the value is not valid | |
| 322 | */ | |
| 323 | ||
| 324 | public final void setDisplayorder(int cooked) | |
| 325 | throws AccessPoemException, ValidationPoemException { | |
| 326 | 0 | setDisplayorder(new Integer(cooked)); |
| 327 | 0 | } |
| 328 | ||
| 329 | ||
| 330 | /** | |
| 331 | * Retrieves the <code>Displayorder</code> value as a <code>Field</code> | |
| 332 | * from this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 333 | * | |
| 334 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 335 | * @throws AccessPoemException | |
| 336 | * if the current <code>AccessToken</code> | |
| 337 | * does not confer write access rights | |
| 338 | * @return the Integer displayorder | |
| 339 | */ | |
| 340 | public Field getDisplayorderField() throws AccessPoemException { | |
| 341 | 0 | Column c = _getDeliveryZoneTable().getDisplayorderColumn(); |
| 342 | 0 | return new Field(c.getRaw(this), c); |
| 343 | } | |
| 344 | ||
| 345 | ||
| 346 | /** | |
| 347 | * Retrieves the <code>ChargeByValue</code> value, without locking, | |
| 348 | * for this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 349 | * | |
| 350 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 351 | * @return the Boolean chargeByValue | |
| 352 | */ | |
| 353 | public Boolean getChargeByValue_unsafe() { | |
| 354 | 0 | return chargeByValue; |
| 355 | } | |
| 356 | ||
| 357 | ||
| 358 | /** | |
| 359 | * Sets the <code>ChargeByValue</code> value directly, without checking, | |
| 360 | * for this DeliveryZone <code>Persistent</code>. | |
| 361 | * | |
| 362 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 363 | * @param cooked the pre-validated value to set | |
| 364 | */ | |
| 365 | public void setChargeByValue_unsafe(Boolean cooked) { | |
| 366 | 0 | chargeByValue = cooked; |
| 367 | 0 | } |
| 368 | ||
| 369 | /** | |
| 370 | * Retrieves the ChargeByValue value, with locking, for this | |
| 371 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 372 | * Field description: | |
| 373 | * Charge by value for deliveries to this zone? | |
| 374 | * | |
| 375 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 376 | * @throws AccessPoemException | |
| 377 | * if the current <code>AccessToken</code> | |
| 378 | * does not confer write access rights | |
| 379 | * @return the value of the field <code>ChargeByValue</code> for this | |
| 380 | * <code>DeliveryZone</code> <code>Persistent</code> | |
| 381 | */ | |
| 382 | ||
| 383 | public Boolean getChargeByValue() | |
| 384 | throws AccessPoemException { | |
| 385 | 0 | readLock(); |
| 386 | 0 | return getChargeByValue_unsafe(); |
| 387 | } | |
| 388 | ||
| 389 | ||
| 390 | /** | |
| 391 | * Sets the <code>ChargeByValue</code> value, with checking, for this | |
| 392 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 393 | * Field description: | |
| 394 | * Charge by value for deliveries to this zone? | |
| 395 | * | |
| 396 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 397 | * @param cooked a validated <code>int</code> | |
| 398 | * @throws AccessPoemException | |
| 399 | * if the current <code>AccessToken</code> | |
| 400 | * does not confer write access rights | |
| 401 | * @throws ValidationPoemException | |
| 402 | * if the value is not valid | |
| 403 | */ | |
| 404 | public void setChargeByValue(Boolean cooked) | |
| 405 | throws AccessPoemException, ValidationPoemException { | |
| 406 | 0 | _getDeliveryZoneTable().getChargeByValueColumn(). |
| 407 | getType().assertValidCooked(cooked); | |
| 408 | 0 | writeLock(); |
| 409 | 0 | setChargeByValue_unsafe(cooked); |
| 410 | 0 | } |
| 411 | ||
| 412 | /** | |
| 413 | * Sets the <code>ChargeByValue</code> value, with checking, | |
| 414 | * from a <code>boolean</code>, for this | |
| 415 | * <code>DeliveryZone</code> <code>Persistent</code>. | |
| 416 | * Field description: | |
| 417 | * Charge by value for deliveries to this zone? | |
| 418 | * | |
| 419 | * | |
| 420 | * @generator org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods | |
| 421 | * @param cooked a <code>boolean</code> | |
| 422 | * @throws AccessPoemException | |
| 423 | * if the current <code>AccessToken</code> | |
| 424 | * does not confer write access rights | |
| 425 | * @throws ValidationPoemException | |
| 426 | * if the value is not valid | |
| 427 | */ | |
| 428 | ||
| 429 | public final void setChargeByValue(boolean cooked) | |
| 430 | throws AccessPoemException, ValidationPoemException { | |
| 431 | 0 | setChargeByValue(cooked ? Boolean.TRUE : Boolean.FALSE); |
| 432 | 0 | } |
| 433 | ||
| 434 | ||
| 435 | /** | |
| 436 | * Retrieves the <code>ChargeByValue</code> value as a <code>Field</code> | |
| 437 | * from this <code>DeliveryZone</code> <code>Persistent</code>. | |
| 438 | * | |
| 439 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 440 | * @throws AccessPoemException | |
| 441 | * if the current <code>AccessToken</code> | |
| 442 | * does not confer write access rights | |
| 443 | * @return the Boolean chargeByValue | |
| 444 | */ | |
| 445 | public Field getChargeByValueField() throws AccessPoemException { | |
| 446 | 0 | Column c = _getDeliveryZoneTable().getChargeByValueColumn(); |
| 447 | 0 | return new Field(c.getRaw(this), c); |
| 448 | } | |
| 449 | } | |
| 450 |