| 1 | |
|
| 2 | |
|
| 3 | |
package org.paneris.jammyjoes.model.generated; |
| 4 | |
|
| 5 | |
import org.melati.poem.AccessPoemException; |
| 6 | |
import org.melati.poem.Column; |
| 7 | |
import org.melati.poem.Database; |
| 8 | |
import org.melati.poem.DefinitionSource; |
| 9 | |
import org.melati.poem.DisplayLevel; |
| 10 | |
import org.melati.poem.Field; |
| 11 | |
import org.melati.poem.IntegerPoemType; |
| 12 | |
import org.melati.poem.JdbcPersistent; |
| 13 | |
import org.melati.poem.Persistent; |
| 14 | |
import org.melati.poem.PoemException; |
| 15 | |
import org.melati.poem.Searchability; |
| 16 | |
import org.melati.poem.StringPoemType; |
| 17 | |
import org.melati.poem.TroidPoemType; |
| 18 | |
import org.melati.poem.ValidationPoemException; |
| 19 | |
import org.paneris.jammyjoes.model.JammyjoesDatabaseTables; |
| 20 | |
import org.paneris.jammyjoes.model.JammyjoesTable; |
| 21 | |
import org.paneris.jammyjoes.model.Wrapping; |
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
public class WrappingTableBase extends JammyjoesTable { |
| 32 | |
|
| 33 | 0 | private Column col_id = null; |
| 34 | 0 | private Column col_wrapping = null; |
| 35 | 0 | private Column col_displayPositon = null; |
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | |
|
| 41 | |
|
| 42 | |
|
| 43 | |
|
| 44 | |
|
| 45 | |
|
| 46 | |
|
| 47 | |
public WrappingTableBase( |
| 48 | |
Database database, String name, |
| 49 | |
DefinitionSource definitionSource) throws PoemException { |
| 50 | 0 | super(database, name, definitionSource); |
| 51 | 0 | } |
| 52 | |
|
| 53 | |
|
| 54 | |
|
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
public JammyjoesDatabaseTables getJammyjoesDatabaseTables() { |
| 61 | 0 | return (JammyjoesDatabaseTables)getDatabase(); |
| 62 | |
} |
| 63 | |
|
| 64 | |
public void init() throws PoemException { |
| 65 | 0 | super.init(); |
| 66 | 0 | defineColumn(col_id = |
| 67 | |
new Column(this, "id", |
| 68 | |
new TroidPoemType(), |
| 69 | |
DefinitionSource.dsd) { |
| 70 | |
public Object getCooked(Persistent g) |
| 71 | |
throws AccessPoemException, PoemException { |
| 72 | 0 | return ((Wrapping)g).getId(); |
| 73 | |
} |
| 74 | |
|
| 75 | |
public void setCooked(Persistent g, Object cooked) |
| 76 | |
throws AccessPoemException, ValidationPoemException { |
| 77 | 0 | ((Wrapping)g).setId((Integer)cooked); |
| 78 | 0 | } |
| 79 | |
|
| 80 | |
public Field asField(Persistent g) { |
| 81 | 0 | return ((Wrapping)g).getIdField(); |
| 82 | |
} |
| 83 | |
|
| 84 | |
protected boolean defaultUserEditable() { |
| 85 | 0 | return false; |
| 86 | |
} |
| 87 | |
|
| 88 | |
protected boolean defaultUserCreateable() { |
| 89 | 0 | return false; |
| 90 | |
} |
| 91 | |
|
| 92 | |
protected DisplayLevel defaultDisplayLevel() { |
| 93 | 0 | return DisplayLevel.record; |
| 94 | |
} |
| 95 | |
|
| 96 | |
protected Searchability defaultSearchability() { |
| 97 | 0 | return Searchability.no; |
| 98 | |
} |
| 99 | |
|
| 100 | |
protected int defaultDisplayOrder() { |
| 101 | 0 | return 0; |
| 102 | |
} |
| 103 | |
|
| 104 | |
public Object getRaw_unsafe(Persistent g) |
| 105 | |
throws AccessPoemException { |
| 106 | 0 | return ((Wrapping)g).getId_unsafe(); |
| 107 | |
} |
| 108 | |
|
| 109 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 110 | |
throws AccessPoemException { |
| 111 | 0 | ((Wrapping)g).setId_unsafe((Integer)raw); |
| 112 | 0 | } |
| 113 | |
|
| 114 | |
public Object getRaw(Persistent g) |
| 115 | |
throws AccessPoemException { |
| 116 | 0 | return ((Wrapping)g).getId(); |
| 117 | |
} |
| 118 | |
|
| 119 | 0 | public void setRaw(Persistent g, Object raw) |
| 120 | |
throws AccessPoemException { |
| 121 | 0 | ((Wrapping)g).setId((Integer)raw); |
| 122 | 0 | } |
| 123 | |
}); |
| 124 | |
|
| 125 | 0 | defineColumn(col_wrapping = |
| 126 | |
new Column(this, "wrapping", |
| 127 | |
new StringPoemType(false, -1), |
| 128 | |
DefinitionSource.dsd) { |
| 129 | |
public Object getCooked(Persistent g) |
| 130 | |
throws AccessPoemException, PoemException { |
| 131 | 0 | return ((Wrapping)g).getWrapping(); |
| 132 | |
} |
| 133 | |
|
| 134 | |
public void setCooked(Persistent g, Object cooked) |
| 135 | |
throws AccessPoemException, ValidationPoemException { |
| 136 | 0 | ((Wrapping)g).setWrapping((String)cooked); |
| 137 | 0 | } |
| 138 | |
|
| 139 | |
public Field asField(Persistent g) { |
| 140 | 0 | return ((Wrapping)g).getWrappingField(); |
| 141 | |
} |
| 142 | |
|
| 143 | |
protected DisplayLevel defaultDisplayLevel() { |
| 144 | 0 | return DisplayLevel.primary; |
| 145 | |
} |
| 146 | |
|
| 147 | |
protected Searchability defaultSearchability() { |
| 148 | 0 | return Searchability.yes; |
| 149 | |
} |
| 150 | |
|
| 151 | |
protected String defaultDisplayName() { |
| 152 | 0 | return "Wrapping"; |
| 153 | |
} |
| 154 | |
|
| 155 | |
protected int defaultDisplayOrder() { |
| 156 | 0 | return 1; |
| 157 | |
} |
| 158 | |
|
| 159 | |
protected boolean defaultUnique() { |
| 160 | 0 | return true; |
| 161 | |
} |
| 162 | |
|
| 163 | |
protected int defaultWidth() { |
| 164 | 0 | return 20; |
| 165 | |
} |
| 166 | |
|
| 167 | |
public Object getRaw_unsafe(Persistent g) |
| 168 | |
throws AccessPoemException { |
| 169 | 0 | return ((Wrapping)g).getWrapping_unsafe(); |
| 170 | |
} |
| 171 | |
|
| 172 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 173 | |
throws AccessPoemException { |
| 174 | 0 | ((Wrapping)g).setWrapping_unsafe((String)raw); |
| 175 | 0 | } |
| 176 | |
|
| 177 | |
public Object getRaw(Persistent g) |
| 178 | |
throws AccessPoemException { |
| 179 | 0 | return ((Wrapping)g).getWrapping(); |
| 180 | |
} |
| 181 | |
|
| 182 | 0 | public void setRaw(Persistent g, Object raw) |
| 183 | |
throws AccessPoemException { |
| 184 | 0 | ((Wrapping)g).setWrapping((String)raw); |
| 185 | 0 | } |
| 186 | |
}); |
| 187 | |
|
| 188 | 0 | defineColumn(col_displayPositon = |
| 189 | |
new Column(this, "displayPositon", |
| 190 | |
new IntegerPoemType(false), |
| 191 | |
DefinitionSource.dsd) { |
| 192 | |
public Object getCooked(Persistent g) |
| 193 | |
throws AccessPoemException, PoemException { |
| 194 | 0 | return ((Wrapping)g).getDisplayPositon(); |
| 195 | |
} |
| 196 | |
|
| 197 | |
public void setCooked(Persistent g, Object cooked) |
| 198 | |
throws AccessPoemException, ValidationPoemException { |
| 199 | 0 | ((Wrapping)g).setDisplayPositon((Integer)cooked); |
| 200 | 0 | } |
| 201 | |
|
| 202 | |
public Field asField(Persistent g) { |
| 203 | 0 | return ((Wrapping)g).getDisplayPositonField(); |
| 204 | |
} |
| 205 | |
|
| 206 | |
protected DisplayLevel defaultDisplayLevel() { |
| 207 | 0 | return DisplayLevel.record; |
| 208 | |
} |
| 209 | |
|
| 210 | |
protected Searchability defaultSearchability() { |
| 211 | 0 | return Searchability.no; |
| 212 | |
} |
| 213 | |
|
| 214 | |
protected Integer defaultDisplayOrderPriority() { |
| 215 | 0 | return new Integer(0); |
| 216 | |
} |
| 217 | |
|
| 218 | |
protected int defaultDisplayOrder() { |
| 219 | 0 | return 2; |
| 220 | |
} |
| 221 | |
|
| 222 | |
public Object getRaw_unsafe(Persistent g) |
| 223 | |
throws AccessPoemException { |
| 224 | 0 | return ((Wrapping)g).getDisplayPositon_unsafe(); |
| 225 | |
} |
| 226 | |
|
| 227 | |
public void setRaw_unsafe(Persistent g, Object raw) |
| 228 | |
throws AccessPoemException { |
| 229 | 0 | ((Wrapping)g).setDisplayPositon_unsafe((Integer)raw); |
| 230 | 0 | } |
| 231 | |
|
| 232 | |
public Object getRaw(Persistent g) |
| 233 | |
throws AccessPoemException { |
| 234 | 0 | return ((Wrapping)g).getDisplayPositon(); |
| 235 | |
} |
| 236 | |
|
| 237 | 0 | public void setRaw(Persistent g, Object raw) |
| 238 | |
throws AccessPoemException { |
| 239 | 0 | ((Wrapping)g).setDisplayPositon((Integer)raw); |
| 240 | 0 | } |
| 241 | |
}); |
| 242 | 0 | } |
| 243 | |
|
| 244 | |
|
| 245 | |
|
| 246 | |
|
| 247 | |
|
| 248 | |
|
| 249 | |
|
| 250 | |
|
| 251 | |
|
| 252 | |
public final Column getIdColumn() { |
| 253 | 0 | return col_id; |
| 254 | |
} |
| 255 | |
|
| 256 | |
|
| 257 | |
|
| 258 | |
|
| 259 | |
|
| 260 | |
|
| 261 | |
|
| 262 | |
|
| 263 | |
|
| 264 | |
public final Column getWrappingColumn() { |
| 265 | 0 | return col_wrapping; |
| 266 | |
} |
| 267 | |
|
| 268 | |
|
| 269 | |
|
| 270 | |
|
| 271 | |
|
| 272 | |
|
| 273 | |
|
| 274 | |
|
| 275 | |
|
| 276 | |
public final Column getDisplayPositonColumn() { |
| 277 | 0 | return col_displayPositon; |
| 278 | |
} |
| 279 | |
|
| 280 | |
|
| 281 | |
|
| 282 | |
|
| 283 | |
|
| 284 | |
|
| 285 | |
|
| 286 | |
|
| 287 | |
|
| 288 | |
public Wrapping getWrappingObject(Integer troid) { |
| 289 | 0 | return (Wrapping)getObject(troid); |
| 290 | |
} |
| 291 | |
|
| 292 | |
|
| 293 | |
|
| 294 | |
|
| 295 | |
|
| 296 | |
|
| 297 | |
|
| 298 | |
|
| 299 | |
|
| 300 | |
public Wrapping getWrappingObject(int troid) { |
| 301 | 0 | return (Wrapping)getObject(troid); |
| 302 | |
} |
| 303 | |
|
| 304 | |
protected JdbcPersistent _newPersistent() { |
| 305 | 0 | return new Wrapping(); |
| 306 | |
} |
| 307 | |
protected String defaultDisplayName() { |
| 308 | 0 | return "Wrapping"; |
| 309 | |
} |
| 310 | |
|
| 311 | |
protected String defaultDescription() { |
| 312 | 0 | return "Wrapping"; |
| 313 | |
} |
| 314 | |
|
| 315 | |
protected boolean defaultRememberAllTroids() { |
| 316 | 0 | return true; |
| 317 | |
} |
| 318 | |
|
| 319 | |
protected String defaultCategory() { |
| 320 | 0 | return "Codes"; |
| 321 | |
} |
| 322 | |
|
| 323 | |
protected int defaultDisplayOrder() { |
| 324 | 0 | return 1070; |
| 325 | |
} |
| 326 | |
} |
| 327 | |
|