| 1 | |
|
| 2 | |
|
| 3 | |
package org.melati.poem.generated; |
| 4 | |
|
| 5 | |
|
| 6 | |
import org.melati.poem.AccessPoemException; |
| 7 | |
import org.melati.poem.BooleanPoemType; |
| 8 | |
import org.melati.poem.Capability; |
| 9 | |
import org.melati.poem.Column; |
| 10 | |
import org.melati.poem.Database; |
| 11 | |
import org.melati.poem.DefinitionSource; |
| 12 | |
import org.melati.poem.DisplayLevel; |
| 13 | |
import org.melati.poem.Field; |
| 14 | |
import org.melati.poem.IntegerPoemType; |
| 15 | |
import org.melati.poem.JdbcPersistent; |
| 16 | |
import org.melati.poem.Persistent; |
| 17 | |
import org.melati.poem.PoemDatabaseTables; |
| 18 | |
import org.melati.poem.PoemException; |
| 19 | |
import org.melati.poem.PoemTable; |
| 20 | |
import org.melati.poem.ReferencePoemType; |
| 21 | |
import org.melati.poem.Searchability; |
| 22 | |
import org.melati.poem.StandardIntegrityFix; |
| 23 | |
import org.melati.poem.StringPoemType; |
| 24 | |
import org.melati.poem.TableCategory; |
| 25 | |
import org.melati.poem.TableInfo; |
| 26 | |
import org.melati.poem.TroidPoemType; |
| 27 | |
import org.melati.poem.ValidationPoemException; |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
public class TableInfoTableBase<T extends TableInfo> extends PoemTable<T> { |
| 37 | |
|
| 38 | 64 | private Column<Integer> col_id = null; |
| 39 | 64 | private Column<String> col_name = null; |
| 40 | 64 | private Column<String> col_displayname = null; |
| 41 | 64 | private Column<String> col_description = null; |
| 42 | 64 | private Column<Integer> col_displayorder = null; |
| 43 | 64 | private Column<Integer> col_defaultcanread = null; |
| 44 | 64 | private Column<Integer> col_defaultcanwrite = null; |
| 45 | 64 | private Column<Integer> col_defaultcandelete = null; |
| 46 | 64 | private Column<Integer> col_cancreate = null; |
| 47 | 64 | private Column<Integer> col_cachelimit = null; |
| 48 | 64 | private Column<Boolean> col_seqcached = null; |
| 49 | 64 | private Column<Integer> col_category = null; |
| 50 | |
|
| 51 | |
|
| 52 | |
|
| 53 | |
|
| 54 | |
|
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
|
| 61 | |
public TableInfoTableBase( |
| 62 | |
Database database, String name, |
| 63 | |
DefinitionSource definitionSource) throws PoemException { |
| 64 | 64 | super(database, name, definitionSource); |
| 65 | 64 | } |
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
|
| 70 | |
|
| 71 | |
|
| 72 | |
|
| 73 | |
|
| 74 | |
public PoemDatabaseTables getPoemDatabaseTables() { |
| 75 | 205 | return (PoemDatabaseTables)getDatabase(); |
| 76 | |
} |
| 77 | |
|
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
|
| 82 | |
|
| 83 | |
|
| 84 | |
public void init() throws PoemException { |
| 85 | 41 | super.init(); |
| 86 | 41 | defineColumn(col_id = |
| 87 | |
new Column<Integer>(this, "id", |
| 88 | |
new TroidPoemType(), |
| 89 | 41 | DefinitionSource.dsd) { |
| 90 | |
public Object getCooked(Persistent g) |
| 91 | |
throws AccessPoemException, PoemException { |
| 92 | 0 | return ((TableInfo)g).getId(); |
| 93 | |
} |
| 94 | |
|
| 95 | |
public void setCooked(Persistent g, Object cooked) |
| 96 | |
throws AccessPoemException, ValidationPoemException { |
| 97 | 0 | ((TableInfo)g).setId((Integer)cooked); |
| 98 | 0 | } |
| 99 | |
|
| 100 | |
public Field<Integer> asField(Persistent g) { |
| 101 | 0 | return ((TableInfo)g).getIdField(); |
| 102 | |
} |
| 103 | |
|
| 104 | |
public boolean defaultUserEditable() { |
| 105 | 40 | return false; |
| 106 | |
} |
| 107 | |
|
| 108 | |
public boolean defaultUserCreateable() { |
| 109 | 40 | return false; |
| 110 | |
} |
| 111 | |
|
| 112 | |
public DisplayLevel defaultDisplayLevel() { |
| 113 | 80 | return DisplayLevel.detail; |
| 114 | |
} |
| 115 | |
|
| 116 | |
public int defaultDisplayOrder() { |
| 117 | 40 | return 0; |
| 118 | |
} |
| 119 | |
|
| 120 | |
public String defaultDescription() { |
| 121 | 40 | return "The Table Row Object ID"; |
| 122 | |
} |
| 123 | |
|
| 124 | |
public Object getRaw_unsafe(Persistent g) |
| 125 | |
throws AccessPoemException { |
| 126 | 1868 | return ((TableInfo)g).getId_unsafe(); |
| 127 | |
} |
| 128 | |
|
| 129 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 130 | |
throws AccessPoemException { |
| 131 | 2104 | ((TableInfo)g).setId_unsafe((Integer)raw); |
| 132 | 2104 | } |
| 133 | |
|
| 134 | |
public Object getRaw(Persistent g) |
| 135 | |
throws AccessPoemException { |
| 136 | 0 | return ((TableInfo)g).getId(); |
| 137 | |
} |
| 138 | |
|
| 139 | |
public void setRaw(Persistent g, Object raw) |
| 140 | |
throws AccessPoemException { |
| 141 | 0 | ((TableInfo)g).setId((Integer)raw); |
| 142 | 0 | } |
| 143 | |
}); |
| 144 | |
|
| 145 | 41 | defineColumn(col_name = |
| 146 | |
new Column<String>(this, "name", |
| 147 | |
new StringPoemType(false, 50), |
| 148 | 41 | DefinitionSource.dsd) { |
| 149 | |
public Object getCooked(Persistent g) |
| 150 | |
throws AccessPoemException, PoemException { |
| 151 | 0 | return ((TableInfo)g).getName(); |
| 152 | |
} |
| 153 | |
|
| 154 | |
public void setCooked(Persistent g, Object cooked) |
| 155 | |
throws AccessPoemException, ValidationPoemException { |
| 156 | 0 | ((TableInfo)g).setName((String)cooked); |
| 157 | 0 | } |
| 158 | |
|
| 159 | |
public Field<String> asField(Persistent g) { |
| 160 | 0 | return ((TableInfo)g).getNameField(); |
| 161 | |
} |
| 162 | |
|
| 163 | |
public boolean defaultUserEditable() { |
| 164 | 40 | return false; |
| 165 | |
} |
| 166 | |
|
| 167 | |
public DisplayLevel defaultDisplayLevel() { |
| 168 | 80 | return DisplayLevel.record; |
| 169 | |
} |
| 170 | |
|
| 171 | |
public Searchability defaultSearchability() { |
| 172 | 80 | return Searchability.no; |
| 173 | |
} |
| 174 | |
|
| 175 | |
public int defaultDisplayOrder() { |
| 176 | 40 | return 1; |
| 177 | |
} |
| 178 | |
|
| 179 | |
public String defaultDescription() { |
| 180 | 40 | return "A code-name for the table"; |
| 181 | |
} |
| 182 | |
|
| 183 | |
public boolean defaultUnique() { |
| 184 | 40 | return true; |
| 185 | |
} |
| 186 | |
|
| 187 | |
public Object getRaw_unsafe(Persistent g) |
| 188 | |
throws AccessPoemException { |
| 189 | 1868 | return ((TableInfo)g).getName_unsafe(); |
| 190 | |
} |
| 191 | |
|
| 192 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 193 | |
throws AccessPoemException { |
| 194 | 230 | ((TableInfo)g).setName_unsafe((String)raw); |
| 195 | 230 | } |
| 196 | |
|
| 197 | |
public Object getRaw(Persistent g) |
| 198 | |
throws AccessPoemException { |
| 199 | 0 | return ((TableInfo)g).getName(); |
| 200 | |
} |
| 201 | |
|
| 202 | |
public void setRaw(Persistent g, Object raw) |
| 203 | |
throws AccessPoemException { |
| 204 | 0 | ((TableInfo)g).setName((String)raw); |
| 205 | 0 | } |
| 206 | |
}); |
| 207 | |
|
| 208 | 41 | defineColumn(col_displayname = |
| 209 | |
new Column<String>(this, "displayname", |
| 210 | |
new StringPoemType(false, 60), |
| 211 | 41 | DefinitionSource.dsd) { |
| 212 | |
public Object getCooked(Persistent g) |
| 213 | |
throws AccessPoemException, PoemException { |
| 214 | 20 | return ((TableInfo)g).getDisplayname(); |
| 215 | |
} |
| 216 | |
|
| 217 | |
public void setCooked(Persistent g, Object cooked) |
| 218 | |
throws AccessPoemException, ValidationPoemException { |
| 219 | 0 | ((TableInfo)g).setDisplayname((String)cooked); |
| 220 | 0 | } |
| 221 | |
|
| 222 | |
public Field<String> asField(Persistent g) { |
| 223 | 0 | return ((TableInfo)g).getDisplaynameField(); |
| 224 | |
} |
| 225 | |
|
| 226 | |
public DisplayLevel defaultDisplayLevel() { |
| 227 | 80 | return DisplayLevel.primary; |
| 228 | |
} |
| 229 | |
|
| 230 | |
public Integer defaultDisplayOrderPriority() { |
| 231 | 40 | return new Integer(1); |
| 232 | |
} |
| 233 | |
|
| 234 | |
public String defaultDisplayName() { |
| 235 | 40 | return "Display name"; |
| 236 | |
} |
| 237 | |
|
| 238 | |
public int defaultDisplayOrder() { |
| 239 | 40 | return 2; |
| 240 | |
} |
| 241 | |
|
| 242 | |
public String defaultDescription() { |
| 243 | 40 | return "A user-friendly name for the table"; |
| 244 | |
} |
| 245 | |
|
| 246 | |
public Object getRaw_unsafe(Persistent g) |
| 247 | |
throws AccessPoemException { |
| 248 | 1868 | return ((TableInfo)g).getDisplayname_unsafe(); |
| 249 | |
} |
| 250 | |
|
| 251 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 252 | |
throws AccessPoemException { |
| 253 | 230 | ((TableInfo)g).setDisplayname_unsafe((String)raw); |
| 254 | 230 | } |
| 255 | |
|
| 256 | |
public Object getRaw(Persistent g) |
| 257 | |
throws AccessPoemException { |
| 258 | 0 | return ((TableInfo)g).getDisplayname(); |
| 259 | |
} |
| 260 | |
|
| 261 | |
public void setRaw(Persistent g, Object raw) |
| 262 | |
throws AccessPoemException { |
| 263 | 0 | ((TableInfo)g).setDisplayname((String)raw); |
| 264 | 0 | } |
| 265 | |
}); |
| 266 | |
|
| 267 | 41 | defineColumn(col_description = |
| 268 | |
new Column<String>(this, "description", |
| 269 | |
new StringPoemType(true, -1), |
| 270 | 41 | DefinitionSource.dsd) { |
| 271 | |
public Object getCooked(Persistent g) |
| 272 | |
throws AccessPoemException, PoemException { |
| 273 | 0 | return ((TableInfo)g).getDescription(); |
| 274 | |
} |
| 275 | |
|
| 276 | |
public void setCooked(Persistent g, Object cooked) |
| 277 | |
throws AccessPoemException, ValidationPoemException { |
| 278 | 0 | ((TableInfo)g).setDescription((String)cooked); |
| 279 | 0 | } |
| 280 | |
|
| 281 | |
public Field<String> asField(Persistent g) { |
| 282 | 0 | return ((TableInfo)g).getDescriptionField(); |
| 283 | |
} |
| 284 | |
|
| 285 | |
public DisplayLevel defaultDisplayLevel() { |
| 286 | 80 | return DisplayLevel.record; |
| 287 | |
} |
| 288 | |
|
| 289 | |
public Searchability defaultSearchability() { |
| 290 | 80 | return Searchability.no; |
| 291 | |
} |
| 292 | |
|
| 293 | |
public int defaultDisplayOrder() { |
| 294 | 40 | return 3; |
| 295 | |
} |
| 296 | |
|
| 297 | |
public String defaultDescription() { |
| 298 | 40 | return "A brief description of the table's function"; |
| 299 | |
} |
| 300 | |
|
| 301 | |
public int defaultWidth() { |
| 302 | 40 | return 50; |
| 303 | |
} |
| 304 | |
|
| 305 | |
public Object getRaw_unsafe(Persistent g) |
| 306 | |
throws AccessPoemException { |
| 307 | 1868 | return ((TableInfo)g).getDescription_unsafe(); |
| 308 | |
} |
| 309 | |
|
| 310 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 311 | |
throws AccessPoemException { |
| 312 | 230 | ((TableInfo)g).setDescription_unsafe((String)raw); |
| 313 | 230 | } |
| 314 | |
|
| 315 | |
public Object getRaw(Persistent g) |
| 316 | |
throws AccessPoemException { |
| 317 | 0 | return ((TableInfo)g).getDescription(); |
| 318 | |
} |
| 319 | |
|
| 320 | |
public void setRaw(Persistent g, Object raw) |
| 321 | |
throws AccessPoemException { |
| 322 | 0 | ((TableInfo)g).setDescription((String)raw); |
| 323 | 0 | } |
| 324 | |
}); |
| 325 | |
|
| 326 | 41 | defineColumn(col_displayorder = |
| 327 | |
new Column<Integer>(this, "displayorder", |
| 328 | |
new IntegerPoemType(false), |
| 329 | 41 | DefinitionSource.dsd) { |
| 330 | |
public Object getCooked(Persistent g) |
| 331 | |
throws AccessPoemException, PoemException { |
| 332 | 0 | return ((TableInfo)g).getDisplayorder(); |
| 333 | |
} |
| 334 | |
|
| 335 | |
public void setCooked(Persistent g, Object cooked) |
| 336 | |
throws AccessPoemException, ValidationPoemException { |
| 337 | 0 | ((TableInfo)g).setDisplayorder((Integer)cooked); |
| 338 | 0 | } |
| 339 | |
|
| 340 | |
public Field<Integer> asField(Persistent g) { |
| 341 | 0 | return ((TableInfo)g).getDisplayorderField(); |
| 342 | |
} |
| 343 | |
|
| 344 | |
public DisplayLevel defaultDisplayLevel() { |
| 345 | 80 | return DisplayLevel.summary; |
| 346 | |
} |
| 347 | |
|
| 348 | |
public Integer defaultDisplayOrderPriority() { |
| 349 | 40 | return new Integer(0); |
| 350 | |
} |
| 351 | |
|
| 352 | |
public String defaultDisplayName() { |
| 353 | 40 | return "Display order"; |
| 354 | |
} |
| 355 | |
|
| 356 | |
public int defaultDisplayOrder() { |
| 357 | 40 | return 4; |
| 358 | |
} |
| 359 | |
|
| 360 | |
public String defaultDescription() { |
| 361 | 40 | return "A rank determining where the table appears in the list of all tables"; |
| 362 | |
} |
| 363 | |
|
| 364 | |
public Object getRaw_unsafe(Persistent g) |
| 365 | |
throws AccessPoemException { |
| 366 | 1868 | return ((TableInfo)g).getDisplayorder_unsafe(); |
| 367 | |
} |
| 368 | |
|
| 369 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 370 | |
throws AccessPoemException { |
| 371 | 230 | ((TableInfo)g).setDisplayorder_unsafe((Integer)raw); |
| 372 | 230 | } |
| 373 | |
|
| 374 | |
public Object getRaw(Persistent g) |
| 375 | |
throws AccessPoemException { |
| 376 | 0 | return ((TableInfo)g).getDisplayorder(); |
| 377 | |
} |
| 378 | |
|
| 379 | |
public void setRaw(Persistent g, Object raw) |
| 380 | |
throws AccessPoemException { |
| 381 | 0 | ((TableInfo)g).setDisplayorder((Integer)raw); |
| 382 | 0 | } |
| 383 | |
}); |
| 384 | |
|
| 385 | 82 | defineColumn(col_defaultcanread = |
| 386 | |
new Column<Integer>(this, "defaultcanread", |
| 387 | 41 | new ReferencePoemType(getPoemDatabaseTables(). |
| 388 | 41 | getCapabilityTable(), true), |
| 389 | 41 | DefinitionSource.dsd) { |
| 390 | |
public Object getCooked(Persistent g) |
| 391 | |
throws AccessPoemException, PoemException { |
| 392 | 0 | return ((TableInfo)g).getDefaultcanread(); |
| 393 | |
} |
| 394 | |
|
| 395 | |
public void setCooked(Persistent g, Object cooked) |
| 396 | |
throws AccessPoemException, ValidationPoemException { |
| 397 | 0 | ((TableInfo)g).setDefaultcanread((Capability)cooked); |
| 398 | 0 | } |
| 399 | |
|
| 400 | |
public Field<Integer> asField(Persistent g) { |
| 401 | 0 | return ((TableInfo)g).getDefaultcanreadField(); |
| 402 | |
} |
| 403 | |
|
| 404 | |
public DisplayLevel defaultDisplayLevel() { |
| 405 | 80 | return DisplayLevel.record; |
| 406 | |
} |
| 407 | |
|
| 408 | |
public Searchability defaultSearchability() { |
| 409 | 80 | return Searchability.no; |
| 410 | |
} |
| 411 | |
|
| 412 | |
public String defaultDisplayName() { |
| 413 | 40 | return "Default `read' capability"; |
| 414 | |
} |
| 415 | |
|
| 416 | |
public int defaultDisplayOrder() { |
| 417 | 40 | return 5; |
| 418 | |
} |
| 419 | |
|
| 420 | |
public String defaultDescription() { |
| 421 | 40 | return "The capability required, by default, for reading the table's records"; |
| 422 | |
} |
| 423 | |
|
| 424 | |
public Object getRaw_unsafe(Persistent g) |
| 425 | |
throws AccessPoemException { |
| 426 | 1868 | return ((TableInfo)g).getDefaultcanread_unsafe(); |
| 427 | |
} |
| 428 | |
|
| 429 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 430 | |
throws AccessPoemException { |
| 431 | 230 | ((TableInfo)g).setDefaultcanread_unsafe((Integer)raw); |
| 432 | 230 | } |
| 433 | |
|
| 434 | |
public Object getRaw(Persistent g) |
| 435 | |
throws AccessPoemException { |
| 436 | 0 | return ((TableInfo)g).getDefaultcanreadTroid(); |
| 437 | |
} |
| 438 | |
|
| 439 | |
public void setRaw(Persistent g, Object raw) |
| 440 | |
throws AccessPoemException { |
| 441 | 1 | ((TableInfo)g).setDefaultcanreadTroid((Integer)raw); |
| 442 | 1 | } |
| 443 | |
|
| 444 | |
public StandardIntegrityFix defaultIntegrityFix() { |
| 445 | 40 | return StandardIntegrityFix.clear; |
| 446 | |
} |
| 447 | |
}); |
| 448 | |
|
| 449 | 82 | defineColumn(col_defaultcanwrite = |
| 450 | |
new Column<Integer>(this, "defaultcanwrite", |
| 451 | 41 | new ReferencePoemType(getPoemDatabaseTables(). |
| 452 | 41 | getCapabilityTable(), true), |
| 453 | 41 | DefinitionSource.dsd) { |
| 454 | |
public Object getCooked(Persistent g) |
| 455 | |
throws AccessPoemException, PoemException { |
| 456 | 0 | return ((TableInfo)g).getDefaultcanwrite(); |
| 457 | |
} |
| 458 | |
|
| 459 | |
public void setCooked(Persistent g, Object cooked) |
| 460 | |
throws AccessPoemException, ValidationPoemException { |
| 461 | 0 | ((TableInfo)g).setDefaultcanwrite((Capability)cooked); |
| 462 | 0 | } |
| 463 | |
|
| 464 | |
public Field<Integer> asField(Persistent g) { |
| 465 | 0 | return ((TableInfo)g).getDefaultcanwriteField(); |
| 466 | |
} |
| 467 | |
|
| 468 | |
public DisplayLevel defaultDisplayLevel() { |
| 469 | 80 | return DisplayLevel.record; |
| 470 | |
} |
| 471 | |
|
| 472 | |
public Searchability defaultSearchability() { |
| 473 | 80 | return Searchability.no; |
| 474 | |
} |
| 475 | |
|
| 476 | |
public String defaultDisplayName() { |
| 477 | 40 | return "Default `write' capability"; |
| 478 | |
} |
| 479 | |
|
| 480 | |
public int defaultDisplayOrder() { |
| 481 | 40 | return 6; |
| 482 | |
} |
| 483 | |
|
| 484 | |
public String defaultDescription() { |
| 485 | 40 | return "The capability required, by default, for updating the table's records"; |
| 486 | |
} |
| 487 | |
|
| 488 | |
public Object getRaw_unsafe(Persistent g) |
| 489 | |
throws AccessPoemException { |
| 490 | 1868 | return ((TableInfo)g).getDefaultcanwrite_unsafe(); |
| 491 | |
} |
| 492 | |
|
| 493 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 494 | |
throws AccessPoemException { |
| 495 | 230 | ((TableInfo)g).setDefaultcanwrite_unsafe((Integer)raw); |
| 496 | 230 | } |
| 497 | |
|
| 498 | |
public Object getRaw(Persistent g) |
| 499 | |
throws AccessPoemException { |
| 500 | 0 | return ((TableInfo)g).getDefaultcanwriteTroid(); |
| 501 | |
} |
| 502 | |
|
| 503 | |
public void setRaw(Persistent g, Object raw) |
| 504 | |
throws AccessPoemException { |
| 505 | 0 | ((TableInfo)g).setDefaultcanwriteTroid((Integer)raw); |
| 506 | 0 | } |
| 507 | |
|
| 508 | |
public StandardIntegrityFix defaultIntegrityFix() { |
| 509 | 40 | return StandardIntegrityFix.clear; |
| 510 | |
} |
| 511 | |
}); |
| 512 | |
|
| 513 | 82 | defineColumn(col_defaultcandelete = |
| 514 | |
new Column<Integer>(this, "defaultcandelete", |
| 515 | 41 | new ReferencePoemType(getPoemDatabaseTables(). |
| 516 | 41 | getCapabilityTable(), true), |
| 517 | 41 | DefinitionSource.dsd) { |
| 518 | |
public Object getCooked(Persistent g) |
| 519 | |
throws AccessPoemException, PoemException { |
| 520 | 0 | return ((TableInfo)g).getDefaultcandelete(); |
| 521 | |
} |
| 522 | |
|
| 523 | |
public void setCooked(Persistent g, Object cooked) |
| 524 | |
throws AccessPoemException, ValidationPoemException { |
| 525 | 0 | ((TableInfo)g).setDefaultcandelete((Capability)cooked); |
| 526 | 0 | } |
| 527 | |
|
| 528 | |
public Field<Integer> asField(Persistent g) { |
| 529 | 0 | return ((TableInfo)g).getDefaultcandeleteField(); |
| 530 | |
} |
| 531 | |
|
| 532 | |
public DisplayLevel defaultDisplayLevel() { |
| 533 | 80 | return DisplayLevel.record; |
| 534 | |
} |
| 535 | |
|
| 536 | |
public Searchability defaultSearchability() { |
| 537 | 80 | return Searchability.no; |
| 538 | |
} |
| 539 | |
|
| 540 | |
public String defaultDisplayName() { |
| 541 | 40 | return "Default `delete' capability"; |
| 542 | |
} |
| 543 | |
|
| 544 | |
public int defaultDisplayOrder() { |
| 545 | 40 | return 7; |
| 546 | |
} |
| 547 | |
|
| 548 | |
public String defaultDescription() { |
| 549 | 40 | return "The capability required, by default, for deleting the table's records"; |
| 550 | |
} |
| 551 | |
|
| 552 | |
public Object getRaw_unsafe(Persistent g) |
| 553 | |
throws AccessPoemException { |
| 554 | 1868 | return ((TableInfo)g).getDefaultcandelete_unsafe(); |
| 555 | |
} |
| 556 | |
|
| 557 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 558 | |
throws AccessPoemException { |
| 559 | 230 | ((TableInfo)g).setDefaultcandelete_unsafe((Integer)raw); |
| 560 | 230 | } |
| 561 | |
|
| 562 | |
public Object getRaw(Persistent g) |
| 563 | |
throws AccessPoemException { |
| 564 | 0 | return ((TableInfo)g).getDefaultcandeleteTroid(); |
| 565 | |
} |
| 566 | |
|
| 567 | |
public void setRaw(Persistent g, Object raw) |
| 568 | |
throws AccessPoemException { |
| 569 | 0 | ((TableInfo)g).setDefaultcandeleteTroid((Integer)raw); |
| 570 | 0 | } |
| 571 | |
|
| 572 | |
public StandardIntegrityFix defaultIntegrityFix() { |
| 573 | 40 | return StandardIntegrityFix.clear; |
| 574 | |
} |
| 575 | |
}); |
| 576 | |
|
| 577 | 82 | defineColumn(col_cancreate = |
| 578 | |
new Column<Integer>(this, "cancreate", |
| 579 | 41 | new ReferencePoemType(getPoemDatabaseTables(). |
| 580 | 41 | getCapabilityTable(), true), |
| 581 | 41 | DefinitionSource.dsd) { |
| 582 | |
public Object getCooked(Persistent g) |
| 583 | |
throws AccessPoemException, PoemException { |
| 584 | 0 | return ((TableInfo)g).getCancreate(); |
| 585 | |
} |
| 586 | |
|
| 587 | |
public void setCooked(Persistent g, Object cooked) |
| 588 | |
throws AccessPoemException, ValidationPoemException { |
| 589 | 0 | ((TableInfo)g).setCancreate((Capability)cooked); |
| 590 | 0 | } |
| 591 | |
|
| 592 | |
public Field<Integer> asField(Persistent g) { |
| 593 | 0 | return ((TableInfo)g).getCancreateField(); |
| 594 | |
} |
| 595 | |
|
| 596 | |
public DisplayLevel defaultDisplayLevel() { |
| 597 | 80 | return DisplayLevel.record; |
| 598 | |
} |
| 599 | |
|
| 600 | |
public Searchability defaultSearchability() { |
| 601 | 80 | return Searchability.no; |
| 602 | |
} |
| 603 | |
|
| 604 | |
public String defaultDisplayName() { |
| 605 | 40 | return "Default `create' capability"; |
| 606 | |
} |
| 607 | |
|
| 608 | |
public int defaultDisplayOrder() { |
| 609 | 40 | return 8; |
| 610 | |
} |
| 611 | |
|
| 612 | |
public String defaultDescription() { |
| 613 | 40 | return "The capability required, by default, for creating records in the table"; |
| 614 | |
} |
| 615 | |
|
| 616 | |
public Object getRaw_unsafe(Persistent g) |
| 617 | |
throws AccessPoemException { |
| 618 | 1868 | return ((TableInfo)g).getCancreate_unsafe(); |
| 619 | |
} |
| 620 | |
|
| 621 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 622 | |
throws AccessPoemException { |
| 623 | 230 | ((TableInfo)g).setCancreate_unsafe((Integer)raw); |
| 624 | 230 | } |
| 625 | |
|
| 626 | |
public Object getRaw(Persistent g) |
| 627 | |
throws AccessPoemException { |
| 628 | 0 | return ((TableInfo)g).getCancreateTroid(); |
| 629 | |
} |
| 630 | |
|
| 631 | |
public void setRaw(Persistent g, Object raw) |
| 632 | |
throws AccessPoemException { |
| 633 | 0 | ((TableInfo)g).setCancreateTroid((Integer)raw); |
| 634 | 0 | } |
| 635 | |
|
| 636 | |
public StandardIntegrityFix defaultIntegrityFix() { |
| 637 | 40 | return StandardIntegrityFix.clear; |
| 638 | |
} |
| 639 | |
}); |
| 640 | |
|
| 641 | 41 | defineColumn(col_cachelimit = |
| 642 | |
new Column<Integer>(this, "cachelimit", |
| 643 | |
new IntegerPoemType(true), |
| 644 | 41 | DefinitionSource.dsd) { |
| 645 | |
public Object getCooked(Persistent g) |
| 646 | |
throws AccessPoemException, PoemException { |
| 647 | 0 | return ((TableInfo)g).getCachelimit(); |
| 648 | |
} |
| 649 | |
|
| 650 | |
public void setCooked(Persistent g, Object cooked) |
| 651 | |
throws AccessPoemException, ValidationPoemException { |
| 652 | 0 | ((TableInfo)g).setCachelimit((Integer)cooked); |
| 653 | 0 | } |
| 654 | |
|
| 655 | |
public Field<Integer> asField(Persistent g) { |
| 656 | 0 | return ((TableInfo)g).getCachelimitField(); |
| 657 | |
} |
| 658 | |
|
| 659 | |
public DisplayLevel defaultDisplayLevel() { |
| 660 | 80 | return DisplayLevel.record; |
| 661 | |
} |
| 662 | |
|
| 663 | |
public Searchability defaultSearchability() { |
| 664 | 80 | return Searchability.no; |
| 665 | |
} |
| 666 | |
|
| 667 | |
public String defaultDisplayName() { |
| 668 | 40 | return "Cache size limit"; |
| 669 | |
} |
| 670 | |
|
| 671 | |
public int defaultDisplayOrder() { |
| 672 | 40 | return 9; |
| 673 | |
} |
| 674 | |
|
| 675 | |
public String defaultDescription() { |
| 676 | 40 | return "The maximum number of records from the table to keep in the cache"; |
| 677 | |
} |
| 678 | |
|
| 679 | |
public Object getRaw_unsafe(Persistent g) |
| 680 | |
throws AccessPoemException { |
| 681 | 1868 | return ((TableInfo)g).getCachelimit_unsafe(); |
| 682 | |
} |
| 683 | |
|
| 684 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 685 | |
throws AccessPoemException { |
| 686 | 230 | ((TableInfo)g).setCachelimit_unsafe((Integer)raw); |
| 687 | 230 | } |
| 688 | |
|
| 689 | |
public Object getRaw(Persistent g) |
| 690 | |
throws AccessPoemException { |
| 691 | 0 | return ((TableInfo)g).getCachelimit(); |
| 692 | |
} |
| 693 | |
|
| 694 | |
public void setRaw(Persistent g, Object raw) |
| 695 | |
throws AccessPoemException { |
| 696 | 0 | ((TableInfo)g).setCachelimit((Integer)raw); |
| 697 | 0 | } |
| 698 | |
}); |
| 699 | |
|
| 700 | 41 | defineColumn(col_seqcached = |
| 701 | |
new Column<Boolean>(this, "seqcached", |
| 702 | |
new BooleanPoemType(false), |
| 703 | 41 | DefinitionSource.dsd) { |
| 704 | |
public Object getCooked(Persistent g) |
| 705 | |
throws AccessPoemException, PoemException { |
| 706 | 0 | return ((TableInfo)g).getSeqcached(); |
| 707 | |
} |
| 708 | |
|
| 709 | |
public void setCooked(Persistent g, Object cooked) |
| 710 | |
throws AccessPoemException, ValidationPoemException { |
| 711 | 0 | ((TableInfo)g).setSeqcached((Boolean)cooked); |
| 712 | 0 | } |
| 713 | |
|
| 714 | |
public Field<Boolean> asField(Persistent g) { |
| 715 | 0 | return ((TableInfo)g).getSeqcachedField(); |
| 716 | |
} |
| 717 | |
|
| 718 | |
public DisplayLevel defaultDisplayLevel() { |
| 719 | 80 | return DisplayLevel.record; |
| 720 | |
} |
| 721 | |
|
| 722 | |
public Searchability defaultSearchability() { |
| 723 | 80 | return Searchability.no; |
| 724 | |
} |
| 725 | |
|
| 726 | |
public String defaultDisplayName() { |
| 727 | 40 | return "Record sequence cached"; |
| 728 | |
} |
| 729 | |
|
| 730 | |
public int defaultDisplayOrder() { |
| 731 | 40 | return 10; |
| 732 | |
} |
| 733 | |
|
| 734 | |
public String defaultDescription() { |
| 735 | 40 | return "Whether the display sequence for the table's records is cached"; |
| 736 | |
} |
| 737 | |
|
| 738 | |
public Object getRaw_unsafe(Persistent g) |
| 739 | |
throws AccessPoemException { |
| 740 | 1868 | return ((TableInfo)g).getSeqcached_unsafe(); |
| 741 | |
} |
| 742 | |
|
| 743 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 744 | |
throws AccessPoemException { |
| 745 | 230 | ((TableInfo)g).setSeqcached_unsafe((Boolean)raw); |
| 746 | 230 | } |
| 747 | |
|
| 748 | |
public Object getRaw(Persistent g) |
| 749 | |
throws AccessPoemException { |
| 750 | 0 | return ((TableInfo)g).getSeqcached(); |
| 751 | |
} |
| 752 | |
|
| 753 | |
public void setRaw(Persistent g, Object raw) |
| 754 | |
throws AccessPoemException { |
| 755 | 0 | ((TableInfo)g).setSeqcached((Boolean)raw); |
| 756 | 0 | } |
| 757 | |
}); |
| 758 | |
|
| 759 | 82 | defineColumn(col_category = |
| 760 | |
new Column<Integer>(this, "category", |
| 761 | 41 | new ReferencePoemType(getPoemDatabaseTables(). |
| 762 | 41 | getTableCategoryTable(), false), |
| 763 | 41 | DefinitionSource.dsd) { |
| 764 | |
public Object getCooked(Persistent g) |
| 765 | |
throws AccessPoemException, PoemException { |
| 766 | 10 | return ((TableInfo)g).getCategory(); |
| 767 | |
} |
| 768 | |
|
| 769 | |
public void setCooked(Persistent g, Object cooked) |
| 770 | |
throws AccessPoemException, ValidationPoemException { |
| 771 | 4 | ((TableInfo)g).setCategory((TableCategory)cooked); |
| 772 | 4 | } |
| 773 | |
|
| 774 | |
public Field<Integer> asField(Persistent g) { |
| 775 | 0 | return ((TableInfo)g).getCategoryField(); |
| 776 | |
} |
| 777 | |
|
| 778 | |
public DisplayLevel defaultDisplayLevel() { |
| 779 | 80 | return DisplayLevel.record; |
| 780 | |
} |
| 781 | |
|
| 782 | |
public Searchability defaultSearchability() { |
| 783 | 80 | return Searchability.primary; |
| 784 | |
} |
| 785 | |
|
| 786 | |
public int defaultDisplayOrder() { |
| 787 | 40 | return 11; |
| 788 | |
} |
| 789 | |
|
| 790 | |
public String defaultDescription() { |
| 791 | 40 | return "Which category the table falls into"; |
| 792 | |
} |
| 793 | |
|
| 794 | |
public Object getRaw_unsafe(Persistent g) |
| 795 | |
throws AccessPoemException { |
| 796 | 1868 | return ((TableInfo)g).getCategory_unsafe(); |
| 797 | |
} |
| 798 | |
|
| 799 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 800 | |
throws AccessPoemException { |
| 801 | 230 | ((TableInfo)g).setCategory_unsafe((Integer)raw); |
| 802 | 230 | } |
| 803 | |
|
| 804 | |
public Object getRaw(Persistent g) |
| 805 | |
throws AccessPoemException { |
| 806 | 0 | return ((TableInfo)g).getCategoryTroid(); |
| 807 | |
} |
| 808 | |
|
| 809 | |
public void setRaw(Persistent g, Object raw) |
| 810 | |
throws AccessPoemException { |
| 811 | 0 | ((TableInfo)g).setCategoryTroid((Integer)raw); |
| 812 | 0 | } |
| 813 | |
}); |
| 814 | 41 | } |
| 815 | |
|
| 816 | |
|
| 817 | |
|
| 818 | |
|
| 819 | |
|
| 820 | |
|
| 821 | |
|
| 822 | |
|
| 823 | |
|
| 824 | |
public final Column<Integer> getIdColumn() { |
| 825 | 0 | return col_id; |
| 826 | |
} |
| 827 | |
|
| 828 | |
|
| 829 | |
|
| 830 | |
|
| 831 | |
|
| 832 | |
|
| 833 | |
|
| 834 | |
|
| 835 | |
|
| 836 | |
public final Column<String> getNameColumn() { |
| 837 | 16 | return col_name; |
| 838 | |
} |
| 839 | |
|
| 840 | |
|
| 841 | |
|
| 842 | |
|
| 843 | |
|
| 844 | |
|
| 845 | |
|
| 846 | |
|
| 847 | |
|
| 848 | |
public final Column<String> getDisplaynameColumn() { |
| 849 | 19 | return col_displayname; |
| 850 | |
} |
| 851 | |
|
| 852 | |
|
| 853 | |
|
| 854 | |
|
| 855 | |
|
| 856 | |
|
| 857 | |
|
| 858 | |
|
| 859 | |
|
| 860 | |
public final Column<String> getDescriptionColumn() { |
| 861 | 15 | return col_description; |
| 862 | |
} |
| 863 | |
|
| 864 | |
|
| 865 | |
|
| 866 | |
|
| 867 | |
|
| 868 | |
|
| 869 | |
|
| 870 | |
|
| 871 | |
|
| 872 | |
public final Column<Integer> getDisplayorderColumn() { |
| 873 | 18 | return col_displayorder; |
| 874 | |
} |
| 875 | |
|
| 876 | |
|
| 877 | |
|
| 878 | |
|
| 879 | |
|
| 880 | |
|
| 881 | |
|
| 882 | |
|
| 883 | |
|
| 884 | |
public final Column<Integer> getDefaultcanreadColumn() { |
| 885 | 71 | return col_defaultcanread; |
| 886 | |
} |
| 887 | |
|
| 888 | |
|
| 889 | |
|
| 890 | |
|
| 891 | |
|
| 892 | |
|
| 893 | |
|
| 894 | |
|
| 895 | |
|
| 896 | |
public final Column<Integer> getDefaultcanwriteColumn() { |
| 897 | 360 | return col_defaultcanwrite; |
| 898 | |
} |
| 899 | |
|
| 900 | |
|
| 901 | |
|
| 902 | |
|
| 903 | |
|
| 904 | |
|
| 905 | |
|
| 906 | |
|
| 907 | |
|
| 908 | |
public final Column<Integer> getDefaultcandeleteColumn() { |
| 909 | 360 | return col_defaultcandelete; |
| 910 | |
} |
| 911 | |
|
| 912 | |
|
| 913 | |
|
| 914 | |
|
| 915 | |
|
| 916 | |
|
| 917 | |
|
| 918 | |
|
| 919 | |
|
| 920 | |
public final Column<Integer> getCancreateColumn() { |
| 921 | 360 | return col_cancreate; |
| 922 | |
} |
| 923 | |
|
| 924 | |
|
| 925 | |
|
| 926 | |
|
| 927 | |
|
| 928 | |
|
| 929 | |
|
| 930 | |
|
| 931 | |
|
| 932 | |
public final Column<Integer> getCachelimitColumn() { |
| 933 | 16 | return col_cachelimit; |
| 934 | |
} |
| 935 | |
|
| 936 | |
|
| 937 | |
|
| 938 | |
|
| 939 | |
|
| 940 | |
|
| 941 | |
|
| 942 | |
|
| 943 | |
|
| 944 | |
public final Column<Boolean> getSeqcachedColumn() { |
| 945 | 18 | return col_seqcached; |
| 946 | |
} |
| 947 | |
|
| 948 | |
|
| 949 | |
|
| 950 | |
|
| 951 | |
|
| 952 | |
|
| 953 | |
|
| 954 | |
|
| 955 | |
|
| 956 | |
public final Column<Integer> getCategoryColumn() { |
| 957 | 18 | return col_category; |
| 958 | |
} |
| 959 | |
|
| 960 | |
|
| 961 | |
|
| 962 | |
|
| 963 | |
|
| 964 | |
|
| 965 | |
|
| 966 | |
|
| 967 | |
|
| 968 | |
public TableInfo getTableInfoObject(Integer troid) { |
| 969 | 4742 | return (TableInfo)getObject(troid); |
| 970 | |
} |
| 971 | |
|
| 972 | |
|
| 973 | |
|
| 974 | |
|
| 975 | |
|
| 976 | |
|
| 977 | |
|
| 978 | |
|
| 979 | |
|
| 980 | |
public TableInfo getTableInfoObject(int troid) { |
| 981 | 0 | return (TableInfo)getObject(troid); |
| 982 | |
} |
| 983 | |
|
| 984 | |
protected JdbcPersistent _newPersistent() { |
| 985 | 28 | return new TableInfo(); |
| 986 | |
} |
| 987 | |
public String defaultDisplayName() { |
| 988 | 40 | return "Table"; |
| 989 | |
} |
| 990 | |
|
| 991 | |
public String defaultDescription() { |
| 992 | 40 | return "Configuration information about a table in the database"; |
| 993 | |
} |
| 994 | |
|
| 995 | |
public boolean defaultRememberAllTroids() { |
| 996 | 40 | return true; |
| 997 | |
} |
| 998 | |
|
| 999 | |
public Integer defaultCacheLimit() { |
| 1000 | 40 | return new Integer(999999999); |
| 1001 | |
} |
| 1002 | |
|
| 1003 | |
public String defaultCategory() { |
| 1004 | 40 | return "System"; |
| 1005 | |
} |
| 1006 | |
|
| 1007 | |
public int defaultDisplayOrder() { |
| 1008 | 40 | return 3010; |
| 1009 | |
} |
| 1010 | |
|
| 1011 | |
|
| 1012 | |
|
| 1013 | |
|
| 1014 | |
public TableInfo ensure(String name, String displayname, Integer displayorder, Boolean seqcached, TableCategory category) { |
| 1015 | 0 | TableInfo p = (TableInfo)getNameColumn().firstWhereEq(name); |
| 1016 | 0 | if (p == null) { |
| 1017 | 0 | p = (TableInfo)newPersistent(); |
| 1018 | 0 | p.setName(name); |
| 1019 | 0 | p.setDisplayname(displayname); |
| 1020 | 0 | p.setDisplayorder(displayorder); |
| 1021 | 0 | p.setSeqcached(seqcached); |
| 1022 | 0 | p.setCategory(category); |
| 1023 | |
} |
| 1024 | 0 | return (TableInfo)getNameColumn().ensure(p); |
| 1025 | |
} |
| 1026 | |
} |
| 1027 | |
|