View Javadoc

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.WrappingTable;
13  
14  
15  /**
16   * Melati POEM generated abstract base class for a <code>Persistent</code> 
17   * <code>Wrapping</code> Object.
18   *
19   * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava 
20   */
21  public abstract class WrappingBase 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      return (JammyjoesDatabaseTables)getDatabase();
32    }
33  
34  
35   /**
36    * Retrieves the  <code>WrappingTable</code> table 
37    * which this <code>Persistent</code> is from.
38    * 
39    * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava 
40    * @return the WrappingTable
41    */
42    public WrappingTable getWrappingTable() {
43      return (WrappingTable)getTable();
44    }
45  
46    private WrappingTable _getWrappingTable() {
47      return (WrappingTable)getTable();
48    }
49  
50    // Fields in this table 
51   /**
52    * id 
53    */
54    protected Integer id;
55   /**
56    * Wrapping 
57    */
58    protected String wrapping;
59   /**
60    * displayPositon 
61    */
62    protected Integer displayPositon;
63  
64  
65   /**
66    * Retrieves the <code>Id</code> value, without locking, 
67    * for this <code>Wrapping</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      return id;
74    }
75  
76  
77   /**
78    * Sets the <code>Id</code> value directly, without checking, 
79    * for this Wrapping <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      id = cooked;
86    }
87  
88   /**
89    * Retrieves the Id value, with locking, for this 
90    * <code>Wrapping</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>Wrapping</code> <code>Persistent</code>  
98    */
99  
100   public Integer getId()
101       throws AccessPoemException {
102     readLock();
103     return getId_unsafe();
104   }
105 
106 
107  /**
108   * Sets the <code>Id</code> value, with checking, for this 
109   * <code>Wrapping</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     _getWrappingTable().getIdColumn().
122       getType().assertValidCooked(cooked);
123     writeLock();
124     setId_unsafe(cooked);
125   }
126 
127  /**
128   * Sets the <code>Id</code> value, with checking, for this 
129   * <code>Wrapping</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     setId(new Integer(cooked));
143   }
144 
145 
146  /**
147   * Retrieves the <code>Id</code> value as a <code>Field</code>
148   * from this <code>Wrapping</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     Column c = _getWrappingTable().getIdColumn();
158     return new Field(c.getRaw(this), c);
159   }
160 
161 
162  /**
163   * Retrieves the <code>Wrapping</code> value, without locking, 
164   * for this <code>Wrapping</code> <code>Persistent</code>.
165   *
166   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
167   * @return the String wrapping
168   */
169   public String getWrapping_unsafe() {
170     return wrapping;
171   }
172 
173 
174  /**
175   * Sets the <code>Wrapping</code> value directly, without checking, 
176   * for this Wrapping <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 setWrapping_unsafe(String cooked) {
182     wrapping = cooked;
183   }
184 
185  /**
186   * Retrieves the Wrapping value, with locking, for this 
187   * <code>Wrapping</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>Wrapping</code> for this 
194   *         <code>Wrapping</code> <code>Persistent</code>  
195   */
196 
197   public String getWrapping()
198       throws AccessPoemException {
199     readLock();
200     return getWrapping_unsafe();
201   }
202 
203 
204  /**
205   * Sets the <code>Wrapping</code> value, with checking, for this 
206   * <code>Wrapping</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 setWrapping(String cooked)
217       throws AccessPoemException, ValidationPoemException {
218     _getWrappingTable().getWrappingColumn().
219       getType().assertValidCooked(cooked);
220     writeLock();
221     setWrapping_unsafe(cooked);
222   }
223 
224 
225  /**
226   * Retrieves the <code>Wrapping</code> value as a <code>Field</code>
227   * from this <code>Wrapping</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 wrapping
234   */
235   public Field getWrappingField() throws AccessPoemException {
236     Column c = _getWrappingTable().getWrappingColumn();
237     return new Field(c.getRaw(this), c);
238   }
239 
240 
241  /**
242   * Retrieves the <code>DisplayPositon</code> value, without locking, 
243   * for this <code>Wrapping</code> <code>Persistent</code>.
244   *
245   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
246   * @return the Integer displayPositon
247   */
248   public Integer getDisplayPositon_unsafe() {
249     return displayPositon;
250   }
251 
252 
253  /**
254   * Sets the <code>DisplayPositon</code> value directly, without checking, 
255   * for this Wrapping <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 setDisplayPositon_unsafe(Integer cooked) {
261     displayPositon = cooked;
262   }
263 
264  /**
265   * Retrieves the DisplayPositon value, with locking, for this 
266   * <code>Wrapping</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>DisplayPositon</code> for this 
273   *         <code>Wrapping</code> <code>Persistent</code>  
274   */
275 
276   public Integer getDisplayPositon()
277       throws AccessPoemException {
278     readLock();
279     return getDisplayPositon_unsafe();
280   }
281 
282 
283  /**
284   * Sets the <code>DisplayPositon</code> value, with checking, for this 
285   * <code>Wrapping</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 setDisplayPositon(Integer cooked)
296       throws AccessPoemException, ValidationPoemException {
297     _getWrappingTable().getDisplayPositonColumn().
298       getType().assertValidCooked(cooked);
299     writeLock();
300     setDisplayPositon_unsafe(cooked);
301   }
302 
303  /**
304   * Sets the <code>DisplayPositon</code> value, with checking, for this 
305   * <code>Wrapping</code> <code>Persistent</code>.
306   * 
307   * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods 
308   * @param cooked  a validated <code>int</code>
309   * @throws AccessPoemException 
310   *         if the current <code>AccessToken</code> 
311   *         does not confer write access rights
312   * @throws ValidationPoemException 
313   *         if the value is not valid
314   */
315 
316   public final void setDisplayPositon(int cooked)
317       throws AccessPoemException, ValidationPoemException {
318     setDisplayPositon(new Integer(cooked));
319   }
320 
321 
322  /**
323   * Retrieves the <code>DisplayPositon</code> value as a <code>Field</code>
324   * from this <code>Wrapping</code> <code>Persistent</code>.
325   * 
326   * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator 
327   * @throws AccessPoemException 
328   *         if the current <code>AccessToken</code> 
329   *         does not confer write access rights
330   * @return the Integer displayPositon
331   */
332   public Field getDisplayPositonField() throws AccessPoemException {
333     Column c = _getWrappingTable().getDisplayPositonColumn();
334     return new Field(c.getRaw(this), c);
335   }
336 }
337