| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| TypeBase |
|
| 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.JammyjoesDatabaseTables; | |
| 12 | import org.paneris.jammyjoes.model.TypeTable; | |
| 13 | ||
| 14 | ||
| 15 | /** | |
| 16 | * Melati POEM generated abstract base class for a <code>Persistent</code> | |
| 17 | * <code>Type</code> Object. | |
| 18 | * | |
| 19 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 20 | */ | |
| 21 | 0 | public abstract class TypeBase 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>TypeTable</code> table | |
| 37 | * which this <code>Persistent</code> is from. | |
| 38 | * | |
| 39 | * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava | |
| 40 | * @return the TypeTable | |
| 41 | */ | |
| 42 | public TypeTable getTypeTable() { | |
| 43 | 0 | return (TypeTable)getTable(); |
| 44 | } | |
| 45 | ||
| 46 | private TypeTable _getTypeTable() { | |
| 47 | 0 | return (TypeTable)getTable(); |
| 48 | } | |
| 49 | ||
| 50 | // Fields in this table | |
| 51 | /** | |
| 52 | * id | |
| 53 | */ | |
| 54 | protected Integer id; | |
| 55 | /** | |
| 56 | * Type | |
| 57 | */ | |
| 58 | protected String type; | |
| 59 | /** | |
| 60 | * Ecentives Category | |
| 61 | */ | |
| 62 | protected String ecentives; | |
| 63 | ||
| 64 | ||
| 65 | /** | |
| 66 | * Retrieves the <code>Id</code> value, without locking, | |
| 67 | * for this <code>Type</code> <code>Persistent</code>. | |
| 68 | * | |
| 69 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 70 | * @return the Integer id | |
| 71 | */ | |
| 72 | public Integer getId_unsafe() { | |
| 73 | 0 | return id; |
| 74 | } | |
| 75 | ||
| 76 | ||
| 77 | /** | |
| 78 | * Sets the <code>Id</code> value directly, without checking, | |
| 79 | * for this Type <code>Persistent</code>. | |
| 80 | * | |
| 81 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 82 | * @param cooked the pre-validated value to set | |
| 83 | */ | |
| 84 | public void setId_unsafe(Integer cooked) { | |
| 85 | 0 | id = cooked; |
| 86 | 0 | } |
| 87 | ||
| 88 | /** | |
| 89 | * Retrieves the Id value, with locking, for this | |
| 90 | * <code>Type</code> <code>Persistent</code>. | |
| 91 | * | |
| 92 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 93 | * @throws AccessPoemException | |
| 94 | * if the current <code>AccessToken</code> | |
| 95 | * does not confer write access rights | |
| 96 | * @return the value of the field <code>Id</code> for this | |
| 97 | * <code>Type</code> <code>Persistent</code> | |
| 98 | */ | |
| 99 | ||
| 100 | public Integer getId() | |
| 101 | throws AccessPoemException { | |
| 102 | 0 | readLock(); |
| 103 | 0 | return getId_unsafe(); |
| 104 | } | |
| 105 | ||
| 106 | ||
| 107 | /** | |
| 108 | * Sets the <code>Id</code> value, with checking, for this | |
| 109 | * <code>Type</code> <code>Persistent</code>. | |
| 110 | * | |
| 111 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 112 | * @param cooked a validated <code>int</code> | |
| 113 | * @throws AccessPoemException | |
| 114 | * if the current <code>AccessToken</code> | |
| 115 | * does not confer write access rights | |
| 116 | * @throws ValidationPoemException | |
| 117 | * if the value is not valid | |
| 118 | */ | |
| 119 | public void setId(Integer cooked) | |
| 120 | throws AccessPoemException, ValidationPoemException { | |
| 121 | 0 | _getTypeTable().getIdColumn(). |
| 122 | getType().assertValidCooked(cooked); | |
| 123 | 0 | writeLock(); |
| 124 | 0 | setId_unsafe(cooked); |
| 125 | 0 | } |
| 126 | ||
| 127 | /** | |
| 128 | * Sets the <code>Id</code> value, with checking, for this | |
| 129 | * <code>Type</code> <code>Persistent</code>. | |
| 130 | * | |
| 131 | * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods | |
| 132 | * @param cooked a validated <code>int</code> | |
| 133 | * @throws AccessPoemException | |
| 134 | * if the current <code>AccessToken</code> | |
| 135 | * does not confer write access rights | |
| 136 | * @throws ValidationPoemException | |
| 137 | * if the value is not valid | |
| 138 | */ | |
| 139 | ||
| 140 | public final void setId(int cooked) | |
| 141 | throws AccessPoemException, ValidationPoemException { | |
| 142 | 0 | setId(new Integer(cooked)); |
| 143 | 0 | } |
| 144 | ||
| 145 | ||
| 146 | /** | |
| 147 | * Retrieves the <code>Id</code> value as a <code>Field</code> | |
| 148 | * from this <code>Type</code> <code>Persistent</code>. | |
| 149 | * | |
| 150 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 151 | * @throws AccessPoemException | |
| 152 | * if the current <code>AccessToken</code> | |
| 153 | * does not confer write access rights | |
| 154 | * @return the Integer id | |
| 155 | */ | |
| 156 | public Field getIdField() throws AccessPoemException { | |
| 157 | 0 | Column c = _getTypeTable().getIdColumn(); |
| 158 | 0 | return new Field(c.getRaw(this), c); |
| 159 | } | |
| 160 | ||
| 161 | ||
| 162 | /** | |
| 163 | * Retrieves the <code>Type</code> value, without locking, | |
| 164 | * for this <code>Type</code> <code>Persistent</code>. | |
| 165 | * | |
| 166 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 167 | * @return the String type | |
| 168 | */ | |
| 169 | public String getType_unsafe() { | |
| 170 | 0 | return type; |
| 171 | } | |
| 172 | ||
| 173 | ||
| 174 | /** | |
| 175 | * Sets the <code>Type</code> value directly, without checking, | |
| 176 | * for this Type <code>Persistent</code>. | |
| 177 | * | |
| 178 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 179 | * @param cooked the pre-validated value to set | |
| 180 | */ | |
| 181 | public void setType_unsafe(String cooked) { | |
| 182 | 0 | type = cooked; |
| 183 | 0 | } |
| 184 | ||
| 185 | /** | |
| 186 | * Retrieves the Type value, with locking, for this | |
| 187 | * <code>Type</code> <code>Persistent</code>. | |
| 188 | * | |
| 189 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 190 | * @throws AccessPoemException | |
| 191 | * if the current <code>AccessToken</code> | |
| 192 | * does not confer write access rights | |
| 193 | * @return the value of the field <code>Type</code> for this | |
| 194 | * <code>Type</code> <code>Persistent</code> | |
| 195 | */ | |
| 196 | ||
| 197 | public String getType() | |
| 198 | throws AccessPoemException { | |
| 199 | 0 | readLock(); |
| 200 | 0 | return getType_unsafe(); |
| 201 | } | |
| 202 | ||
| 203 | ||
| 204 | /** | |
| 205 | * Sets the <code>Type</code> value, with checking, for this | |
| 206 | * <code>Type</code> <code>Persistent</code>. | |
| 207 | * | |
| 208 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 209 | * @param cooked a validated <code>int</code> | |
| 210 | * @throws AccessPoemException | |
| 211 | * if the current <code>AccessToken</code> | |
| 212 | * does not confer write access rights | |
| 213 | * @throws ValidationPoemException | |
| 214 | * if the value is not valid | |
| 215 | */ | |
| 216 | public void setType(String cooked) | |
| 217 | throws AccessPoemException, ValidationPoemException { | |
| 218 | 0 | _getTypeTable().getTypeColumn(). |
| 219 | getType().assertValidCooked(cooked); | |
| 220 | 0 | writeLock(); |
| 221 | 0 | setType_unsafe(cooked); |
| 222 | 0 | } |
| 223 | ||
| 224 | ||
| 225 | /** | |
| 226 | * Retrieves the <code>Type</code> value as a <code>Field</code> | |
| 227 | * from this <code>Type</code> <code>Persistent</code>. | |
| 228 | * | |
| 229 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 230 | * @throws AccessPoemException | |
| 231 | * if the current <code>AccessToken</code> | |
| 232 | * does not confer write access rights | |
| 233 | * @return the String type | |
| 234 | */ | |
| 235 | public Field getTypeField() throws AccessPoemException { | |
| 236 | 0 | Column c = _getTypeTable().getTypeColumn(); |
| 237 | 0 | return new Field(c.getRaw(this), c); |
| 238 | } | |
| 239 | ||
| 240 | ||
| 241 | /** | |
| 242 | * Retrieves the <code>Ecentives</code> value, without locking, | |
| 243 | * for this <code>Type</code> <code>Persistent</code>. | |
| 244 | * | |
| 245 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 246 | * @return the String ecentives | |
| 247 | */ | |
| 248 | public String getEcentives_unsafe() { | |
| 249 | 0 | return ecentives; |
| 250 | } | |
| 251 | ||
| 252 | ||
| 253 | /** | |
| 254 | * Sets the <code>Ecentives</code> value directly, without checking, | |
| 255 | * for this Type <code>Persistent</code>. | |
| 256 | * | |
| 257 | * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods | |
| 258 | * @param cooked the pre-validated value to set | |
| 259 | */ | |
| 260 | public void setEcentives_unsafe(String cooked) { | |
| 261 | 0 | ecentives = cooked; |
| 262 | 0 | } |
| 263 | ||
| 264 | /** | |
| 265 | * Retrieves the Ecentives value, with locking, for this | |
| 266 | * <code>Type</code> <code>Persistent</code>. | |
| 267 | * | |
| 268 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 269 | * @throws AccessPoemException | |
| 270 | * if the current <code>AccessToken</code> | |
| 271 | * does not confer write access rights | |
| 272 | * @return the value of the field <code>Ecentives</code> for this | |
| 273 | * <code>Type</code> <code>Persistent</code> | |
| 274 | */ | |
| 275 | ||
| 276 | public String getEcentives() | |
| 277 | throws AccessPoemException { | |
| 278 | 0 | readLock(); |
| 279 | 0 | return getEcentives_unsafe(); |
| 280 | } | |
| 281 | ||
| 282 | ||
| 283 | /** | |
| 284 | * Sets the <code>Ecentives</code> value, with checking, for this | |
| 285 | * <code>Type</code> <code>Persistent</code>. | |
| 286 | * | |
| 287 | * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods | |
| 288 | * @param cooked a validated <code>int</code> | |
| 289 | * @throws AccessPoemException | |
| 290 | * if the current <code>AccessToken</code> | |
| 291 | * does not confer write access rights | |
| 292 | * @throws ValidationPoemException | |
| 293 | * if the value is not valid | |
| 294 | */ | |
| 295 | public void setEcentives(String cooked) | |
| 296 | throws AccessPoemException, ValidationPoemException { | |
| 297 | 0 | _getTypeTable().getEcentivesColumn(). |
| 298 | getType().assertValidCooked(cooked); | |
| 299 | 0 | writeLock(); |
| 300 | 0 | setEcentives_unsafe(cooked); |
| 301 | 0 | } |
| 302 | ||
| 303 | ||
| 304 | /** | |
| 305 | * Retrieves the <code>Ecentives</code> value as a <code>Field</code> | |
| 306 | * from this <code>Type</code> <code>Persistent</code>. | |
| 307 | * | |
| 308 | * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator | |
| 309 | * @throws AccessPoemException | |
| 310 | * if the current <code>AccessToken</code> | |
| 311 | * does not confer write access rights | |
| 312 | * @return the String ecentives | |
| 313 | */ | |
| 314 | public Field getEcentivesField() throws AccessPoemException { | |
| 315 | 0 | Column c = _getTypeTable().getEcentivesColumn(); |
| 316 | 0 | return new Field(c.getRaw(this), c); |
| 317 | } | |
| 318 | } | |
| 319 |