Source Code Cross Referenced for ItemPO.java in  » Database-ORM » ODAL » com » odal » petstore » persistence » gen » pos » 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 » Database ORM » ODAL » com.odal.petstore.persistence.gen.pos 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * GENERATED CODE: DO NOT MODIFY IT UNDER ANY CIRCUMSTANCES!!!
003:         */package com.odal.petstore.persistence.gen.pos;
004:
005:        import com.completex.objective.components.persistency.key.impl.DefaultNaturalKeyFactory;
006:        import java.util.Date;
007:        import java.util.HashMap;
008:        import java.util.Map;
009:        import java.io.InputStream;
010:        import java.math.BigDecimal;
011:        import java.math.BigInteger;
012:        import java.sql.Clob;
013:        import java.sql.Blob;
014:        import com.completex.objective.components.persistency.*;
015:        import com.completex.objective.components.persistency.key.impl.DefaultNaturalKeyFactory;
016:
017:        import java.math.BigDecimal;
018:
019:        public class ItemPO extends PersistentObject implements 
020:                java.io.Externalizable {
021:            //
022:            // Complex object related:
023:            //
024:
025:            //
026:            private static Map registeredMasters;
027:            private static Object lock = new Object();
028:
029:            protected Object classLock() {
030:                return lock;
031:            }
032:
033:            protected void instantiateRegisteredMasters() {
034:                if (registeredMasters == null) {
035:                    synchronized (lock) {
036:                        if (registeredMasters == null) {
037:                            registeredMasters = new HashMap();
038:                        }
039:                    }
040:                }
041:            }
042:
043:            protected Map registeredMasters() {
044:                return registeredMasters;
045:            }
046:
047:            //
048:            //
049:            //
050:
051:            public static final String TABLE_ITEM = "ITEM";
052:
053:            public ItemPO() {
054:                super (new Record(table));
055:            }
056:
057:            public ItemPO(String itemId) {
058:                this ();
059:                setItemId(itemId);
060:            }
061:
062:            public static final String COL_ITEM_ID = "ITEM_ID";
063:            public static final String TCOL_ITEM_ID = "ITEM.ITEM_ID";
064:            public static final int ICOL_ITEM_ID = 0;
065:            public static final int JDBC_TYPE_ITEM_ID = 12;
066:
067:            public static final String COL_PRODUCT_ID = "PRODUCT_ID";
068:            public static final String TCOL_PRODUCT_ID = "ITEM.PRODUCT_ID";
069:            public static final int ICOL_PRODUCT_ID = 1;
070:            public static final int JDBC_TYPE_PRODUCT_ID = 12;
071:
072:            public static final String COL_LIST_PRICE = "LIST_PRICE";
073:            public static final String TCOL_LIST_PRICE = "ITEM.LIST_PRICE";
074:            public static final int ICOL_LIST_PRICE = 2;
075:            public static final int JDBC_TYPE_LIST_PRICE = 3;
076:
077:            public static final String COL_UNIT_COST = "UNIT_COST";
078:            public static final String TCOL_UNIT_COST = "ITEM.UNIT_COST";
079:            public static final int ICOL_UNIT_COST = 3;
080:            public static final int JDBC_TYPE_UNIT_COST = 3;
081:
082:            public static final String COL_SUPPLIER = "SUPPLIER";
083:            public static final String TCOL_SUPPLIER = "ITEM.SUPPLIER";
084:            public static final int ICOL_SUPPLIER = 4;
085:            public static final int JDBC_TYPE_SUPPLIER = 4;
086:
087:            public static final String COL_STATUS = "STATUS";
088:            public static final String TCOL_STATUS = "ITEM.STATUS";
089:            public static final int ICOL_STATUS = 5;
090:            public static final int JDBC_TYPE_STATUS = 12;
091:
092:            public static final String COL_ATTR1 = "ATTR1";
093:            public static final String TCOL_ATTR1 = "ITEM.ATTR1";
094:            public static final int ICOL_ATTR1 = 6;
095:            public static final int JDBC_TYPE_ATTR1 = 12;
096:
097:            public static final String COL_ATTR2 = "ATTR2";
098:            public static final String TCOL_ATTR2 = "ITEM.ATTR2";
099:            public static final int ICOL_ATTR2 = 7;
100:            public static final int JDBC_TYPE_ATTR2 = 12;
101:
102:            public static final String COL_ATTR3 = "ATTR3";
103:            public static final String TCOL_ATTR3 = "ITEM.ATTR3";
104:            public static final int ICOL_ATTR3 = 8;
105:            public static final int JDBC_TYPE_ATTR3 = 12;
106:
107:            public static final String COL_ATTR4 = "ATTR4";
108:            public static final String TCOL_ATTR4 = "ITEM.ATTR4";
109:            public static final int ICOL_ATTR4 = 9;
110:            public static final int JDBC_TYPE_ATTR4 = 12;
111:
112:            public static final String COL_ATTR5 = "ATTR5";
113:            public static final String TCOL_ATTR5 = "ITEM.ATTR5";
114:            public static final int ICOL_ATTR5 = 10;
115:            public static final int JDBC_TYPE_ATTR5 = 12;
116:
117:            private static final MetaTable table = new MetaTable("ITEM",
118:                    "ITEM", 11, 1);
119:
120:            static {
121:                table.setStaticFinal(true);
122:                //
123:                // Meta Foreign Keys:
124:                //
125:                table.addToForeignKey("SUPPLIER", new ForeignKeyEntry(
126:                        "SUPP_ID", "SUPPLIER"));
127:                table.addToForeignKey("PRODUCT", new ForeignKeyEntry(
128:                        "PRODUCT_ID", "PRODUCT_ID"));
129:                //
130:                // Meta Natural Key:
131:                //
132:                // naturalKey has no context 
133:
134:                //
135:                // Meta Columns:
136:                //
137:
138:                final MetaColumn metaItemId = new MetaColumn(ICOL_ITEM_ID,
139:                        "ITEM_ID", "ITEM_ID", table);
140:                metaItemId.setPrimaryKey(true);
141:                metaItemId.setRequired(true);
142:                metaItemId.setOptimisticLock(false);
143:                metaItemId.setType(ColumnType.STRING);
144:                metaItemId.setColumnSize(10);
145:                metaItemId.setRemarks("");
146:                metaItemId.setDecimalDigits(0);
147:                metaItemId.setAutoGenerated(false);
148:                metaItemId.setAutoIncrement(false);
149:                metaItemId.setJdbcType(12);
150:                table.addToPrimaryKey(new Integer(ICOL_ITEM_ID));
151:                table.addColumn(metaItemId);
152:
153:                final MetaColumn metaProductId = new MetaColumn(
154:                        ICOL_PRODUCT_ID, "PRODUCT_ID", "PRODUCT_ID", table);
155:                metaProductId.setPrimaryKey(false);
156:                metaProductId.setRequired(true);
157:                metaProductId.setOptimisticLock(false);
158:                metaProductId.setType(ColumnType.STRING);
159:                metaProductId.setColumnSize(10);
160:                metaProductId.setRemarks("");
161:                metaProductId.setDecimalDigits(0);
162:                metaProductId.setAutoGenerated(false);
163:                metaProductId.setAutoIncrement(false);
164:                metaProductId.setJdbcType(12);
165:                table.addColumn(metaProductId);
166:
167:                final MetaColumn metaListPrice = new MetaColumn(
168:                        ICOL_LIST_PRICE, "LIST_PRICE", "LIST_PRICE", table);
169:                metaListPrice.setPrimaryKey(false);
170:                metaListPrice.setRequired(false);
171:                metaListPrice.setOptimisticLock(false);
172:                metaListPrice.setType(ColumnType.BIGDECIMAL);
173:                metaListPrice.setColumnSize(10);
174:                metaListPrice.setRemarks("");
175:                metaListPrice.setDecimalDigits(2);
176:                metaListPrice.setAutoGenerated(false);
177:                metaListPrice.setAutoIncrement(false);
178:                metaListPrice.setJdbcType(3);
179:                table.addColumn(metaListPrice);
180:
181:                final MetaColumn metaUnitCost = new MetaColumn(ICOL_UNIT_COST,
182:                        "UNIT_COST", "UNIT_COST", table);
183:                metaUnitCost.setPrimaryKey(false);
184:                metaUnitCost.setRequired(false);
185:                metaUnitCost.setOptimisticLock(false);
186:                metaUnitCost.setType(ColumnType.BIGDECIMAL);
187:                metaUnitCost.setColumnSize(10);
188:                metaUnitCost.setRemarks("");
189:                metaUnitCost.setDecimalDigits(2);
190:                metaUnitCost.setAutoGenerated(false);
191:                metaUnitCost.setAutoIncrement(false);
192:                metaUnitCost.setJdbcType(3);
193:                table.addColumn(metaUnitCost);
194:
195:                final MetaColumn metaSupplier = new MetaColumn(ICOL_SUPPLIER,
196:                        "SUPPLIER", "SUPPLIER", table);
197:                metaSupplier.setPrimaryKey(false);
198:                metaSupplier.setRequired(false);
199:                metaSupplier.setOptimisticLock(false);
200:                metaSupplier.setType(ColumnType.LONG);
201:                metaSupplier.setColumnSize(0);
202:                metaSupplier.setRemarks("");
203:                metaSupplier.setDecimalDigits(0);
204:                metaSupplier.setAutoGenerated(false);
205:                metaSupplier.setAutoIncrement(false);
206:                metaSupplier.setJdbcType(4);
207:                table.addColumn(metaSupplier);
208:
209:                final MetaColumn metaStatus = new MetaColumn(ICOL_STATUS,
210:                        "STATUS", "STATUS", table);
211:                metaStatus.setPrimaryKey(false);
212:                metaStatus.setRequired(false);
213:                metaStatus.setOptimisticLock(false);
214:                metaStatus.setType(ColumnType.STRING);
215:                metaStatus.setColumnSize(2);
216:                metaStatus.setRemarks("");
217:                metaStatus.setDecimalDigits(0);
218:                metaStatus.setAutoGenerated(false);
219:                metaStatus.setAutoIncrement(false);
220:                metaStatus.setJdbcType(12);
221:                table.addColumn(metaStatus);
222:
223:                final MetaColumn metaAttr1 = new MetaColumn(ICOL_ATTR1,
224:                        "ATTR1", "ATTR1", table);
225:                metaAttr1.setPrimaryKey(false);
226:                metaAttr1.setRequired(false);
227:                metaAttr1.setOptimisticLock(false);
228:                metaAttr1.setType(ColumnType.STRING);
229:                metaAttr1.setColumnSize(80);
230:                metaAttr1.setRemarks("");
231:                metaAttr1.setDecimalDigits(0);
232:                metaAttr1.setAutoGenerated(false);
233:                metaAttr1.setAutoIncrement(false);
234:                metaAttr1.setJdbcType(12);
235:                table.addColumn(metaAttr1);
236:
237:                final MetaColumn metaAttr2 = new MetaColumn(ICOL_ATTR2,
238:                        "ATTR2", "ATTR2", table);
239:                metaAttr2.setPrimaryKey(false);
240:                metaAttr2.setRequired(false);
241:                metaAttr2.setOptimisticLock(false);
242:                metaAttr2.setType(ColumnType.STRING);
243:                metaAttr2.setColumnSize(80);
244:                metaAttr2.setRemarks("");
245:                metaAttr2.setDecimalDigits(0);
246:                metaAttr2.setAutoGenerated(false);
247:                metaAttr2.setAutoIncrement(false);
248:                metaAttr2.setJdbcType(12);
249:                table.addColumn(metaAttr2);
250:
251:                final MetaColumn metaAttr3 = new MetaColumn(ICOL_ATTR3,
252:                        "ATTR3", "ATTR3", table);
253:                metaAttr3.setPrimaryKey(false);
254:                metaAttr3.setRequired(false);
255:                metaAttr3.setOptimisticLock(false);
256:                metaAttr3.setType(ColumnType.STRING);
257:                metaAttr3.setColumnSize(80);
258:                metaAttr3.setRemarks("");
259:                metaAttr3.setDecimalDigits(0);
260:                metaAttr3.setAutoGenerated(false);
261:                metaAttr3.setAutoIncrement(false);
262:                metaAttr3.setJdbcType(12);
263:                table.addColumn(metaAttr3);
264:
265:                final MetaColumn metaAttr4 = new MetaColumn(ICOL_ATTR4,
266:                        "ATTR4", "ATTR4", table);
267:                metaAttr4.setPrimaryKey(false);
268:                metaAttr4.setRequired(false);
269:                metaAttr4.setOptimisticLock(false);
270:                metaAttr4.setType(ColumnType.STRING);
271:                metaAttr4.setColumnSize(80);
272:                metaAttr4.setRemarks("");
273:                metaAttr4.setDecimalDigits(0);
274:                metaAttr4.setAutoGenerated(false);
275:                metaAttr4.setAutoIncrement(false);
276:                metaAttr4.setJdbcType(12);
277:                table.addColumn(metaAttr4);
278:
279:                final MetaColumn metaAttr5 = new MetaColumn(ICOL_ATTR5,
280:                        "ATTR5", "ATTR5", table);
281:                metaAttr5.setPrimaryKey(false);
282:                metaAttr5.setRequired(false);
283:                metaAttr5.setOptimisticLock(false);
284:                metaAttr5.setType(ColumnType.STRING);
285:                metaAttr5.setColumnSize(80);
286:                metaAttr5.setRemarks("");
287:                metaAttr5.setDecimalDigits(0);
288:                metaAttr5.setAutoGenerated(false);
289:                metaAttr5.setAutoIncrement(false);
290:                metaAttr5.setJdbcType(12);
291:                table.addColumn(metaAttr5);
292:
293:            }
294:
295:            private String itemId;
296:            private String productId;
297:            private BigDecimal listPrice;
298:            private BigDecimal unitCost;
299:            private Long supplier;
300:            private String status;
301:            private String attr1;
302:            private String attr2;
303:            private String attr3;
304:            private String attr4;
305:            private String attr5;
306:
307:            //
308:            // itemId:
309:            //
310:            public String getItemId() {
311:                return this .itemId;
312:            }
313:
314:            public void setItemId(String itemId) {
315:                if (record2().setObject(ICOL_ITEM_ID, itemId)) {
316:                    this .itemId = itemId;
317:                }
318:            }
319:
320:            public boolean izNullItemId() {
321:                return record2().getObject(ICOL_ITEM_ID) == null;
322:            }
323:
324:            public void setNullItemId() {
325:                if (record2().setObject(ICOL_ITEM_ID, null)) {
326:                    this .itemId = null;
327:                }
328:            }
329:
330:            //
331:            // productId:
332:            //
333:            public String getProductId() {
334:                return this .productId;
335:            }
336:
337:            public void setProductId(String productId) {
338:                if (record2().setObject(ICOL_PRODUCT_ID, productId)) {
339:                    this .productId = productId;
340:                }
341:            }
342:
343:            public boolean izNullProductId() {
344:                return record2().getObject(ICOL_PRODUCT_ID) == null;
345:            }
346:
347:            public void setNullProductId() {
348:                if (record2().setObject(ICOL_PRODUCT_ID, null)) {
349:                    this .productId = null;
350:                }
351:            }
352:
353:            //
354:            // listPrice:
355:            //
356:            public BigDecimal getListPrice() {
357:                return this .listPrice;
358:            }
359:
360:            public void setListPrice(BigDecimal listPrice) {
361:                if (record2().setObject(ICOL_LIST_PRICE, listPrice)) {
362:                    this .listPrice = listPrice;
363:                }
364:            }
365:
366:            public boolean izNullListPrice() {
367:                return record2().getObject(ICOL_LIST_PRICE) == null;
368:            }
369:
370:            public void setNullListPrice() {
371:                if (record2().setObject(ICOL_LIST_PRICE, null)) {
372:                    this .listPrice = null;
373:                }
374:            }
375:
376:            //
377:            // unitCost:
378:            //
379:            public BigDecimal getUnitCost() {
380:                return this .unitCost;
381:            }
382:
383:            public void setUnitCost(BigDecimal unitCost) {
384:                if (record2().setObject(ICOL_UNIT_COST, unitCost)) {
385:                    this .unitCost = unitCost;
386:                }
387:            }
388:
389:            public boolean izNullUnitCost() {
390:                return record2().getObject(ICOL_UNIT_COST) == null;
391:            }
392:
393:            public void setNullUnitCost() {
394:                if (record2().setObject(ICOL_UNIT_COST, null)) {
395:                    this .unitCost = null;
396:                }
397:            }
398:
399:            //
400:            // supplier:
401:            //
402:            public Long getSupplier() {
403:                return this .supplier;
404:            }
405:
406:            public void setSupplier(Long supplier) {
407:                if (record2().setObject(ICOL_SUPPLIER, supplier)) {
408:                    this .supplier = supplier;
409:                }
410:            }
411:
412:            public boolean izNullSupplier() {
413:                return record2().getObject(ICOL_SUPPLIER) == null;
414:            }
415:
416:            public void setNullSupplier() {
417:                if (record2().setObject(ICOL_SUPPLIER, null)) {
418:                    this .supplier = null;
419:                }
420:            }
421:
422:            //
423:            // status:
424:            //
425:            public String getStatus() {
426:                return this .status;
427:            }
428:
429:            public void setStatus(String status) {
430:                if (record2().setObject(ICOL_STATUS, status)) {
431:                    this .status = status;
432:                }
433:            }
434:
435:            public boolean izNullStatus() {
436:                return record2().getObject(ICOL_STATUS) == null;
437:            }
438:
439:            public void setNullStatus() {
440:                if (record2().setObject(ICOL_STATUS, null)) {
441:                    this .status = null;
442:                }
443:            }
444:
445:            //
446:            // attr1:
447:            //
448:            public String getAttr1() {
449:                return this .attr1;
450:            }
451:
452:            public void setAttr1(String attr1) {
453:                if (record2().setObject(ICOL_ATTR1, attr1)) {
454:                    this .attr1 = attr1;
455:                }
456:            }
457:
458:            public boolean izNullAttr1() {
459:                return record2().getObject(ICOL_ATTR1) == null;
460:            }
461:
462:            public void setNullAttr1() {
463:                if (record2().setObject(ICOL_ATTR1, null)) {
464:                    this .attr1 = null;
465:                }
466:            }
467:
468:            //
469:            // attr2:
470:            //
471:            public String getAttr2() {
472:                return this .attr2;
473:            }
474:
475:            public void setAttr2(String attr2) {
476:                if (record2().setObject(ICOL_ATTR2, attr2)) {
477:                    this .attr2 = attr2;
478:                }
479:            }
480:
481:            public boolean izNullAttr2() {
482:                return record2().getObject(ICOL_ATTR2) == null;
483:            }
484:
485:            public void setNullAttr2() {
486:                if (record2().setObject(ICOL_ATTR2, null)) {
487:                    this .attr2 = null;
488:                }
489:            }
490:
491:            //
492:            // attr3:
493:            //
494:            public String getAttr3() {
495:                return this .attr3;
496:            }
497:
498:            public void setAttr3(String attr3) {
499:                if (record2().setObject(ICOL_ATTR3, attr3)) {
500:                    this .attr3 = attr3;
501:                }
502:            }
503:
504:            public boolean izNullAttr3() {
505:                return record2().getObject(ICOL_ATTR3) == null;
506:            }
507:
508:            public void setNullAttr3() {
509:                if (record2().setObject(ICOL_ATTR3, null)) {
510:                    this .attr3 = null;
511:                }
512:            }
513:
514:            //
515:            // attr4:
516:            //
517:            public String getAttr4() {
518:                return this .attr4;
519:            }
520:
521:            public void setAttr4(String attr4) {
522:                if (record2().setObject(ICOL_ATTR4, attr4)) {
523:                    this .attr4 = attr4;
524:                }
525:            }
526:
527:            public boolean izNullAttr4() {
528:                return record2().getObject(ICOL_ATTR4) == null;
529:            }
530:
531:            public void setNullAttr4() {
532:                if (record2().setObject(ICOL_ATTR4, null)) {
533:                    this .attr4 = null;
534:                }
535:            }
536:
537:            //
538:            // attr5:
539:            //
540:            public String getAttr5() {
541:                return this .attr5;
542:            }
543:
544:            public void setAttr5(String attr5) {
545:                if (record2().setObject(ICOL_ATTR5, attr5)) {
546:                    this .attr5 = attr5;
547:                }
548:            }
549:
550:            public boolean izNullAttr5() {
551:                return record2().getObject(ICOL_ATTR5) == null;
552:            }
553:
554:            public void setNullAttr5() {
555:                if (record2().setObject(ICOL_ATTR5, null)) {
556:                    this .attr5 = null;
557:                }
558:            }
559:
560:            public void toBeanFields() {
561:                toBeanFields(this );
562:            }
563:
564:            public void toBeanFields(PersistentObject from) {
565:                itemId = (String) from.record2().getObject(ICOL_ITEM_ID);
566:                productId = (String) from.record2().getObject(ICOL_PRODUCT_ID);
567:                listPrice = (BigDecimal) from.record2().getObject(
568:                        ICOL_LIST_PRICE);
569:                unitCost = (BigDecimal) from.record2()
570:                        .getObject(ICOL_UNIT_COST);
571:                supplier = (Long) from.record2().getObject(ICOL_SUPPLIER);
572:                status = (String) from.record2().getObject(ICOL_STATUS);
573:                attr1 = (String) from.record2().getObject(ICOL_ATTR1);
574:                attr2 = (String) from.record2().getObject(ICOL_ATTR2);
575:                attr3 = (String) from.record2().getObject(ICOL_ATTR3);
576:                attr4 = (String) from.record2().getObject(ICOL_ATTR4);
577:                attr5 = (String) from.record2().getObject(ICOL_ATTR5);
578:                super .toBeanFields(from);
579:            }
580:
581:            public void fromBeanFields(PersistentObject persistentObject) {
582:                ItemPO from = (ItemPO) persistentObject;
583:                record2().getEntry(ICOL_ITEM_ID).setUnmarkedValue(from.itemId,
584:                        from.itemId);
585:                record2().getEntry(ICOL_PRODUCT_ID).setUnmarkedValue(
586:                        from.productId, from.productId);
587:                record2().getEntry(ICOL_LIST_PRICE).setUnmarkedValue(
588:                        from.listPrice, from.listPrice);
589:                record2().getEntry(ICOL_UNIT_COST).setUnmarkedValue(
590:                        from.unitCost, from.unitCost);
591:                record2().getEntry(ICOL_SUPPLIER).setUnmarkedValue(
592:                        from.supplier, from.supplier);
593:                record2().getEntry(ICOL_STATUS).setUnmarkedValue(from.status,
594:                        from.status);
595:                record2().getEntry(ICOL_ATTR1).setUnmarkedValue(from.attr1,
596:                        from.attr1);
597:                record2().getEntry(ICOL_ATTR2).setUnmarkedValue(from.attr2,
598:                        from.attr2);
599:                record2().getEntry(ICOL_ATTR3).setUnmarkedValue(from.attr3,
600:                        from.attr3);
601:                record2().getEntry(ICOL_ATTR4).setUnmarkedValue(from.attr4,
602:                        from.attr4);
603:                record2().getEntry(ICOL_ATTR5).setUnmarkedValue(from.attr5,
604:                        from.attr5);
605:                super .fromBeanFieldsDataSaved(persistentObject);
606:            }
607:
608:            public String toString() {
609:
610:                StringBuffer buffer = new StringBuffer();
611:                buffer.append("{ " + "class = ").append(
612:                        this .getClass().getName()).append(" " + "table = ")
613:                        .append(TABLE_ITEM).append(" columns = {");
614:
615:                if (record() != null) {
616:                    buffer.append(COL_ITEM_ID).append(" = ").append(
617:                            record().getObject(ICOL_ITEM_ID)).append(" ");
618:                    buffer.append(COL_PRODUCT_ID).append(" = ").append(
619:                            record().getObject(ICOL_PRODUCT_ID)).append(" ");
620:                    buffer.append(COL_LIST_PRICE).append(" = ").append(
621:                            record().getObject(ICOL_LIST_PRICE)).append(" ");
622:                    buffer.append(COL_UNIT_COST).append(" = ").append(
623:                            record().getObject(ICOL_UNIT_COST)).append(" ");
624:                    buffer.append(COL_SUPPLIER).append(" = ").append(
625:                            record().getObject(ICOL_SUPPLIER)).append(" ");
626:                    buffer.append(COL_STATUS).append(" = ").append(
627:                            record().getObject(ICOL_STATUS)).append(" ");
628:                    buffer.append(COL_ATTR1).append(" = ").append(
629:                            record().getObject(ICOL_ATTR1)).append(" ");
630:                    buffer.append(COL_ATTR2).append(" = ").append(
631:                            record().getObject(ICOL_ATTR2)).append(" ");
632:                    buffer.append(COL_ATTR3).append(" = ").append(
633:                            record().getObject(ICOL_ATTR3)).append(" ");
634:                    buffer.append(COL_ATTR4).append(" = ").append(
635:                            record().getObject(ICOL_ATTR4)).append(" ");
636:                    buffer.append(COL_ATTR5).append(" = ").append(
637:                            record().getObject(ICOL_ATTR5)).append(" ");
638:                } else {
639:                    buffer.append(COL_ITEM_ID).append(" = ").append(itemId)
640:                            .append(" ");
641:                    buffer.append(COL_PRODUCT_ID).append(" = ").append(
642:                            productId).append(" ");
643:                    buffer.append(COL_LIST_PRICE).append(" = ").append(
644:                            listPrice).append(" ");
645:                    buffer.append(COL_UNIT_COST).append(" = ").append(unitCost)
646:                            .append(" ");
647:                    buffer.append(COL_SUPPLIER).append(" = ").append(supplier)
648:                            .append(" ");
649:                    buffer.append(COL_STATUS).append(" = ").append(status)
650:                            .append(" ");
651:                    buffer.append(COL_ATTR1).append(" = ").append(attr1)
652:                            .append(" ");
653:                    buffer.append(COL_ATTR2).append(" = ").append(attr2)
654:                            .append(" ");
655:                    buffer.append(COL_ATTR3).append(" = ").append(attr3)
656:                            .append(" ");
657:                    buffer.append(COL_ATTR4).append(" = ").append(attr4)
658:                            .append(" ");
659:                    buffer.append(COL_ATTR5).append(" = ").append(attr5)
660:                            .append(" ");
661:                }
662:                buffer.append("}}");
663:                return buffer.toString();
664:            }
665:
666:            // naturalKey has no context 
667:
668:            /**
669:             * Equals by Basic Peristent object fields (without children objects)
670:             */
671:            public boolean equalsBasic(Object value) {
672:                if (this  == value)
673:                    return true;
674:                if (value == null || getClass() != value.getClass())
675:                    return false;
676:
677:                ItemPO that = (ItemPO) value;
678:
679:                if (itemId != null ? !itemId.equals(that.itemId)
680:                        : that.itemId != null)
681:                    return false;
682:                if (productId != null ? !productId.equals(that.productId)
683:                        : that.productId != null)
684:                    return false;
685:                if (listPrice != null ? !listPrice.equals(that.listPrice)
686:                        : that.listPrice != null)
687:                    return false;
688:                if (unitCost != null ? !unitCost.equals(that.unitCost)
689:                        : that.unitCost != null)
690:                    return false;
691:                if (supplier != null ? !supplier.equals(that.supplier)
692:                        : that.supplier != null)
693:                    return false;
694:                if (status != null ? !status.equals(that.status)
695:                        : that.status != null)
696:                    return false;
697:                if (attr1 != null ? !attr1.equals(that.attr1)
698:                        : that.attr1 != null)
699:                    return false;
700:                if (attr2 != null ? !attr2.equals(that.attr2)
701:                        : that.attr2 != null)
702:                    return false;
703:                if (attr3 != null ? !attr3.equals(that.attr3)
704:                        : that.attr3 != null)
705:                    return false;
706:                if (attr4 != null ? !attr4.equals(that.attr4)
707:                        : that.attr4 != null)
708:                    return false;
709:                if (attr5 != null ? !attr5.equals(that.attr5)
710:                        : that.attr5 != null)
711:                    return false;
712:                return true;
713:            }
714:
715:            /**
716:             * hashCode by Basic Peristent object fields (without children objects)
717:             */
718:            public int hashCodeBasic() {
719:                int result;
720:                long temp;
721:                result = (itemId != null ? itemId.hashCode() : 0);
722:                result = 29 * result
723:                        + (productId != null ? productId.hashCode() : 0);
724:                result = 29 * result
725:                        + (listPrice != null ? listPrice.hashCode() : 0);
726:                result = 29 * result
727:                        + (unitCost != null ? unitCost.hashCode() : 0);
728:                result = 29 * result
729:                        + (supplier != null ? supplier.hashCode() : 0);
730:                result = 29 * result + (status != null ? status.hashCode() : 0);
731:                result = 29 * result + (attr1 != null ? attr1.hashCode() : 0);
732:                result = 29 * result + (attr2 != null ? attr2.hashCode() : 0);
733:                result = 29 * result + (attr3 != null ? attr3.hashCode() : 0);
734:                result = 29 * result + (attr4 != null ? attr4.hashCode() : 0);
735:                result = 29 * result + (attr5 != null ? attr5.hashCode() : 0);
736:
737:                return result;
738:            }
739:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.