Source Code Cross Referenced for Item.java in  » J2EE » Jaffa » org » jaffa » applications » test » modules » material » domain » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Jaffa » org.jaffa.applications.test.modules.material.domain 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // .//GEN-BEGIN:1_be
002:        /******************************************************
003:         * Code Generated From JAFFA Framework Default Pattern
004:         * 
005:         * The JAFFA Project can be found at http://jaffa.sourceforge.net
006:         * and is available under the Lesser GNU Public License
007:         ******************************************************/package org.jaffa.applications.test.modules.material.domain;
008:
009:        import org.jaffa.datatypes.*;
010:        import org.jaffa.metadata.*;
011:        import org.jaffa.persistence.Persistent;
012:        import org.jaffa.persistence.exceptions.*;
013:        import org.jaffa.exceptions.FrameworkException;
014:
015:        // .//GEN-END:1_be
016:        // Add additional imports//GEN-FIRST:imports
017:
018:        // .//GEN-LAST:imports
019:        // .//GEN-BEGIN:2_be
020:        /**
021:         * Auto Generated Persistent class for the ITEM table.
022:         * @author  Auto-Generated
023:         */
024:        public class Item extends Persistent {
025:
026:            /** Holds value of property itemId. */
027:            private java.lang.String m_itemId;
028:
029:            /** Holds value of property sc. */
030:            private java.lang.String m_sc;
031:
032:            /** Holds value of property part. */
033:            private java.lang.String m_part;
034:
035:            /** Holds value of property serial. */
036:            private java.lang.String m_serial;
037:
038:            /** Holds value of property qty. */
039:            private java.lang.Double m_qty;
040:
041:            // .//GEN-END:2_be
042:            // .//GEN-BEGIN:itemId_be
043:            /** Getter for property itemId.
044:             * @return Value of property itemId.
045:             */
046:            public java.lang.String getItemId() {
047:                return m_itemId;
048:            }
049:
050:            /** Setter for property itemId.
051:             * WARNING: This is strictly for use by the Persistence Engine. A developer should never use this method. Instead, use the update(field.Name.Upper1) method.
052:             * @param itemId New value of property itemId.
053:             */
054:            public void setItemId(java.lang.String itemId) {
055:                m_itemId = itemId;
056:            }
057:
058:            /** Use this method to update the property itemId.
059:             * This method will do nothing and simply return if the input value is the same as the current value.
060:             * Validation will be performed on the input value.
061:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
062:             * @param itemId New value of property itemId.
063:             * @throws ValidationException if an invalid value is passed.
064:             * @throws UpdatePrimaryKeyException if this domain object was loaded from the database.
065:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
066:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
067:             * @throws FrameworkException Indicates some system error
068:             */
069:            public void updateItemId(java.lang.String itemId)
070:                    throws ValidationException, UpdatePrimaryKeyException,
071:                    ReadOnlyObjectException, AlreadyLockedObjectException,
072:                    FrameworkException {
073:                // ignore, if the current value and new value are the same
074:                if (m_itemId == null ? itemId == null : m_itemId.equals(itemId))
075:                    return;
076:
077:                // this is part of the primary key.. do not update if its a database occurence.
078:                if (isDatabaseOccurence())
079:                    throw new UpdatePrimaryKeyException();
080:
081:                validateItemId(itemId);
082:                // .//GEN-END:itemId_be
083:                // Add custom code before setting the value//GEN-FIRST:itemId
084:
085:                // .//GEN-LAST:itemId
086:                // .//GEN-BEGIN:itemId_1_be
087:                super .update();
088:                setItemId(itemId);
089:                // .//GEN-END:itemId_1_be
090:                // Add custom code after setting the value//GEN-FIRST:itemId_3
091:
092:                // .//GEN-LAST:itemId_3
093:                // .//GEN-BEGIN:itemId_2_be
094:            }
095:
096:            /** Use this method to validate a value for the property itemId.
097:             * @param itemId Value to be validated for the property itemId.
098:             * @throws ValidationException if an invalid value is passed
099:             * @throws FrameworkException Indicates some system error
100:             */
101:            public void validateItemId(java.lang.String itemId)
102:                    throws ValidationException, FrameworkException {
103:                // .//GEN-END:itemId_2_be
104:                // Add custom code before validation//GEN-FIRST:itemId_1
105:
106:                // .//GEN-LAST:itemId_1
107:                // .//GEN-BEGIN:itemId_3_be
108:                FieldValidator.validate(itemId,
109:                        (StringFieldMetaData) ItemMeta.META_ITEM_ID, true);
110:                // .//GEN-END:itemId_3_be
111:                // Add custom code after a successful validation//GEN-FIRST:itemId_2
112:
113:                // .//GEN-LAST:itemId_2
114:                // .//GEN-BEGIN:itemId_4_be
115:            }
116:
117:            // .//GEN-END:itemId_4_be
118:            // .//GEN-BEGIN:sc_be
119:            /** Getter for property sc.
120:             * @return Value of property sc.
121:             */
122:            public java.lang.String getSc() {
123:                return m_sc;
124:            }
125:
126:            /** Setter for property sc.
127:             * WARNING: This is strictly for use by the Persistence Engine. A developer should never use this method. Instead, use the update(field.Name.Upper1) method.
128:             * @param sc New value of property sc.
129:             */
130:            public void setSc(java.lang.String sc) {
131:                m_sc = sc;
132:            }
133:
134:            /** Use this method to update the property sc.
135:             * This method will do nothing and simply return if the input value is the same as the current value.
136:             * Validation will be performed on the input value.
137:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
138:             * @param sc New value of property sc.
139:             * @throws ValidationException if an invalid value is passed.
140:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
141:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
142:             * @throws FrameworkException Indicates some system error
143:             */
144:            public void updateSc(java.lang.String sc)
145:                    throws ValidationException, ReadOnlyObjectException,
146:                    AlreadyLockedObjectException, FrameworkException {
147:                // ignore, if the current value and new value are the same
148:                if (m_sc == null ? sc == null : m_sc.equals(sc))
149:                    return;
150:
151:                validateSc(sc);
152:                // .//GEN-END:sc_be
153:                // Add custom code before setting the value//GEN-FIRST:sc
154:
155:                // .//GEN-LAST:sc
156:                // .//GEN-BEGIN:sc_1_be
157:                super .update();
158:                setSc(sc);
159:                // .//GEN-END:sc_1_be
160:                // Add custom code after setting the value//GEN-FIRST:sc_3
161:
162:                // .//GEN-LAST:sc_3
163:                // .//GEN-BEGIN:sc_2_be
164:            }
165:
166:            /** Use this method to validate a value for the property sc.
167:             * @param sc Value to be validated for the property sc.
168:             * @throws ValidationException if an invalid value is passed
169:             * @throws FrameworkException Indicates some system error
170:             */
171:            public void validateSc(java.lang.String sc)
172:                    throws ValidationException, FrameworkException {
173:                // .//GEN-END:sc_2_be
174:                // Add custom code before validation//GEN-FIRST:sc_1
175:
176:                // .//GEN-LAST:sc_1
177:                // .//GEN-BEGIN:sc_3_be
178:                FieldValidator.validate(sc,
179:                        (StringFieldMetaData) ItemMeta.META_SC, true);
180:                // .//GEN-END:sc_3_be
181:                // Add custom code after a successful validation//GEN-FIRST:sc_2
182:
183:                // .//GEN-LAST:sc_2
184:                // .//GEN-BEGIN:sc_4_be
185:            }
186:
187:            // .//GEN-END:sc_4_be
188:            // .//GEN-BEGIN:part_be
189:            /** Getter for property part.
190:             * @return Value of property part.
191:             */
192:            public java.lang.String getPart() {
193:                return m_part;
194:            }
195:
196:            /** Setter for property part.
197:             * WARNING: This is strictly for use by the Persistence Engine. A developer should never use this method. Instead, use the update(field.Name.Upper1) method.
198:             * @param part New value of property part.
199:             */
200:            public void setPart(java.lang.String part) {
201:                m_part = part;
202:            }
203:
204:            /** Use this method to update the property part.
205:             * This method will do nothing and simply return if the input value is the same as the current value.
206:             * Validation will be performed on the input value.
207:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
208:             * @param part New value of property part.
209:             * @throws ValidationException if an invalid value is passed.
210:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
211:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
212:             * @throws FrameworkException Indicates some system error
213:             */
214:            public void updatePart(java.lang.String part)
215:                    throws ValidationException, ReadOnlyObjectException,
216:                    AlreadyLockedObjectException, FrameworkException {
217:                // ignore, if the current value and new value are the same
218:                if (m_part == null ? part == null : m_part.equals(part))
219:                    return;
220:
221:                validatePart(part);
222:                // .//GEN-END:part_be
223:                // Add custom code before setting the value//GEN-FIRST:part
224:
225:                // .//GEN-LAST:part
226:                // .//GEN-BEGIN:part_1_be
227:                super .update();
228:                setPart(part);
229:                // .//GEN-END:part_1_be
230:                // Add custom code after setting the value//GEN-FIRST:part_3
231:
232:                // .//GEN-LAST:part_3
233:                // .//GEN-BEGIN:part_2_be
234:            }
235:
236:            /** Use this method to validate a value for the property part.
237:             * @param part Value to be validated for the property part.
238:             * @throws ValidationException if an invalid value is passed
239:             * @throws FrameworkException Indicates some system error
240:             */
241:            public void validatePart(java.lang.String part)
242:                    throws ValidationException, FrameworkException {
243:                // .//GEN-END:part_2_be
244:                // Add custom code before validation//GEN-FIRST:part_1
245:
246:                // .//GEN-LAST:part_1
247:                // .//GEN-BEGIN:part_3_be
248:                FieldValidator.validate(part,
249:                        (StringFieldMetaData) ItemMeta.META_PART, true);
250:                // .//GEN-END:part_3_be
251:                // Add custom code after a successful validation//GEN-FIRST:part_2
252:
253:                // .//GEN-LAST:part_2
254:                // .//GEN-BEGIN:part_4_be
255:            }
256:
257:            // .//GEN-END:part_4_be
258:            // .//GEN-BEGIN:serial_be
259:            /** Getter for property serial.
260:             * @return Value of property serial.
261:             */
262:            public java.lang.String getSerial() {
263:                return m_serial;
264:            }
265:
266:            /** Setter for property serial.
267:             * WARNING: This is strictly for use by the Persistence Engine. A developer should never use this method. Instead, use the update(field.Name.Upper1) method.
268:             * @param serial New value of property serial.
269:             */
270:            public void setSerial(java.lang.String serial) {
271:                m_serial = serial;
272:            }
273:
274:            /** Use this method to update the property serial.
275:             * This method will do nothing and simply return if the input value is the same as the current value.
276:             * Validation will be performed on the input value.
277:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
278:             * @param serial New value of property serial.
279:             * @throws ValidationException if an invalid value is passed.
280:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
281:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
282:             * @throws FrameworkException Indicates some system error
283:             */
284:            public void updateSerial(java.lang.String serial)
285:                    throws ValidationException, ReadOnlyObjectException,
286:                    AlreadyLockedObjectException, FrameworkException {
287:                // ignore, if the current value and new value are the same
288:                if (m_serial == null ? serial == null : m_serial.equals(serial))
289:                    return;
290:
291:                validateSerial(serial);
292:                // .//GEN-END:serial_be
293:                // Add custom code before setting the value//GEN-FIRST:serial
294:
295:                // .//GEN-LAST:serial
296:                // .//GEN-BEGIN:serial_1_be
297:                super .update();
298:                setSerial(serial);
299:                // .//GEN-END:serial_1_be
300:                // Add custom code after setting the value//GEN-FIRST:serial_3
301:
302:                // .//GEN-LAST:serial_3
303:                // .//GEN-BEGIN:serial_2_be
304:            }
305:
306:            /** Use this method to validate a value for the property serial.
307:             * @param serial Value to be validated for the property serial.
308:             * @throws ValidationException if an invalid value is passed
309:             * @throws FrameworkException Indicates some system error
310:             */
311:            public void validateSerial(java.lang.String serial)
312:                    throws ValidationException, FrameworkException {
313:                // .//GEN-END:serial_2_be
314:                // Add custom code before validation//GEN-FIRST:serial_1
315:
316:                // .//GEN-LAST:serial_1
317:                // .//GEN-BEGIN:serial_3_be
318:                FieldValidator.validate(serial,
319:                        (StringFieldMetaData) ItemMeta.META_SERIAL, true);
320:                // .//GEN-END:serial_3_be
321:                // Add custom code after a successful validation//GEN-FIRST:serial_2
322:
323:                // .//GEN-LAST:serial_2
324:                // .//GEN-BEGIN:serial_4_be
325:            }
326:
327:            // .//GEN-END:serial_4_be
328:            // .//GEN-BEGIN:qty_be
329:            /** Getter for property qty.
330:             * @return Value of property qty.
331:             */
332:            public java.lang.Double getQty() {
333:                return m_qty;
334:            }
335:
336:            /** Setter for property qty.
337:             * WARNING: This is strictly for use by the Persistence Engine. A developer should never use this method. Instead, use the update(field.Name.Upper1) method.
338:             * @param qty New value of property qty.
339:             */
340:            public void setQty(java.lang.Double qty) {
341:                m_qty = qty;
342:            }
343:
344:            /** Use this method to update the property qty.
345:             * This method will do nothing and simply return if the input value is the same as the current value.
346:             * Validation will be performed on the input value.
347:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
348:             * @param qty New value of property qty.
349:             * @throws ValidationException if an invalid value is passed.
350:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
351:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
352:             * @throws FrameworkException Indicates some system error
353:             */
354:            public void updateQty(java.lang.Double qty)
355:                    throws ValidationException, ReadOnlyObjectException,
356:                    AlreadyLockedObjectException, FrameworkException {
357:                // ignore, if the current value and new value are the same
358:                if (m_qty == null ? qty == null : m_qty.equals(qty))
359:                    return;
360:
361:                validateQty(qty);
362:                // .//GEN-END:qty_be
363:                // Add custom code before setting the value//GEN-FIRST:qty
364:
365:                // .//GEN-LAST:qty
366:                // .//GEN-BEGIN:qty_1_be
367:                super .update();
368:                setQty(qty);
369:                // .//GEN-END:qty_1_be
370:                // Add custom code after setting the value//GEN-FIRST:qty_3
371:
372:                // .//GEN-LAST:qty_3
373:                // .//GEN-BEGIN:qty_2_be
374:            }
375:
376:            /** Use this method to validate a value for the property qty.
377:             * @param qty Value to be validated for the property qty.
378:             * @throws ValidationException if an invalid value is passed
379:             * @throws FrameworkException Indicates some system error
380:             */
381:            public void validateQty(java.lang.Double qty)
382:                    throws ValidationException, FrameworkException {
383:                // .//GEN-END:qty_2_be
384:                // Add custom code before validation//GEN-FIRST:qty_1
385:
386:                // .//GEN-LAST:qty_1
387:                // .//GEN-BEGIN:qty_3_be
388:                FieldValidator.validate(qty,
389:                        (DecimalFieldMetaData) ItemMeta.META_QTY, true);
390:                // .//GEN-END:qty_3_be
391:                // Add custom code after a successful validation//GEN-FIRST:qty_2
392:
393:                // .//GEN-LAST:qty_2
394:                // .//GEN-BEGIN:qty_4_be
395:            }
396:
397:            // .//GEN-END:qty_4_be
398:            // .//GEN-BEGIN:3_be
399:            /** This returns the diagnostic information.
400:             * @return the diagnostic information.
401:             */
402:            public String toString() {
403:                StringBuffer buf = new StringBuffer();
404:                buf.append("<Item>");
405:                buf.append("<itemId>");
406:                if (m_itemId != null)
407:                    buf.append(m_itemId);
408:                buf.append("</itemId>");
409:                buf.append("<sc>");
410:                if (m_sc != null)
411:                    buf.append(m_sc);
412:                buf.append("</sc>");
413:                buf.append("<part>");
414:                if (m_part != null)
415:                    buf.append(m_part);
416:                buf.append("</part>");
417:                buf.append("<serial>");
418:                if (m_serial != null)
419:                    buf.append(m_serial);
420:                buf.append("</serial>");
421:                buf.append("<qty>");
422:                if (m_qty != null)
423:                    buf.append(m_qty);
424:                buf.append("</qty>");
425:                buf.append(super .toString());
426:                buf.append("</Item>");
427:                return buf.toString();
428:            }
429:
430:            // .//GEN-END:3_be
431:            // All the custom code goes here//GEN-FIRST:custom
432:
433:            // .//GEN-LAST:custom
434:        }
ww___w__.jav_a_2___s.__c__om_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.