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.ShopCurrencyTable;
13  
14  
15  /**
16   * Melati POEM generated abstract base class for a <code>Persistent</code> 
17   * <code>ShopCurrency</code> Object.
18   *
19   * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava 
20   */
21  public abstract class ShopCurrencyBase 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>ShopCurrencyTable</code> table 
37    * which this <code>Persistent</code> is from.
38    * 
39    * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava 
40    * @return the ShopCurrencyTable
41    */
42    public ShopCurrencyTable getShopCurrencyTable() {
43      return (ShopCurrencyTable)getTable();
44    }
45  
46    private ShopCurrencyTable _getShopCurrencyTable() {
47      return (ShopCurrencyTable)getTable();
48    }
49  
50    // Fields in this table 
51   /**
52    * id 
53    */
54    protected Integer id;
55   /**
56    * Currency name - The name of the currency 
57    */
58    protected String name;
59   /**
60    * Conversion Rate - The rate at which UK Pounds Sterling are converted into 
61    * this currency 
62    */
63    protected Double conversionrate;
64   /**
65    * Currency locale - The locale of the currency for formatting 
66    */
67    protected String locale;
68  
69  
70   /**
71    * Retrieves the <code>Id</code> value, without locking, 
72    * for this <code>ShopCurrency</code> <code>Persistent</code>.
73    *
74    * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
75    * @return the Integer id
76    */
77    public Integer getId_unsafe() {
78      return id;
79    }
80  
81  
82   /**
83    * Sets the <code>Id</code> value directly, without checking, 
84    * for this ShopCurrency <code>Persistent</code>.
85    * 
86    * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
87    * @param cooked  the pre-validated value to set
88    */
89    public void setId_unsafe(Integer cooked) {
90      id = cooked;
91    }
92  
93   /**
94    * Retrieves the Id value, with locking, for this 
95    * <code>ShopCurrency</code> <code>Persistent</code>.
96    * 
97    * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods 
98    * @throws AccessPoemException 
99    *         if the current <code>AccessToken</code> 
100   *         does not confer write access rights 
101   * @return the value of the field <code>Id</code> for this 
102   *         <code>ShopCurrency</code> <code>Persistent</code>  
103   */
104 
105   public Integer getId()
106       throws AccessPoemException {
107     readLock();
108     return getId_unsafe();
109   }
110 
111 
112  /**
113   * Sets the <code>Id</code> value, with checking, for this 
114   * <code>ShopCurrency</code> <code>Persistent</code>.
115   * 
116   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods  
117   * @param cooked  a validated <code>int</code> 
118   * @throws AccessPoemException 
119   *         if the current <code>AccessToken</code> 
120   *         does not confer write access rights
121   * @throws ValidationPoemException 
122   *         if the value is not valid
123   */
124   public void setId(Integer cooked)
125       throws AccessPoemException, ValidationPoemException {
126     _getShopCurrencyTable().getIdColumn().
127       getType().assertValidCooked(cooked);
128     writeLock();
129     setId_unsafe(cooked);
130   }
131 
132  /**
133   * Sets the <code>Id</code> value, with checking, for this 
134   * <code>ShopCurrency</code> <code>Persistent</code>.
135   * 
136   * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods 
137   * @param cooked  a validated <code>int</code>
138   * @throws AccessPoemException 
139   *         if the current <code>AccessToken</code> 
140   *         does not confer write access rights
141   * @throws ValidationPoemException 
142   *         if the value is not valid
143   */
144 
145   public final void setId(int cooked)
146       throws AccessPoemException, ValidationPoemException {
147     setId(new Integer(cooked));
148   }
149 
150 
151  /**
152   * Retrieves the <code>Id</code> value as a <code>Field</code>
153   * from this <code>ShopCurrency</code> <code>Persistent</code>.
154   * 
155   * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator 
156   * @throws AccessPoemException 
157   *         if the current <code>AccessToken</code> 
158   *         does not confer write access rights
159   * @return the Integer id
160   */
161   public Field getIdField() throws AccessPoemException {
162     Column c = _getShopCurrencyTable().getIdColumn();
163     return new Field(c.getRaw(this), c);
164   }
165 
166 
167  /**
168   * Retrieves the <code>Name</code> value, without locking, 
169   * for this <code>ShopCurrency</code> <code>Persistent</code>.
170   *
171   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
172   * @return the String name
173   */
174   public String getName_unsafe() {
175     return name;
176   }
177 
178 
179  /**
180   * Sets the <code>Name</code> value directly, without checking, 
181   * for this ShopCurrency <code>Persistent</code>.
182   * 
183   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
184   * @param cooked  the pre-validated value to set
185   */
186   public void setName_unsafe(String cooked) {
187     name = cooked;
188   }
189 
190  /**
191   * Retrieves the Name value, with locking, for this 
192   * <code>ShopCurrency</code> <code>Persistent</code>.
193   * Field description: 
194   *   The name of the currency 
195   * 
196   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods 
197   * @throws AccessPoemException 
198   *         if the current <code>AccessToken</code> 
199   *         does not confer write access rights 
200   * @return the value of the field <code>Name</code> for this 
201   *         <code>ShopCurrency</code> <code>Persistent</code>  
202   */
203 
204   public String getName()
205       throws AccessPoemException {
206     readLock();
207     return getName_unsafe();
208   }
209 
210 
211  /**
212   * Sets the <code>Name</code> value, with checking, for this 
213   * <code>ShopCurrency</code> <code>Persistent</code>.
214   * Field description: 
215   *   The name of the currency 
216   * 
217   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods  
218   * @param cooked  a validated <code>int</code> 
219   * @throws AccessPoemException 
220   *         if the current <code>AccessToken</code> 
221   *         does not confer write access rights
222   * @throws ValidationPoemException 
223   *         if the value is not valid
224   */
225   public void setName(String cooked)
226       throws AccessPoemException, ValidationPoemException {
227     _getShopCurrencyTable().getNameColumn().
228       getType().assertValidCooked(cooked);
229     writeLock();
230     setName_unsafe(cooked);
231   }
232 
233 
234  /**
235   * Retrieves the <code>Name</code> value as a <code>Field</code>
236   * from this <code>ShopCurrency</code> <code>Persistent</code>.
237   * 
238   * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator 
239   * @throws AccessPoemException 
240   *         if the current <code>AccessToken</code> 
241   *         does not confer write access rights
242   * @return the String name
243   */
244   public Field getNameField() throws AccessPoemException {
245     Column c = _getShopCurrencyTable().getNameColumn();
246     return new Field(c.getRaw(this), c);
247   }
248 
249 
250  /**
251   * Retrieves the <code>Conversionrate</code> value, without locking, 
252   * for this <code>ShopCurrency</code> <code>Persistent</code>.
253   *
254   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
255   * @return the Double conversionrate
256   */
257   public Double getConversionrate_unsafe() {
258     return conversionrate;
259   }
260 
261 
262  /**
263   * Sets the <code>Conversionrate</code> value directly, without checking, 
264   * for this ShopCurrency <code>Persistent</code>.
265   * 
266   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
267   * @param cooked  the pre-validated value to set
268   */
269   public void setConversionrate_unsafe(Double cooked) {
270     conversionrate = cooked;
271   }
272 
273  /**
274   * Retrieves the Conversionrate value, with locking, for this 
275   * <code>ShopCurrency</code> <code>Persistent</code>.
276   * Field description: 
277   *   The rate at which UK Pounds Sterling are converted into this currency 
278   * 
279   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods 
280   * @throws AccessPoemException 
281   *         if the current <code>AccessToken</code> 
282   *         does not confer write access rights 
283   * @return the value of the field <code>Conversionrate</code> for this 
284   *         <code>ShopCurrency</code> <code>Persistent</code>  
285   */
286 
287   public Double getConversionrate()
288       throws AccessPoemException {
289     readLock();
290     return getConversionrate_unsafe();
291   }
292 
293 
294  /**
295   * Sets the <code>Conversionrate</code> value, with checking, for this 
296   * <code>ShopCurrency</code> <code>Persistent</code>.
297   * Field description: 
298   *   The rate at which UK Pounds Sterling are converted into this currency 
299   * 
300   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods  
301   * @param cooked  a validated <code>int</code> 
302   * @throws AccessPoemException 
303   *         if the current <code>AccessToken</code> 
304   *         does not confer write access rights
305   * @throws ValidationPoemException 
306   *         if the value is not valid
307   */
308   public void setConversionrate(Double cooked)
309       throws AccessPoemException, ValidationPoemException {
310     _getShopCurrencyTable().getConversionrateColumn().
311       getType().assertValidCooked(cooked);
312     writeLock();
313     setConversionrate_unsafe(cooked);
314   }
315 
316  /**
317   * Sets the <code>Conversionrate</code> value, with checking, for this <code>ShopCurrency</code> <code>Persistent</code>.
318   * Field description: 
319   *   The rate at which UK Pounds Sterling are converted into this currency 
320   * 
321   * 
322   * @generator org.melati.poem.prepro.DoubleFieldDef#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 setConversionrate(double cooked)
332       throws AccessPoemException, ValidationPoemException {
333     setConversionrate(new Double(cooked));
334   }
335 
336 
337  /**
338   * Retrieves the <code>Conversionrate</code> value as a <code>Field</code>
339   * from this <code>ShopCurrency</code> <code>Persistent</code>.
340   * 
341   * @generator 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 Double conversionrate
346   */
347   public Field getConversionrateField() throws AccessPoemException {
348     Column c = _getShopCurrencyTable().getConversionrateColumn();
349     return new Field(c.getRaw(this), c);
350   }
351 
352 
353  /**
354   * Retrieves the <code>Locale</code> value, without locking, 
355   * for this <code>ShopCurrency</code> <code>Persistent</code>.
356   *
357   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
358   * @return the String locale
359   */
360   public String getLocale_unsafe() {
361     return locale;
362   }
363 
364 
365  /**
366   * Sets the <code>Locale</code> value directly, without checking, 
367   * for this ShopCurrency <code>Persistent</code>.
368   * 
369   * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods 
370   * @param cooked  the pre-validated value to set
371   */
372   public void setLocale_unsafe(String cooked) {
373     locale = cooked;
374   }
375 
376  /**
377   * Retrieves the Locale value, with locking, for this 
378   * <code>ShopCurrency</code> <code>Persistent</code>.
379   * Field description: 
380   *   The locale of the currency for formatting 
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>Locale</code> for this 
387   *         <code>ShopCurrency</code> <code>Persistent</code>  
388   */
389 
390   public String getLocale()
391       throws AccessPoemException {
392     readLock();
393     return getLocale_unsafe();
394   }
395 
396 
397  /**
398   * Sets the <code>Locale</code> value, with checking, for this 
399   * <code>ShopCurrency</code> <code>Persistent</code>.
400   * Field description: 
401   *   The locale of the currency for formatting 
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 setLocale(String cooked)
412       throws AccessPoemException, ValidationPoemException {
413     _getShopCurrencyTable().getLocaleColumn().
414       getType().assertValidCooked(cooked);
415     writeLock();
416     setLocale_unsafe(cooked);
417   }
418 
419 
420  /**
421   * Retrieves the <code>Locale</code> value as a <code>Field</code>
422   * from this <code>ShopCurrency</code> <code>Persistent</code>.
423   * 
424   * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator 
425   * @throws AccessPoemException 
426   *         if the current <code>AccessToken</code> 
427   *         does not confer write access rights
428   * @return the String locale
429   */
430   public Field getLocaleField() throws AccessPoemException {
431     Column c = _getShopCurrencyTable().getLocaleColumn();
432     return new Field(c.getRaw(this), c);
433   }
434 }
435