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