| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| StockTransactionBase |
|
| 1.0350877192982457;1.035 |
| 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 java.sql.Date; | |
| 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.JammyjoesDatabaseTables; | |
| 14 | import org.paneris.jammyjoes.model.Product; | |
| 15 | import org.paneris.jammyjoes.model.StockTransactionTable; | |
| 16 | import org.paneris.jammyjoes.model.StockTransactionType; | |
| 17 | ||
| 18 | ||
| 19 | /** | |
| 20 | * Melati POEM generated abstract base class for a <code>Persistent</code> | |
| 21 | * <code>StockTransaction</code> Object. | |
| 22 | * | |
| 23 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 24 | */ | |
| 25 | 0 | public abstract class StockTransactionBase extends JdbcPersistent { |
| 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>StockTransactionTable</code> table | |
| 41 | * which this <code>Persistent</code> is from. | |
| 42 | * | |
| 43 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 44 | * @return the StockTransactionTable | |
| 45 | */ | |
| 46 | public StockTransactionTable getStockTransactionTable() { | |
| 47 | 0 | return (StockTransactionTable)getTable(); |
| 48 | } | |
| 49 | ||
| 50 | private StockTransactionTable _getStockTransactionTable() { | |
| 51 | 0 | return (StockTransactionTable)getTable(); |
| 52 | } | |
| 53 | ||
| 54 | // Fields in this table | |
| 55 | /** | |
| 56 | * id | |
| 57 | */ | |
| 58 | protected Integer id; | |
| 59 | /** | |
| 60 | * type | |
| 61 | */ | |
| 62 | protected Integer type; | |
| 63 | /** | |
| 64 | * Date - Leave blank for today's date | |
| 65 | */ | |
| 66 | protected Date date; | |
| 67 | /** | |
| 68 | * product | |
| 69 | */ | |
| 70 | protected Integer product; | |
| 71 | /** | |
| 72 | * Quantity | |
| 73 | */ | |
| 74 | protected Integer quantity; | |
| 75 | /** | |
| 76 | * Cost Price - Leave blank for purchases and stock ajustments | |
| 77 | */ | |
| 78 | protected Double costprice; | |
| 79 | /** | |
| 80 | * Retail Price inc VAT (if VAT is payable) - Leave blank for purchases and | |
| 81 | * stock ajustments | |
| 82 | */ | |
| 83 | protected Double retailpriceincvat; | |
| 84 | /** | |
| 85 | * Exempt from VAT? - Leave blank for purchases and stock ajustments | |
| 86 | */ | |
| 87 | protected Boolean vatexempt; | |
| 88 | /** | |
| 89 | * comment - Comment | |
| 90 | */ | |
| 91 | protected String comment; | |
| 92 | ||
| 93 | ||
| 94 | /** | |
| 95 | * Retrieves the <code>Id</code> value, without locking, | |
| 96 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 97 | * | |
| 98 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 99 | * @return the Integer id | |
| 100 | */ | |
| 101 | public Integer getId_unsafe() { | |
| 102 | 0 | return id; |
| 103 | } | |
| 104 | ||
| 105 | ||
| 106 | /** | |
| 107 | * Sets the <code>Id</code> value directly, without checking, | |
| 108 | * for this StockTransaction <code>Persistent</code>. | |
| 109 | * | |
| 110 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 111 | * @param cooked the pre-validated value to set | |
| 112 | */ | |
| 113 | public void setId_unsafe(Integer cooked) { | |
| 114 | 0 | id = cooked; |
| 115 | 0 | } |
| 116 | ||
| 117 | /** | |
| 118 | * Retrieves the Id value, with locking, for this | |
| 119 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 120 | * | |
| 121 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 122 | * @throws AccessPoemException | |
| 123 | * if the current <code>AccessToken</code> | |
| 124 | * does not confer write access rights | |
| 125 | * @return the value of the field <code>Id</code> for this | |
| 126 | * <code>StockTransaction</code> <code>Persistent</code> | |
| 127 | */ | |
| 128 | ||
| 129 | public Integer getId() | |
| 130 | throws AccessPoemException { | |
| 131 | 0 | readLock(); |
| 132 | 0 | return getId_unsafe(); |
| 133 | } | |
| 134 | ||
| 135 | ||
| 136 | /** | |
| 137 | * Sets the <code>Id</code> value, with checking, for this | |
| 138 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 139 | * | |
| 140 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 141 | * @param cooked a validated <code>int</code> | |
| 142 | * @throws AccessPoemException | |
| 143 | * if the current <code>AccessToken</code> | |
| 144 | * does not confer write access rights | |
| 145 | * @throws ValidationPoemException | |
| 146 | * if the value is not valid | |
| 147 | */ | |
| 148 | public void setId(Integer cooked) | |
| 149 | throws AccessPoemException, ValidationPoemException { | |
| 150 | 0 | _getStockTransactionTable().getIdColumn(). |
| 151 | getType().assertValidCooked(cooked); | |
| 152 | 0 | writeLock(); |
| 153 | 0 | setId_unsafe(cooked); |
| 154 | 0 | } |
| 155 | ||
| 156 | /** | |
| 157 | * Sets the <code>Id</code> value, with checking, for this | |
| 158 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 159 | * | |
| 160 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
| 161 | * @param cooked a validated <code>int</code> | |
| 162 | * @throws AccessPoemException | |
| 163 | * if the current <code>AccessToken</code> | |
| 164 | * does not confer write access rights | |
| 165 | * @throws ValidationPoemException | |
| 166 | * if the value is not valid | |
| 167 | */ | |
| 168 | ||
| 169 | public final void setId(int cooked) | |
| 170 | throws AccessPoemException, ValidationPoemException { | |
| 171 | 0 | setId(new Integer(cooked)); |
| 172 | 0 | } |
| 173 | ||
| 174 | ||
| 175 | /** | |
| 176 | * Retrieves the <code>Id</code> value as a <code>Field</code> | |
| 177 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 178 | * | |
| 179 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 180 | * @throws AccessPoemException | |
| 181 | * if the current <code>AccessToken</code> | |
| 182 | * does not confer write access rights | |
| 183 | * @return the Integer id | |
| 184 | */ | |
| 185 | public Field getIdField() throws AccessPoemException { | |
| 186 | 0 | Column c = _getStockTransactionTable().getIdColumn(); |
| 187 | 0 | return new Field(c.getRaw(this), c); |
| 188 | } | |
| 189 | ||
| 190 | ||
| 191 | /** | |
| 192 | * Retrieves the <code>Type</code> value, without locking, | |
| 193 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 194 | * | |
| 195 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 196 | * @return the Integer type | |
| 197 | */ | |
| 198 | public Integer getType_unsafe() { | |
| 199 | 0 | return type; |
| 200 | } | |
| 201 | ||
| 202 | ||
| 203 | /** | |
| 204 | * Sets the <code>Type</code> value directly, without checking, | |
| 205 | * for this StockTransaction <code>Persistent</code>. | |
| 206 | * | |
| 207 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 208 | * @param cooked the pre-validated value to set | |
| 209 | */ | |
| 210 | public void setType_unsafe(Integer cooked) { | |
| 211 | 0 | type = cooked; |
| 212 | 0 | } |
| 213 | ||
| 214 | /** | |
| 215 | * Retrieves the Table Row Object ID. | |
| 216 | * | |
| 217 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 218 | * @throws AccessPoemException | |
| 219 | * if the current <code>AccessToken</code> | |
| 220 | * does not confer read access rights | |
| 221 | * @return the TROID as an <code>Integer</code> | |
| 222 | */ | |
| 223 | ||
| 224 | public Integer getTypeTroid() | |
| 225 | throws AccessPoemException { | |
| 226 | 0 | readLock(); |
| 227 | 0 | return getType_unsafe(); |
| 228 | } | |
| 229 | ||
| 230 | ||
| 231 | /** | |
| 232 | * Sets the Table Row Object ID. | |
| 233 | * | |
| 234 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 235 | * @param raw a Table Row Object Id | |
| 236 | * @throws AccessPoemException | |
| 237 | * if the current <code>AccessToken</code> | |
| 238 | * does not confer write access rights | |
| 239 | */ | |
| 240 | public void setTypeTroid(Integer raw) | |
| 241 | throws AccessPoemException { | |
| 242 | 0 | setType(raw == null ? null : |
| 243 | getJammyjoesDatabaseTables().getStockTransactionTypeTable().getStockTransactionTypeObject(raw)); | |
| 244 | 0 | } |
| 245 | ||
| 246 | ||
| 247 | /** | |
| 248 | * Retrieves the <code>Type</code> object referred to. | |
| 249 | * | |
| 250 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 251 | * @throws AccessPoemException | |
| 252 | * if the current <code>AccessToken</code> | |
| 253 | * does not confer read access rights | |
| 254 | * @throws NoSuchRowPoemException | |
| 255 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
| 256 | * @return the <code>Type</code> as a <code>StockTransactionType</code> | |
| 257 | */ | |
| 258 | public StockTransactionType getType() | |
| 259 | throws AccessPoemException, NoSuchRowPoemException { | |
| 260 | 0 | Integer troid = getTypeTroid(); |
| 261 | 0 | return troid == null ? null : |
| 262 | getJammyjoesDatabaseTables().getStockTransactionTypeTable().getStockTransactionTypeObject(troid); | |
| 263 | } | |
| 264 | ||
| 265 | ||
| 266 | /** | |
| 267 | * Set the Type. | |
| 268 | * | |
| 269 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 270 | * @param cooked a validated <code>StockTransactionType</code> | |
| 271 | * @throws AccessPoemException | |
| 272 | * if the current <code>AccessToken</code> | |
| 273 | * does not confer write access rights | |
| 274 | */ | |
| 275 | public void setType(StockTransactionType cooked) | |
| 276 | throws AccessPoemException { | |
| 277 | 0 | _getStockTransactionTable(). |
| 278 | getTypeColumn(). | |
| 279 | getType().assertValidCooked(cooked); | |
| 280 | 0 | writeLock(); |
| 281 | 0 | if (cooked == null) |
| 282 | 0 | setType_unsafe(null); |
| 283 | else { | |
| 284 | 0 | cooked.existenceLock(); |
| 285 | 0 | setType_unsafe(cooked.troid()); |
| 286 | } | |
| 287 | 0 | } |
| 288 | ||
| 289 | ||
| 290 | /** | |
| 291 | * Retrieves the <code>Type</code> value as a <code>Field</code> | |
| 292 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 293 | * | |
| 294 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 295 | * @throws AccessPoemException | |
| 296 | * if the current <code>AccessToken</code> | |
| 297 | * does not confer write access rights | |
| 298 | * @return the Integer type | |
| 299 | */ | |
| 300 | public Field getTypeField() throws AccessPoemException { | |
| 301 | 0 | Column c = _getStockTransactionTable().getTypeColumn(); |
| 302 | 0 | return new Field(c.getRaw(this), c); |
| 303 | } | |
| 304 | ||
| 305 | ||
| 306 | /** | |
| 307 | * Retrieves the <code>Date</code> value, without locking, | |
| 308 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 309 | * | |
| 310 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 311 | * @return the Date date | |
| 312 | */ | |
| 313 | public Date getDate_unsafe() { | |
| 314 | 0 | return date; |
| 315 | } | |
| 316 | ||
| 317 | ||
| 318 | /** | |
| 319 | * Sets the <code>Date</code> value directly, without checking, | |
| 320 | * for this StockTransaction <code>Persistent</code>. | |
| 321 | * | |
| 322 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 323 | * @param cooked the pre-validated value to set | |
| 324 | */ | |
| 325 | public void setDate_unsafe(Date cooked) { | |
| 326 | 0 | date = cooked; |
| 327 | 0 | } |
| 328 | ||
| 329 | /** | |
| 330 | * Retrieves the Date value, with locking, for this | |
| 331 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 332 | * Field description: | |
| 333 | * Leave blank for today's date | |
| 334 | * | |
| 335 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 336 | * @throws AccessPoemException | |
| 337 | * if the current <code>AccessToken</code> | |
| 338 | * does not confer write access rights | |
| 339 | * @return the value of the field <code>Date</code> for this | |
| 340 | * <code>StockTransaction</code> <code>Persistent</code> | |
| 341 | */ | |
| 342 | ||
| 343 | public Date getDate() | |
| 344 | throws AccessPoemException { | |
| 345 | 0 | readLock(); |
| 346 | 0 | return getDate_unsafe(); |
| 347 | } | |
| 348 | ||
| 349 | ||
| 350 | /** | |
| 351 | * Sets the <code>Date</code> value, with checking, for this | |
| 352 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 353 | * Field description: | |
| 354 | * Leave blank for today's date | |
| 355 | * | |
| 356 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 357 | * @param cooked a validated <code>int</code> | |
| 358 | * @throws AccessPoemException | |
| 359 | * if the current <code>AccessToken</code> | |
| 360 | * does not confer write access rights | |
| 361 | * @throws ValidationPoemException | |
| 362 | * if the value is not valid | |
| 363 | */ | |
| 364 | public void setDate(Date cooked) | |
| 365 | throws AccessPoemException, ValidationPoemException { | |
| 366 | 0 | _getStockTransactionTable().getDateColumn(). |
| 367 | getType().assertValidCooked(cooked); | |
| 368 | 0 | writeLock(); |
| 369 | 0 | setDate_unsafe(cooked); |
| 370 | 0 | } |
| 371 | ||
| 372 | ||
| 373 | /** | |
| 374 | * Retrieves the <code>Date</code> value as a <code>Field</code> | |
| 375 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 376 | * | |
| 377 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 378 | * @throws AccessPoemException | |
| 379 | * if the current <code>AccessToken</code> | |
| 380 | * does not confer write access rights | |
| 381 | * @return the Date date | |
| 382 | */ | |
| 383 | public Field getDateField() throws AccessPoemException { | |
| 384 | 0 | Column c = _getStockTransactionTable().getDateColumn(); |
| 385 | 0 | return new Field(c.getRaw(this), c); |
| 386 | } | |
| 387 | ||
| 388 | ||
| 389 | /** | |
| 390 | * Retrieves the <code>Product</code> value, without locking, | |
| 391 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 392 | * | |
| 393 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 394 | * @return the Integer product | |
| 395 | */ | |
| 396 | public Integer getProduct_unsafe() { | |
| 397 | 0 | return product; |
| 398 | } | |
| 399 | ||
| 400 | ||
| 401 | /** | |
| 402 | * Sets the <code>Product</code> value directly, without checking, | |
| 403 | * for this StockTransaction <code>Persistent</code>. | |
| 404 | * | |
| 405 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 406 | * @param cooked the pre-validated value to set | |
| 407 | */ | |
| 408 | public void setProduct_unsafe(Integer cooked) { | |
| 409 | 0 | product = cooked; |
| 410 | 0 | } |
| 411 | ||
| 412 | /** | |
| 413 | * Retrieves the Table Row Object ID. | |
| 414 | * | |
| 415 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 416 | * @throws AccessPoemException | |
| 417 | * if the current <code>AccessToken</code> | |
| 418 | * does not confer read access rights | |
| 419 | * @return the TROID as an <code>Integer</code> | |
| 420 | */ | |
| 421 | ||
| 422 | public Integer getProductTroid() | |
| 423 | throws AccessPoemException { | |
| 424 | 0 | readLock(); |
| 425 | 0 | return getProduct_unsafe(); |
| 426 | } | |
| 427 | ||
| 428 | ||
| 429 | /** | |
| 430 | * Sets the Table Row Object ID. | |
| 431 | * | |
| 432 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 433 | * @param raw a Table Row Object Id | |
| 434 | * @throws AccessPoemException | |
| 435 | * if the current <code>AccessToken</code> | |
| 436 | * does not confer write access rights | |
| 437 | */ | |
| 438 | public void setProductTroid(Integer raw) | |
| 439 | throws AccessPoemException { | |
| 440 | 0 | setProduct(raw == null ? null : |
| 441 | getJammyjoesDatabaseTables().getProductTable().getProductObject(raw)); | |
| 442 | 0 | } |
| 443 | ||
| 444 | ||
| 445 | /** | |
| 446 | * Retrieves the <code>Product</code> object referred to. | |
| 447 | * | |
| 448 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 449 | * @throws AccessPoemException | |
| 450 | * if the current <code>AccessToken</code> | |
| 451 | * does not confer read access rights | |
| 452 | * @throws NoSuchRowPoemException | |
| 453 | * if the <code>Persistent</code> has yet to be allocated a TROID | |
| 454 | * @return the <code>Product</code> as a <code>Product</code> | |
| 455 | */ | |
| 456 | public Product getProduct() | |
| 457 | throws AccessPoemException, NoSuchRowPoemException { | |
| 458 | 0 | Integer troid = getProductTroid(); |
| 459 | 0 | return troid == null ? null : |
| 460 | getJammyjoesDatabaseTables().getProductTable().getProductObject(troid); | |
| 461 | } | |
| 462 | ||
| 463 | ||
| 464 | /** | |
| 465 | * Set the Product. | |
| 466 | * | |
| 467 | * @generator org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods | |
| 468 | * @param cooked a validated <code>Product</code> | |
| 469 | * @throws AccessPoemException | |
| 470 | * if the current <code>AccessToken</code> | |
| 471 | * does not confer write access rights | |
| 472 | */ | |
| 473 | public void setProduct(Product cooked) | |
| 474 | throws AccessPoemException { | |
| 475 | 0 | _getStockTransactionTable(). |
| 476 | getProductColumn(). | |
| 477 | getType().assertValidCooked(cooked); | |
| 478 | 0 | writeLock(); |
| 479 | 0 | if (cooked == null) |
| 480 | 0 | setProduct_unsafe(null); |
| 481 | else { | |
| 482 | 0 | cooked.existenceLock(); |
| 483 | 0 | setProduct_unsafe(cooked.troid()); |
| 484 | } | |
| 485 | 0 | } |
| 486 | ||
| 487 | ||
| 488 | /** | |
| 489 | * Retrieves the <code>Product</code> value as a <code>Field</code> | |
| 490 | * from this <code>StockTransaction</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 Integer product | |
| 497 | */ | |
| 498 | public Field getProductField() throws AccessPoemException { | |
| 499 | 0 | Column c = _getStockTransactionTable().getProductColumn(); |
| 500 | 0 | return new Field(c.getRaw(this), c); |
| 501 | } | |
| 502 | ||
| 503 | ||
| 504 | /** | |
| 505 | * Retrieves the <code>Quantity</code> value, without locking, | |
| 506 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 507 | * | |
| 508 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 509 | * @return the Integer quantity | |
| 510 | */ | |
| 511 | public Integer getQuantity_unsafe() { | |
| 512 | 0 | return quantity; |
| 513 | } | |
| 514 | ||
| 515 | ||
| 516 | /** | |
| 517 | * Sets the <code>Quantity</code> value directly, without checking, | |
| 518 | * for this StockTransaction <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 setQuantity_unsafe(Integer cooked) { | |
| 524 | 0 | quantity = cooked; |
| 525 | 0 | } |
| 526 | ||
| 527 | /** | |
| 528 | * Retrieves the Quantity value, with locking, for this | |
| 529 | * <code>StockTransaction</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>Quantity</code> for this | |
| 536 | * <code>StockTransaction</code> <code>Persistent</code> | |
| 537 | */ | |
| 538 | ||
| 539 | public Integer getQuantity() | |
| 540 | throws AccessPoemException { | |
| 541 | 0 | readLock(); |
| 542 | 0 | return getQuantity_unsafe(); |
| 543 | } | |
| 544 | ||
| 545 | ||
| 546 | /** | |
| 547 | * Sets the <code>Quantity</code> value, with checking, for this | |
| 548 | * <code>StockTransaction</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 setQuantity(Integer cooked) | |
| 559 | throws AccessPoemException, ValidationPoemException { | |
| 560 | 0 | _getStockTransactionTable().getQuantityColumn(). |
| 561 | getType().assertValidCooked(cooked); | |
| 562 | 0 | writeLock(); |
| 563 | 0 | setQuantity_unsafe(cooked); |
| 564 | 0 | } |
| 565 | ||
| 566 | /** | |
| 567 | * Sets the <code>Quantity</code> value, with checking, for this | |
| 568 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 569 | * | |
| 570 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
| 571 | * @param cooked a validated <code>int</code> | |
| 572 | * @throws AccessPoemException | |
| 573 | * if the current <code>AccessToken</code> | |
| 574 | * does not confer write access rights | |
| 575 | * @throws ValidationPoemException | |
| 576 | * if the value is not valid | |
| 577 | */ | |
| 578 | ||
| 579 | public final void setQuantity(int cooked) | |
| 580 | throws AccessPoemException, ValidationPoemException { | |
| 581 | 0 | setQuantity(new Integer(cooked)); |
| 582 | 0 | } |
| 583 | ||
| 584 | ||
| 585 | /** | |
| 586 | * Retrieves the <code>Quantity</code> value as a <code>Field</code> | |
| 587 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 588 | * | |
| 589 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 590 | * @throws AccessPoemException | |
| 591 | * if the current <code>AccessToken</code> | |
| 592 | * does not confer write access rights | |
| 593 | * @return the Integer quantity | |
| 594 | */ | |
| 595 | public Field getQuantityField() throws AccessPoemException { | |
| 596 | 0 | Column c = _getStockTransactionTable().getQuantityColumn(); |
| 597 | 0 | return new Field(c.getRaw(this), c); |
| 598 | } | |
| 599 | ||
| 600 | ||
| 601 | /** | |
| 602 | * Retrieves the <code>Costprice</code> value, without locking, | |
| 603 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 604 | * | |
| 605 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 606 | * @return the Double costprice | |
| 607 | */ | |
| 608 | public Double getCostprice_unsafe() { | |
| 609 | 0 | return costprice; |
| 610 | } | |
| 611 | ||
| 612 | ||
| 613 | /** | |
| 614 | * Sets the <code>Costprice</code> value directly, without checking, | |
| 615 | * for this StockTransaction <code>Persistent</code>. | |
| 616 | * | |
| 617 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 618 | * @param cooked the pre-validated value to set | |
| 619 | */ | |
| 620 | public void setCostprice_unsafe(Double cooked) { | |
| 621 | 0 | costprice = cooked; |
| 622 | 0 | } |
| 623 | ||
| 624 | /** | |
| 625 | * Retrieves the Costprice value, with locking, for this | |
| 626 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 627 | * Field description: | |
| 628 | * Leave blank for purchases and stock ajustments | |
| 629 | * | |
| 630 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 631 | * @throws AccessPoemException | |
| 632 | * if the current <code>AccessToken</code> | |
| 633 | * does not confer write access rights | |
| 634 | * @return the value of the field <code>Costprice</code> for this | |
| 635 | * <code>StockTransaction</code> <code>Persistent</code> | |
| 636 | */ | |
| 637 | ||
| 638 | public Double getCostprice() | |
| 639 | throws AccessPoemException { | |
| 640 | 0 | readLock(); |
| 641 | 0 | return getCostprice_unsafe(); |
| 642 | } | |
| 643 | ||
| 644 | ||
| 645 | /** | |
| 646 | * Sets the <code>Costprice</code> value, with checking, for this | |
| 647 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 648 | * Field description: | |
| 649 | * Leave blank for purchases and stock ajustments | |
| 650 | * | |
| 651 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 652 | * @param cooked a validated <code>int</code> | |
| 653 | * @throws AccessPoemException | |
| 654 | * if the current <code>AccessToken</code> | |
| 655 | * does not confer write access rights | |
| 656 | * @throws ValidationPoemException | |
| 657 | * if the value is not valid | |
| 658 | */ | |
| 659 | public void setCostprice(Double cooked) | |
| 660 | throws AccessPoemException, ValidationPoemException { | |
| 661 | 0 | _getStockTransactionTable().getCostpriceColumn(). |
| 662 | getType().assertValidCooked(cooked); | |
| 663 | 0 | writeLock(); |
| 664 | 0 | setCostprice_unsafe(cooked); |
| 665 | 0 | } |
| 666 | ||
| 667 | /** | |
| 668 | * Sets the <code>Costprice</code> value, with checking, for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 669 | * Field description: | |
| 670 | * Leave blank for purchases and stock ajustments | |
| 671 | * | |
| 672 | * | |
| 673 | * @generator org.melati.poem.prepro.DoubleFieldDef#generateBaseMethods | |
| 674 | * @param cooked a validated <code>int</code> | |
| 675 | * @throws AccessPoemException | |
| 676 | * if the current <code>AccessToken</code> | |
| 677 | * does not confer write access rights | |
| 678 | * @throws ValidationPoemException | |
| 679 | * if the value is not valid | |
| 680 | */ | |
| 681 | ||
| 682 | public final void setCostprice(double cooked) | |
| 683 | throws AccessPoemException, ValidationPoemException { | |
| 684 | 0 | setCostprice(new Double(cooked)); |
| 685 | 0 | } |
| 686 | ||
| 687 | ||
| 688 | /** | |
| 689 | * Retrieves the <code>Costprice</code> value as a <code>Field</code> | |
| 690 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 691 | * | |
| 692 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 693 | * @throws AccessPoemException | |
| 694 | * if the current <code>AccessToken</code> | |
| 695 | * does not confer write access rights | |
| 696 | * @return the Double costprice | |
| 697 | */ | |
| 698 | public Field getCostpriceField() throws AccessPoemException { | |
| 699 | 0 | Column c = _getStockTransactionTable().getCostpriceColumn(); |
| 700 | 0 | return new Field(c.getRaw(this), c); |
| 701 | } | |
| 702 | ||
| 703 | ||
| 704 | /** | |
| 705 | * Retrieves the <code>Retailpriceincvat</code> value, without locking, | |
| 706 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 707 | * | |
| 708 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 709 | * @return the Double retailpriceincvat | |
| 710 | */ | |
| 711 | public Double getRetailpriceincvat_unsafe() { | |
| 712 | 0 | return retailpriceincvat; |
| 713 | } | |
| 714 | ||
| 715 | ||
| 716 | /** | |
| 717 | * Sets the <code>Retailpriceincvat</code> value directly, without checking, | |
| 718 | * for this StockTransaction <code>Persistent</code>. | |
| 719 | * | |
| 720 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 721 | * @param cooked the pre-validated value to set | |
| 722 | */ | |
| 723 | public void setRetailpriceincvat_unsafe(Double cooked) { | |
| 724 | 0 | retailpriceincvat = cooked; |
| 725 | 0 | } |
| 726 | ||
| 727 | /** | |
| 728 | * Retrieves the Retailpriceincvat value, with locking, for this | |
| 729 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 730 | * Field description: | |
| 731 | * Leave blank for purchases and stock ajustments | |
| 732 | * | |
| 733 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 734 | * @throws AccessPoemException | |
| 735 | * if the current <code>AccessToken</code> | |
| 736 | * does not confer write access rights | |
| 737 | * @return the value of the field <code>Retailpriceincvat</code> for this | |
| 738 | * <code>StockTransaction</code> <code>Persistent</code> | |
| 739 | */ | |
| 740 | ||
| 741 | public Double getRetailpriceincvat() | |
| 742 | throws AccessPoemException { | |
| 743 | 0 | readLock(); |
| 744 | 0 | return getRetailpriceincvat_unsafe(); |
| 745 | } | |
| 746 | ||
| 747 | ||
| 748 | /** | |
| 749 | * Sets the <code>Retailpriceincvat</code> value, with checking, for this | |
| 750 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 751 | * Field description: | |
| 752 | * Leave blank for purchases and stock ajustments | |
| 753 | * | |
| 754 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 755 | * @param cooked a validated <code>int</code> | |
| 756 | * @throws AccessPoemException | |
| 757 | * if the current <code>AccessToken</code> | |
| 758 | * does not confer write access rights | |
| 759 | * @throws ValidationPoemException | |
| 760 | * if the value is not valid | |
| 761 | */ | |
| 762 | public void setRetailpriceincvat(Double cooked) | |
| 763 | throws AccessPoemException, ValidationPoemException { | |
| 764 | 0 | _getStockTransactionTable().getRetailpriceincvatColumn(). |
| 765 | getType().assertValidCooked(cooked); | |
| 766 | 0 | writeLock(); |
| 767 | 0 | setRetailpriceincvat_unsafe(cooked); |
| 768 | 0 | } |
| 769 | ||
| 770 | /** | |
| 771 | * Sets the <code>Retailpriceincvat</code> value, with checking, for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 772 | * Field description: | |
| 773 | * Leave blank for purchases and stock ajustments | |
| 774 | * | |
| 775 | * | |
| 776 | * @generator org.melati.poem.prepro.DoubleFieldDef#generateBaseMethods | |
| 777 | * @param cooked a validated <code>int</code> | |
| 778 | * @throws AccessPoemException | |
| 779 | * if the current <code>AccessToken</code> | |
| 780 | * does not confer write access rights | |
| 781 | * @throws ValidationPoemException | |
| 782 | * if the value is not valid | |
| 783 | */ | |
| 784 | ||
| 785 | public final void setRetailpriceincvat(double cooked) | |
| 786 | throws AccessPoemException, ValidationPoemException { | |
| 787 | 0 | setRetailpriceincvat(new Double(cooked)); |
| 788 | 0 | } |
| 789 | ||
| 790 | ||
| 791 | /** | |
| 792 | * Retrieves the <code>Retailpriceincvat</code> value as a <code>Field</code> | |
| 793 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 794 | * | |
| 795 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 796 | * @throws AccessPoemException | |
| 797 | * if the current <code>AccessToken</code> | |
| 798 | * does not confer write access rights | |
| 799 | * @return the Double retailpriceincvat | |
| 800 | */ | |
| 801 | public Field getRetailpriceincvatField() throws AccessPoemException { | |
| 802 | 0 | Column c = _getStockTransactionTable().getRetailpriceincvatColumn(); |
| 803 | 0 | return new Field(c.getRaw(this), c); |
| 804 | } | |
| 805 | ||
| 806 | ||
| 807 | /** | |
| 808 | * Retrieves the <code>Vatexempt</code> value, without locking, | |
| 809 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 810 | * | |
| 811 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 812 | * @return the Boolean vatexempt | |
| 813 | */ | |
| 814 | public Boolean getVatexempt_unsafe() { | |
| 815 | 0 | return vatexempt; |
| 816 | } | |
| 817 | ||
| 818 | ||
| 819 | /** | |
| 820 | * Sets the <code>Vatexempt</code> value directly, without checking, | |
| 821 | * for this StockTransaction <code>Persistent</code>. | |
| 822 | * | |
| 823 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 824 | * @param cooked the pre-validated value to set | |
| 825 | */ | |
| 826 | public void setVatexempt_unsafe(Boolean cooked) { | |
| 827 | 0 | vatexempt = cooked; |
| 828 | 0 | } |
| 829 | ||
| 830 | /** | |
| 831 | * Retrieves the Vatexempt value, with locking, for this | |
| 832 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 833 | * Field description: | |
| 834 | * Leave blank for purchases and stock ajustments | |
| 835 | * | |
| 836 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 837 | * @throws AccessPoemException | |
| 838 | * if the current <code>AccessToken</code> | |
| 839 | * does not confer write access rights | |
| 840 | * @return the value of the field <code>Vatexempt</code> for this | |
| 841 | * <code>StockTransaction</code> <code>Persistent</code> | |
| 842 | */ | |
| 843 | ||
| 844 | public Boolean getVatexempt() | |
| 845 | throws AccessPoemException { | |
| 846 | 0 | readLock(); |
| 847 | 0 | return getVatexempt_unsafe(); |
| 848 | } | |
| 849 | ||
| 850 | ||
| 851 | /** | |
| 852 | * Sets the <code>Vatexempt</code> value, with checking, for this | |
| 853 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 854 | * Field description: | |
| 855 | * Leave blank for purchases and stock ajustments | |
| 856 | * | |
| 857 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 858 | * @param cooked a validated <code>int</code> | |
| 859 | * @throws AccessPoemException | |
| 860 | * if the current <code>AccessToken</code> | |
| 861 | * does not confer write access rights | |
| 862 | * @throws ValidationPoemException | |
| 863 | * if the value is not valid | |
| 864 | */ | |
| 865 | public void setVatexempt(Boolean cooked) | |
| 866 | throws AccessPoemException, ValidationPoemException { | |
| 867 | 0 | _getStockTransactionTable().getVatexemptColumn(). |
| 868 | getType().assertValidCooked(cooked); | |
| 869 | 0 | writeLock(); |
| 870 | 0 | setVatexempt_unsafe(cooked); |
| 871 | 0 | } |
| 872 | ||
| 873 | /** | |
| 874 | * Sets the <code>Vatexempt</code> value, with checking, | |
| 875 | * from a <code>boolean</code>, for this | |
| 876 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 877 | * Field description: | |
| 878 | * Leave blank for purchases and stock ajustments | |
| 879 | * | |
| 880 | * | |
| 881 | * @generator org.melati.poem.prepro.BooleanFieldDef#generateBaseMethods | |
| 882 | * @param cooked a <code>boolean</code> | |
| 883 | * @throws AccessPoemException | |
| 884 | * if the current <code>AccessToken</code> | |
| 885 | * does not confer write access rights | |
| 886 | * @throws ValidationPoemException | |
| 887 | * if the value is not valid | |
| 888 | */ | |
| 889 | ||
| 890 | public final void setVatexempt(boolean cooked) | |
| 891 | throws AccessPoemException, ValidationPoemException { | |
| 892 | 0 | setVatexempt(cooked ? Boolean.TRUE : Boolean.FALSE); |
| 893 | 0 | } |
| 894 | ||
| 895 | ||
| 896 | /** | |
| 897 | * Retrieves the <code>Vatexempt</code> value as a <code>Field</code> | |
| 898 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 899 | * | |
| 900 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 901 | * @throws AccessPoemException | |
| 902 | * if the current <code>AccessToken</code> | |
| 903 | * does not confer write access rights | |
| 904 | * @return the Boolean vatexempt | |
| 905 | */ | |
| 906 | public Field getVatexemptField() throws AccessPoemException { | |
| 907 | 0 | Column c = _getStockTransactionTable().getVatexemptColumn(); |
| 908 | 0 | return new Field(c.getRaw(this), c); |
| 909 | } | |
| 910 | ||
| 911 | ||
| 912 | /** | |
| 913 | * Retrieves the <code>Comment</code> value, without locking, | |
| 914 | * for this <code>StockTransaction</code> <code>Persistent</code>. | |
| 915 | * | |
| 916 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 917 | * @return the String comment | |
| 918 | */ | |
| 919 | public String getComment_unsafe() { | |
| 920 | 0 | return comment; |
| 921 | } | |
| 922 | ||
| 923 | ||
| 924 | /** | |
| 925 | * Sets the <code>Comment</code> value directly, without checking, | |
| 926 | * for this StockTransaction <code>Persistent</code>. | |
| 927 | * | |
| 928 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 929 | * @param cooked the pre-validated value to set | |
| 930 | */ | |
| 931 | public void setComment_unsafe(String cooked) { | |
| 932 | 0 | comment = cooked; |
| 933 | 0 | } |
| 934 | ||
| 935 | /** | |
| 936 | * Retrieves the Comment value, with locking, for this | |
| 937 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 938 | * Field description: | |
| 939 | * Comment | |
| 940 | * | |
| 941 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 942 | * @throws AccessPoemException | |
| 943 | * if the current <code>AccessToken</code> | |
| 944 | * does not confer write access rights | |
| 945 | * @return the value of the field <code>Comment</code> for this | |
| 946 | * <code>StockTransaction</code> <code>Persistent</code> | |
| 947 | */ | |
| 948 | ||
| 949 | public String getComment() | |
| 950 | throws AccessPoemException { | |
| 951 | 0 | readLock(); |
| 952 | 0 | return getComment_unsafe(); |
| 953 | } | |
| 954 | ||
| 955 | ||
| 956 | /** | |
| 957 | * Sets the <code>Comment</code> value, with checking, for this | |
| 958 | * <code>StockTransaction</code> <code>Persistent</code>. | |
| 959 | * Field description: | |
| 960 | * Comment | |
| 961 | * | |
| 962 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 963 | * @param cooked a validated <code>int</code> | |
| 964 | * @throws AccessPoemException | |
| 965 | * if the current <code>AccessToken</code> | |
| 966 | * does not confer write access rights | |
| 967 | * @throws ValidationPoemException | |
| 968 | * if the value is not valid | |
| 969 | */ | |
| 970 | public void setComment(String cooked) | |
| 971 | throws AccessPoemException, ValidationPoemException { | |
| 972 | 0 | _getStockTransactionTable().getCommentColumn(). |
| 973 | getType().assertValidCooked(cooked); | |
| 974 | 0 | writeLock(); |
| 975 | 0 | setComment_unsafe(cooked); |
| 976 | 0 | } |
| 977 | ||
| 978 | ||
| 979 | /** | |
| 980 | * Retrieves the <code>Comment</code> value as a <code>Field</code> | |
| 981 | * from this <code>StockTransaction</code> <code>Persistent</code>. | |
| 982 | * | |
| 983 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 984 | * @throws AccessPoemException | |
| 985 | * if the current <code>AccessToken</code> | |
| 986 | * does not confer write access rights | |
| 987 | * @return the String comment | |
| 988 | */ | |
| 989 | public Field getCommentField() throws AccessPoemException { | |
| 990 | 0 | Column c = _getStockTransactionTable().getCommentColumn(); |
| 991 | 0 | return new Field(c.getRaw(this), c); |
| 992 | } | |
| 993 | } | |
| 994 |