1
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.ProductStatusTable;
13
14
15 /**
16 * Melati POEM generated abstract base class for a <code>Persistent</code>
17 * <code>ProductStatus</code> Object.
18 *
19 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
20 */
21 public abstract class ProductStatusBase 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>ProductStatusTable</code> table
37 * which this <code>Persistent</code> is from.
38 *
39 * @generator org.melati.poem.prepro.TableDef#generatePersistentBaseJava
40 * @return the ProductStatusTable
41 */
42 public ProductStatusTable getProductStatusTable() {
43 return (ProductStatusTable)getTable();
44 }
45
46 private ProductStatusTable _getProductStatusTable() {
47 return (ProductStatusTable)getTable();
48 }
49
50
51 /**
52 * id
53 */
54 protected Integer id;
55 /**
56 * Status - The status of this order product
57 */
58 protected String status;
59
60
61 /**
62 * Retrieves the <code>Id</code> value, without locking,
63 * for this <code>ProductStatus</code> <code>Persistent</code>.
64 *
65 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
66 * @return the Integer id
67 */
68 public Integer getId_unsafe() {
69 return id;
70 }
71
72
73 /**
74 * Sets the <code>Id</code> value directly, without checking,
75 * for this ProductStatus <code>Persistent</code>.
76 *
77 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
78 * @param cooked the pre-validated value to set
79 */
80 public void setId_unsafe(Integer cooked) {
81 id = cooked;
82 }
83
84 /**
85 * Retrieves the Id value, with locking, for this
86 * <code>ProductStatus</code> <code>Persistent</code>.
87 *
88 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
89 * @throws AccessPoemException
90 * if the current <code>AccessToken</code>
91 * does not confer write access rights
92 * @return the value of the field <code>Id</code> for this
93 * <code>ProductStatus</code> <code>Persistent</code>
94 */
95
96 public Integer getId()
97 throws AccessPoemException {
98 readLock();
99 return getId_unsafe();
100 }
101
102
103 /**
104 * Sets the <code>Id</code> value, with checking, for this
105 * <code>ProductStatus</code> <code>Persistent</code>.
106 *
107 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
108 * @param cooked a validated <code>int</code>
109 * @throws AccessPoemException
110 * if the current <code>AccessToken</code>
111 * does not confer write access rights
112 * @throws ValidationPoemException
113 * if the value is not valid
114 */
115 public void setId(Integer cooked)
116 throws AccessPoemException, ValidationPoemException {
117 _getProductStatusTable().getIdColumn().
118 getType().assertValidCooked(cooked);
119 writeLock();
120 setId_unsafe(cooked);
121 }
122
123 /**
124 * Sets the <code>Id</code> value, with checking, for this
125 * <code>ProductStatus</code> <code>Persistent</code>.
126 *
127 * @generator org.melati.poem.prepro.IntegerFieldDef#generateBaseMethods
128 * @param cooked a validated <code>int</code>
129 * @throws AccessPoemException
130 * if the current <code>AccessToken</code>
131 * does not confer write access rights
132 * @throws ValidationPoemException
133 * if the value is not valid
134 */
135
136 public final void setId(int cooked)
137 throws AccessPoemException, ValidationPoemException {
138 setId(new Integer(cooked));
139 }
140
141
142 /**
143 * Retrieves the <code>Id</code> value as a <code>Field</code>
144 * from this <code>ProductStatus</code> <code>Persistent</code>.
145 *
146 * @generator org.melati.poem.prepro.FieldDef#generateFieldCreator
147 * @throws AccessPoemException
148 * if the current <code>AccessToken</code>
149 * does not confer write access rights
150 * @return the Integer id
151 */
152 public Field getIdField() throws AccessPoemException {
153 Column c = _getProductStatusTable().getIdColumn();
154 return new Field(c.getRaw(this), c);
155 }
156
157
158 /**
159 * Retrieves the <code>Status</code> value, without locking,
160 * for this <code>ProductStatus</code> <code>Persistent</code>.
161 *
162 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
163 * @return the String status
164 */
165 public String getStatus_unsafe() {
166 return status;
167 }
168
169
170 /**
171 * Sets the <code>Status</code> value directly, without checking,
172 * for this ProductStatus <code>Persistent</code>.
173 *
174 * @generator org.melati.poem.prepro.FieldDef#generateBaseMethods
175 * @param cooked the pre-validated value to set
176 */
177 public void setStatus_unsafe(String cooked) {
178 status = cooked;
179 }
180
181 /**
182 * Retrieves the Status value, with locking, for this
183 * <code>ProductStatus</code> <code>Persistent</code>.
184 * Field description:
185 * The status of this order product
186 *
187 * @generator org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
188 * @throws AccessPoemException
189 * if the current <code>AccessToken</code>
190 * does not confer write access rights
191 * @return the value of the field <code>Status</code> for this
192 * <code>ProductStatus</code> <code>Persistent</code>
193 */
194
195 public String getStatus()
196 throws AccessPoemException {
197 readLock();
198 return getStatus_unsafe();
199 }
200
201
202 /**
203 * Sets the <code>Status</code> value, with checking, for this
204 * <code>ProductStatus</code> <code>Persistent</code>.
205 * Field description:
206 * The status of this order product
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 setStatus(String cooked)
217 throws AccessPoemException, ValidationPoemException {
218 _getProductStatusTable().getStatusColumn().
219 getType().assertValidCooked(cooked);
220 writeLock();
221 setStatus_unsafe(cooked);
222 }
223
224
225 /**
226 * Retrieves the <code>Status</code> value as a <code>Field</code>
227 * from this <code>ProductStatus</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 status
234 */
235 public Field getStatusField() throws AccessPoemException {
236 Column c = _getProductStatusTable().getStatusColumn();
237 return new Field(c.getRaw(this), c);
238 }
239 }
240