View Javadoc

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.JdbcPersistent;
10  import org.melati.poem.ValidationPoemException;
11  import org.paneris.melati.site.model.LinkTypeTable;
12  import org.paneris.melati.site.model.SiteDatabaseTables;
13  
14  
15  /**
16   * Melati POEM generated abstract base class for a <code>Persistent</code> 
17   * <code>LinkType</code> Object.
18   *
19   * @see org.melati.poem.prepro.TableDef#generatePersistentBaseJava 
20   */
21  public abstract class LinkTypeBase extends JdbcPersistent {
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>LinkTypeTable</code> table 
37    * which this <code>Persistent</code> is from.
38    * 
39    * @see org.melati.poem.prepro.TableDef#generatePersistentBaseJava 
40    * @return the LinkTypeTable
41    */
42    public LinkTypeTable getLinkTypeTable() {
43      return (LinkTypeTable)getTable();
44    }
45  
46    private LinkTypeTable _getLinkTypeTable() {
47      return (LinkTypeTable)getTable();
48    }
49  
50    // Fields in this table 
51   /**
52    * id 
53    */
54    protected Integer id;
55   /**
56    * name - The category's name 
57    */
58    protected String name;
59   /**
60    * description - The a description of the link type 
61    */
62    protected String description;
63  
64  
65   /**
66    * Retrieves the <code>Id</code> value, without locking, 
67    * for this <code>LinkType</code> <code>Persistent</code>.
68    *
69    * @see 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 LinkType <code>Persistent</code>.
80    * 
81    * @see 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>LinkType</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>LinkType</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>LinkType</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     _getLinkTypeTable().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>LinkType</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>LinkType</code> <code>Persistent</code>.
149   * 
150   * @see 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 = _getLinkTypeTable().getIdColumn();
158     return new Field(c.getRaw(this), c);
159   }
160 
161 
162  /**
163   * Retrieves the <code>Name</code> value, without locking, 
164   * for this <code>LinkType</code> <code>Persistent</code>.
165   *
166   * @see org.melati.poem.prepro.FieldDef#generateBaseMethods 
167   * @return the String name
168   */
169   public String getName_unsafe() {
170     return name;
171   }
172 
173 
174  /**
175   * Sets the <code>Name</code> value directly, without checking, 
176   * for this LinkType <code>Persistent</code>.
177   * 
178   * @see org.melati.poem.prepro.FieldDef#generateBaseMethods 
179   * @param cooked  the pre-validated value to set
180   */
181   public void setName_unsafe(String cooked) {
182     name = cooked;
183   }
184 
185  /**
186   * Retrieves the Name value, with locking, for this 
187   * <code>LinkType</code> <code>Persistent</code>.
188   * Field description: 
189   *   The category's name 
190   * 
191   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods 
192   * @throws AccessPoemException 
193   *         if the current <code>AccessToken</code> 
194   *         does not confer write access rights 
195   * @return the value of the field <code>Name</code> for this 
196   *         <code>LinkType</code> <code>Persistent</code>  
197   */
198 
199   public String getName()
200       throws AccessPoemException {
201     readLock();
202     return getName_unsafe();
203   }
204 
205 
206  /**
207   * Sets the <code>Name</code> value, with checking, for this 
208   * <code>LinkType</code> <code>Persistent</code>.
209   * Field description: 
210   *   The category's name 
211   * 
212   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods  
213   * @param cooked  a validated <code>int</code> 
214   * @throws AccessPoemException 
215   *         if the current <code>AccessToken</code> 
216   *         does not confer write access rights
217   * @throws ValidationPoemException 
218   *         if the value is not valid
219   */
220   public void setName(String cooked)
221       throws AccessPoemException, ValidationPoemException {
222     _getLinkTypeTable().getNameColumn().
223       getType().assertValidCooked(cooked);
224     writeLock();
225     setName_unsafe(cooked);
226   }
227 
228 
229  /**
230   * Retrieves the <code>Name</code> value as a <code>Field</code>
231   * from this <code>LinkType</code> <code>Persistent</code>.
232   * 
233   * @see org.melati.poem.prepro.FieldDef#generateFieldCreator 
234   * @throws AccessPoemException 
235   *         if the current <code>AccessToken</code> 
236   *         does not confer write access rights
237   * @return the String name
238   */
239   public Field getNameField() throws AccessPoemException {
240     Column c = _getLinkTypeTable().getNameColumn();
241     return new Field(c.getRaw(this), c);
242   }
243 
244 
245  /**
246   * Retrieves the <code>Description</code> value, without locking, 
247   * for this <code>LinkType</code> <code>Persistent</code>.
248   *
249   * @see org.melati.poem.prepro.FieldDef#generateBaseMethods 
250   * @return the String description
251   */
252   public String getDescription_unsafe() {
253     return description;
254   }
255 
256 
257  /**
258   * Sets the <code>Description</code> value directly, without checking, 
259   * for this LinkType <code>Persistent</code>.
260   * 
261   * @see org.melati.poem.prepro.FieldDef#generateBaseMethods 
262   * @param cooked  the pre-validated value to set
263   */
264   public void setDescription_unsafe(String cooked) {
265     description = cooked;
266   }
267 
268  /**
269   * Retrieves the Description value, with locking, for this 
270   * <code>LinkType</code> <code>Persistent</code>.
271   * Field description: 
272   *   The a description of the link type 
273   * 
274   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods 
275   * @throws AccessPoemException 
276   *         if the current <code>AccessToken</code> 
277   *         does not confer write access rights 
278   * @return the value of the field <code>Description</code> for this 
279   *         <code>LinkType</code> <code>Persistent</code>  
280   */
281 
282   public String getDescription()
283       throws AccessPoemException {
284     readLock();
285     return getDescription_unsafe();
286   }
287 
288 
289  /**
290   * Sets the <code>Description</code> value, with checking, for this 
291   * <code>LinkType</code> <code>Persistent</code>.
292   * Field description: 
293   *   The a description of the link type 
294   * 
295   * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods  
296   * @param cooked  a validated <code>int</code> 
297   * @throws AccessPoemException 
298   *         if the current <code>AccessToken</code> 
299   *         does not confer write access rights
300   * @throws ValidationPoemException 
301   *         if the value is not valid
302   */
303   public void setDescription(String cooked)
304       throws AccessPoemException, ValidationPoemException {
305     _getLinkTypeTable().getDescriptionColumn().
306       getType().assertValidCooked(cooked);
307     writeLock();
308     setDescription_unsafe(cooked);
309   }
310 
311 
312  /**
313   * Retrieves the <code>Description</code> value as a <code>Field</code>
314   * from this <code>LinkType</code> <code>Persistent</code>.
315   * 
316   * @see org.melati.poem.prepro.FieldDef#generateFieldCreator 
317   * @throws AccessPoemException 
318   *         if the current <code>AccessToken</code> 
319   *         does not confer write access rights
320   * @return the String description
321   */
322   public Field getDescriptionField() throws AccessPoemException {
323     Column c = _getLinkTypeTable().getDescriptionColumn();
324     return new Field(c.getRaw(this), c);
325   }
326 }
327