Source Code Cross Referenced for AccountPO.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:        public class AccountPO extends PersistentObject implements 
018:                java.io.Externalizable {
019:            //
020:            // Complex object related:
021:            //
022:
023:            //
024:            private static Map registeredMasters;
025:            private static Object lock = new Object();
026:
027:            protected Object classLock() {
028:                return lock;
029:            }
030:
031:            protected void instantiateRegisteredMasters() {
032:                if (registeredMasters == null) {
033:                    synchronized (lock) {
034:                        if (registeredMasters == null) {
035:                            registeredMasters = new HashMap();
036:                        }
037:                    }
038:                }
039:            }
040:
041:            protected Map registeredMasters() {
042:                return registeredMasters;
043:            }
044:
045:            //
046:            //
047:            //
048:
049:            public static final String TABLE_ACCOUNT = "ACCOUNT";
050:
051:            public AccountPO() {
052:                super (new Record(table));
053:            }
054:
055:            public AccountPO(String userId) {
056:                this ();
057:                setUserId(userId);
058:            }
059:
060:            public static final String COL_USER_ID = "USER_ID";
061:            public static final String TCOL_USER_ID = "ACCOUNT.USER_ID";
062:            public static final int ICOL_USER_ID = 0;
063:            public static final int JDBC_TYPE_USER_ID = 12;
064:
065:            public static final String COL_EMAIL = "EMAIL";
066:            public static final String TCOL_EMAIL = "ACCOUNT.EMAIL";
067:            public static final int ICOL_EMAIL = 1;
068:            public static final int JDBC_TYPE_EMAIL = 12;
069:
070:            public static final String COL_FIRST_NAME = "FIRST_NAME";
071:            public static final String TCOL_FIRST_NAME = "ACCOUNT.FIRST_NAME";
072:            public static final int ICOL_FIRST_NAME = 2;
073:            public static final int JDBC_TYPE_FIRST_NAME = 12;
074:
075:            public static final String COL_LAST_NAME = "LAST_NAME";
076:            public static final String TCOL_LAST_NAME = "ACCOUNT.LAST_NAME";
077:            public static final int ICOL_LAST_NAME = 3;
078:            public static final int JDBC_TYPE_LAST_NAME = 12;
079:
080:            public static final String COL_STATUS = "STATUS";
081:            public static final String TCOL_STATUS = "ACCOUNT.STATUS";
082:            public static final int ICOL_STATUS = 4;
083:            public static final int JDBC_TYPE_STATUS = 12;
084:
085:            public static final String COL_ADDRESS1 = "ADDR1";
086:            public static final String TCOL_ADDRESS1 = "ACCOUNT.ADDR1";
087:            public static final int ICOL_ADDRESS1 = 5;
088:            public static final int JDBC_TYPE_ADDRESS1 = 12;
089:
090:            public static final String COL_ADDRESS2 = "ADDR2";
091:            public static final String TCOL_ADDRESS2 = "ACCOUNT.ADDR2";
092:            public static final int ICOL_ADDRESS2 = 6;
093:            public static final int JDBC_TYPE_ADDRESS2 = 12;
094:
095:            public static final String COL_CITY = "CITY";
096:            public static final String TCOL_CITY = "ACCOUNT.CITY";
097:            public static final int ICOL_CITY = 7;
098:            public static final int JDBC_TYPE_CITY = 12;
099:
100:            public static final String COL_STATE = "STATE";
101:            public static final String TCOL_STATE = "ACCOUNT.STATE";
102:            public static final int ICOL_STATE = 8;
103:            public static final int JDBC_TYPE_STATE = 12;
104:
105:            public static final String COL_ZIP = "ZIP";
106:            public static final String TCOL_ZIP = "ACCOUNT.ZIP";
107:            public static final int ICOL_ZIP = 9;
108:            public static final int JDBC_TYPE_ZIP = 12;
109:
110:            public static final String COL_COUNTRY = "COUNTRY";
111:            public static final String TCOL_COUNTRY = "ACCOUNT.COUNTRY";
112:            public static final int ICOL_COUNTRY = 10;
113:            public static final int JDBC_TYPE_COUNTRY = 12;
114:
115:            public static final String COL_PHONE = "PHONE";
116:            public static final String TCOL_PHONE = "ACCOUNT.PHONE";
117:            public static final int ICOL_PHONE = 11;
118:            public static final int JDBC_TYPE_PHONE = 12;
119:
120:            private static final MetaTable table = new MetaTable("ACCOUNT",
121:                    "ACCOUNT", 12, 1);
122:
123:            static {
124:                table.setStaticFinal(true);
125:                //
126:                // Meta Foreign Keys:
127:                //
128:                //
129:                // Meta Natural Key:
130:                //
131:                // naturalKey has no context 
132:
133:                //
134:                // Meta Columns:
135:                //
136:
137:                final MetaColumn metaUserId = new MetaColumn(ICOL_USER_ID,
138:                        "USER_ID", "USER_ID", table);
139:                metaUserId.setPrimaryKey(true);
140:                metaUserId.setRequired(true);
141:                metaUserId.setOptimisticLock(false);
142:                metaUserId.setType(ColumnType.STRING);
143:                metaUserId.setColumnSize(80);
144:                metaUserId.setRemarks("");
145:                metaUserId.setDecimalDigits(0);
146:                metaUserId.setAutoGenerated(false);
147:                metaUserId.setAutoIncrement(false);
148:                metaUserId.setJdbcType(12);
149:                table.addToPrimaryKey(new Integer(ICOL_USER_ID));
150:                table.addColumn(metaUserId);
151:
152:                final MetaColumn metaEmail = new MetaColumn(ICOL_EMAIL,
153:                        "EMAIL", "EMAIL", table);
154:                metaEmail.setPrimaryKey(false);
155:                metaEmail.setRequired(true);
156:                metaEmail.setOptimisticLock(false);
157:                metaEmail.setType(ColumnType.STRING);
158:                metaEmail.setColumnSize(80);
159:                metaEmail.setRemarks("");
160:                metaEmail.setDecimalDigits(0);
161:                metaEmail.setAutoGenerated(false);
162:                metaEmail.setAutoIncrement(false);
163:                metaEmail.setJdbcType(12);
164:                table.addColumn(metaEmail);
165:
166:                final MetaColumn metaFirstName = new MetaColumn(
167:                        ICOL_FIRST_NAME, "FIRST_NAME", "FIRST_NAME", table);
168:                metaFirstName.setPrimaryKey(false);
169:                metaFirstName.setRequired(true);
170:                metaFirstName.setOptimisticLock(false);
171:                metaFirstName.setType(ColumnType.STRING);
172:                metaFirstName.setColumnSize(80);
173:                metaFirstName.setRemarks("");
174:                metaFirstName.setDecimalDigits(0);
175:                metaFirstName.setAutoGenerated(false);
176:                metaFirstName.setAutoIncrement(false);
177:                metaFirstName.setJdbcType(12);
178:                table.addColumn(metaFirstName);
179:
180:                final MetaColumn metaLastName = new MetaColumn(ICOL_LAST_NAME,
181:                        "LAST_NAME", "LAST_NAME", table);
182:                metaLastName.setPrimaryKey(false);
183:                metaLastName.setRequired(true);
184:                metaLastName.setOptimisticLock(false);
185:                metaLastName.setType(ColumnType.STRING);
186:                metaLastName.setColumnSize(80);
187:                metaLastName.setRemarks("");
188:                metaLastName.setDecimalDigits(0);
189:                metaLastName.setAutoGenerated(false);
190:                metaLastName.setAutoIncrement(false);
191:                metaLastName.setJdbcType(12);
192:                table.addColumn(metaLastName);
193:
194:                final MetaColumn metaStatus = new MetaColumn(ICOL_STATUS,
195:                        "STATUS", "STATUS", table);
196:                metaStatus.setPrimaryKey(false);
197:                metaStatus.setRequired(false);
198:                metaStatus.setOptimisticLock(false);
199:                metaStatus.setType(ColumnType.STRING);
200:                metaStatus.setColumnSize(2);
201:                metaStatus.setRemarks("");
202:                metaStatus.setDecimalDigits(0);
203:                metaStatus.setAutoGenerated(false);
204:                metaStatus.setAutoIncrement(false);
205:                metaStatus.setJdbcType(12);
206:                table.addColumn(metaStatus);
207:
208:                final MetaColumn metaAddress1 = new MetaColumn(ICOL_ADDRESS1,
209:                        "ADDR1", "ADDRESS1", table);
210:                metaAddress1.setPrimaryKey(false);
211:                metaAddress1.setRequired(true);
212:                metaAddress1.setOptimisticLock(false);
213:                metaAddress1.setType(ColumnType.STRING);
214:                metaAddress1.setColumnSize(80);
215:                metaAddress1.setRemarks("");
216:                metaAddress1.setDecimalDigits(0);
217:                metaAddress1.setAutoGenerated(false);
218:                metaAddress1.setAutoIncrement(false);
219:                metaAddress1.setJdbcType(12);
220:                table.addColumn(metaAddress1);
221:
222:                final MetaColumn metaAddress2 = new MetaColumn(ICOL_ADDRESS2,
223:                        "ADDR2", "ADDRESS2", table);
224:                metaAddress2.setPrimaryKey(false);
225:                metaAddress2.setRequired(false);
226:                metaAddress2.setOptimisticLock(false);
227:                metaAddress2.setType(ColumnType.STRING);
228:                metaAddress2.setColumnSize(40);
229:                metaAddress2.setRemarks("");
230:                metaAddress2.setDecimalDigits(0);
231:                metaAddress2.setAutoGenerated(false);
232:                metaAddress2.setAutoIncrement(false);
233:                metaAddress2.setJdbcType(12);
234:                table.addColumn(metaAddress2);
235:
236:                final MetaColumn metaCity = new MetaColumn(ICOL_CITY, "CITY",
237:                        "CITY", table);
238:                metaCity.setPrimaryKey(false);
239:                metaCity.setRequired(true);
240:                metaCity.setOptimisticLock(false);
241:                metaCity.setType(ColumnType.STRING);
242:                metaCity.setColumnSize(80);
243:                metaCity.setRemarks("");
244:                metaCity.setDecimalDigits(0);
245:                metaCity.setAutoGenerated(false);
246:                metaCity.setAutoIncrement(false);
247:                metaCity.setJdbcType(12);
248:                table.addColumn(metaCity);
249:
250:                final MetaColumn metaState = new MetaColumn(ICOL_STATE,
251:                        "STATE", "STATE", table);
252:                metaState.setPrimaryKey(false);
253:                metaState.setRequired(true);
254:                metaState.setOptimisticLock(false);
255:                metaState.setType(ColumnType.STRING);
256:                metaState.setColumnSize(80);
257:                metaState.setRemarks("");
258:                metaState.setDecimalDigits(0);
259:                metaState.setAutoGenerated(false);
260:                metaState.setAutoIncrement(false);
261:                metaState.setJdbcType(12);
262:                table.addColumn(metaState);
263:
264:                final MetaColumn metaZip = new MetaColumn(ICOL_ZIP, "ZIP",
265:                        "ZIP", table);
266:                metaZip.setPrimaryKey(false);
267:                metaZip.setRequired(true);
268:                metaZip.setOptimisticLock(false);
269:                metaZip.setType(ColumnType.STRING);
270:                metaZip.setColumnSize(20);
271:                metaZip.setRemarks("");
272:                metaZip.setDecimalDigits(0);
273:                metaZip.setAutoGenerated(false);
274:                metaZip.setAutoIncrement(false);
275:                metaZip.setJdbcType(12);
276:                table.addColumn(metaZip);
277:
278:                final MetaColumn metaCountry = new MetaColumn(ICOL_COUNTRY,
279:                        "COUNTRY", "COUNTRY", table);
280:                metaCountry.setPrimaryKey(false);
281:                metaCountry.setRequired(true);
282:                metaCountry.setOptimisticLock(false);
283:                metaCountry.setType(ColumnType.STRING);
284:                metaCountry.setColumnSize(20);
285:                metaCountry.setRemarks("");
286:                metaCountry.setDecimalDigits(0);
287:                metaCountry.setAutoGenerated(false);
288:                metaCountry.setAutoIncrement(false);
289:                metaCountry.setJdbcType(12);
290:                table.addColumn(metaCountry);
291:
292:                final MetaColumn metaPhone = new MetaColumn(ICOL_PHONE,
293:                        "PHONE", "PHONE", table);
294:                metaPhone.setPrimaryKey(false);
295:                metaPhone.setRequired(true);
296:                metaPhone.setOptimisticLock(false);
297:                metaPhone.setType(ColumnType.STRING);
298:                metaPhone.setColumnSize(80);
299:                metaPhone.setRemarks("");
300:                metaPhone.setDecimalDigits(0);
301:                metaPhone.setAutoGenerated(false);
302:                metaPhone.setAutoIncrement(false);
303:                metaPhone.setJdbcType(12);
304:                table.addColumn(metaPhone);
305:
306:            }
307:
308:            private String userId;
309:            private String email;
310:            private String firstName;
311:            private String lastName;
312:            private String status;
313:            private String address1;
314:            private String address2;
315:            private String city;
316:            private String state;
317:            private String zip;
318:            private String country;
319:            private String phone;
320:
321:            //
322:            // userId:
323:            //
324:            public String getUserId() {
325:                return this .userId;
326:            }
327:
328:            public void setUserId(String userId) {
329:                if (record2().setObject(ICOL_USER_ID, userId)) {
330:                    this .userId = userId;
331:                }
332:            }
333:
334:            public boolean izNullUserId() {
335:                return record2().getObject(ICOL_USER_ID) == null;
336:            }
337:
338:            public void setNullUserId() {
339:                if (record2().setObject(ICOL_USER_ID, null)) {
340:                    this .userId = null;
341:                }
342:            }
343:
344:            //
345:            // email:
346:            //
347:            public String getEmail() {
348:                return this .email;
349:            }
350:
351:            public void setEmail(String email) {
352:                if (record2().setObject(ICOL_EMAIL, email)) {
353:                    this .email = email;
354:                }
355:            }
356:
357:            public boolean izNullEmail() {
358:                return record2().getObject(ICOL_EMAIL) == null;
359:            }
360:
361:            public void setNullEmail() {
362:                if (record2().setObject(ICOL_EMAIL, null)) {
363:                    this .email = null;
364:                }
365:            }
366:
367:            //
368:            // firstName:
369:            //
370:            public String getFirstName() {
371:                return this .firstName;
372:            }
373:
374:            public void setFirstName(String firstName) {
375:                if (record2().setObject(ICOL_FIRST_NAME, firstName)) {
376:                    this .firstName = firstName;
377:                }
378:            }
379:
380:            public boolean izNullFirstName() {
381:                return record2().getObject(ICOL_FIRST_NAME) == null;
382:            }
383:
384:            public void setNullFirstName() {
385:                if (record2().setObject(ICOL_FIRST_NAME, null)) {
386:                    this .firstName = null;
387:                }
388:            }
389:
390:            //
391:            // lastName:
392:            //
393:            public String getLastName() {
394:                return this .lastName;
395:            }
396:
397:            public void setLastName(String lastName) {
398:                if (record2().setObject(ICOL_LAST_NAME, lastName)) {
399:                    this .lastName = lastName;
400:                }
401:            }
402:
403:            public boolean izNullLastName() {
404:                return record2().getObject(ICOL_LAST_NAME) == null;
405:            }
406:
407:            public void setNullLastName() {
408:                if (record2().setObject(ICOL_LAST_NAME, null)) {
409:                    this .lastName = null;
410:                }
411:            }
412:
413:            //
414:            // status:
415:            //
416:            public String getStatus() {
417:                return this .status;
418:            }
419:
420:            public void setStatus(String status) {
421:                if (record2().setObject(ICOL_STATUS, status)) {
422:                    this .status = status;
423:                }
424:            }
425:
426:            public boolean izNullStatus() {
427:                return record2().getObject(ICOL_STATUS) == null;
428:            }
429:
430:            public void setNullStatus() {
431:                if (record2().setObject(ICOL_STATUS, null)) {
432:                    this .status = null;
433:                }
434:            }
435:
436:            //
437:            // address1:
438:            //
439:            public String getAddress1() {
440:                return this .address1;
441:            }
442:
443:            public void setAddress1(String address1) {
444:                if (record2().setObject(ICOL_ADDRESS1, address1)) {
445:                    this .address1 = address1;
446:                }
447:            }
448:
449:            public boolean izNullAddress1() {
450:                return record2().getObject(ICOL_ADDRESS1) == null;
451:            }
452:
453:            public void setNullAddress1() {
454:                if (record2().setObject(ICOL_ADDRESS1, null)) {
455:                    this .address1 = null;
456:                }
457:            }
458:
459:            //
460:            // address2:
461:            //
462:            public String getAddress2() {
463:                return this .address2;
464:            }
465:
466:            public void setAddress2(String address2) {
467:                if (record2().setObject(ICOL_ADDRESS2, address2)) {
468:                    this .address2 = address2;
469:                }
470:            }
471:
472:            public boolean izNullAddress2() {
473:                return record2().getObject(ICOL_ADDRESS2) == null;
474:            }
475:
476:            public void setNullAddress2() {
477:                if (record2().setObject(ICOL_ADDRESS2, null)) {
478:                    this .address2 = null;
479:                }
480:            }
481:
482:            //
483:            // city:
484:            //
485:            public String getCity() {
486:                return this .city;
487:            }
488:
489:            public void setCity(String city) {
490:                if (record2().setObject(ICOL_CITY, city)) {
491:                    this .city = city;
492:                }
493:            }
494:
495:            public boolean izNullCity() {
496:                return record2().getObject(ICOL_CITY) == null;
497:            }
498:
499:            public void setNullCity() {
500:                if (record2().setObject(ICOL_CITY, null)) {
501:                    this .city = null;
502:                }
503:            }
504:
505:            //
506:            // state:
507:            //
508:            public String getState() {
509:                return this .state;
510:            }
511:
512:            public void setState(String state) {
513:                if (record2().setObject(ICOL_STATE, state)) {
514:                    this .state = state;
515:                }
516:            }
517:
518:            public boolean izNullState() {
519:                return record2().getObject(ICOL_STATE) == null;
520:            }
521:
522:            public void setNullState() {
523:                if (record2().setObject(ICOL_STATE, null)) {
524:                    this .state = null;
525:                }
526:            }
527:
528:            //
529:            // zip:
530:            //
531:            public String getZip() {
532:                return this .zip;
533:            }
534:
535:            public void setZip(String zip) {
536:                if (record2().setObject(ICOL_ZIP, zip)) {
537:                    this .zip = zip;
538:                }
539:            }
540:
541:            public boolean izNullZip() {
542:                return record2().getObject(ICOL_ZIP) == null;
543:            }
544:
545:            public void setNullZip() {
546:                if (record2().setObject(ICOL_ZIP, null)) {
547:                    this .zip = null;
548:                }
549:            }
550:
551:            //
552:            // country:
553:            //
554:            public String getCountry() {
555:                return this .country;
556:            }
557:
558:            public void setCountry(String country) {
559:                if (record2().setObject(ICOL_COUNTRY, country)) {
560:                    this .country = country;
561:                }
562:            }
563:
564:            public boolean izNullCountry() {
565:                return record2().getObject(ICOL_COUNTRY) == null;
566:            }
567:
568:            public void setNullCountry() {
569:                if (record2().setObject(ICOL_COUNTRY, null)) {
570:                    this .country = null;
571:                }
572:            }
573:
574:            //
575:            // phone:
576:            //
577:            public String getPhone() {
578:                return this .phone;
579:            }
580:
581:            public void setPhone(String phone) {
582:                if (record2().setObject(ICOL_PHONE, phone)) {
583:                    this .phone = phone;
584:                }
585:            }
586:
587:            public boolean izNullPhone() {
588:                return record2().getObject(ICOL_PHONE) == null;
589:            }
590:
591:            public void setNullPhone() {
592:                if (record2().setObject(ICOL_PHONE, null)) {
593:                    this .phone = null;
594:                }
595:            }
596:
597:            public void toBeanFields() {
598:                toBeanFields(this );
599:            }
600:
601:            public void toBeanFields(PersistentObject from) {
602:                userId = (String) from.record2().getObject(ICOL_USER_ID);
603:                email = (String) from.record2().getObject(ICOL_EMAIL);
604:                firstName = (String) from.record2().getObject(ICOL_FIRST_NAME);
605:                lastName = (String) from.record2().getObject(ICOL_LAST_NAME);
606:                status = (String) from.record2().getObject(ICOL_STATUS);
607:                address1 = (String) from.record2().getObject(ICOL_ADDRESS1);
608:                address2 = (String) from.record2().getObject(ICOL_ADDRESS2);
609:                city = (String) from.record2().getObject(ICOL_CITY);
610:                state = (String) from.record2().getObject(ICOL_STATE);
611:                zip = (String) from.record2().getObject(ICOL_ZIP);
612:                country = (String) from.record2().getObject(ICOL_COUNTRY);
613:                phone = (String) from.record2().getObject(ICOL_PHONE);
614:                super .toBeanFields(from);
615:            }
616:
617:            public void fromBeanFields(PersistentObject persistentObject) {
618:                AccountPO from = (AccountPO) persistentObject;
619:                record2().getEntry(ICOL_USER_ID).setUnmarkedValue(from.userId,
620:                        from.userId);
621:                record2().getEntry(ICOL_EMAIL).setUnmarkedValue(from.email,
622:                        from.email);
623:                record2().getEntry(ICOL_FIRST_NAME).setUnmarkedValue(
624:                        from.firstName, from.firstName);
625:                record2().getEntry(ICOL_LAST_NAME).setUnmarkedValue(
626:                        from.lastName, from.lastName);
627:                record2().getEntry(ICOL_STATUS).setUnmarkedValue(from.status,
628:                        from.status);
629:                record2().getEntry(ICOL_ADDRESS1).setUnmarkedValue(
630:                        from.address1, from.address1);
631:                record2().getEntry(ICOL_ADDRESS2).setUnmarkedValue(
632:                        from.address2, from.address2);
633:                record2().getEntry(ICOL_CITY).setUnmarkedValue(from.city,
634:                        from.city);
635:                record2().getEntry(ICOL_STATE).setUnmarkedValue(from.state,
636:                        from.state);
637:                record2().getEntry(ICOL_ZIP).setUnmarkedValue(from.zip,
638:                        from.zip);
639:                record2().getEntry(ICOL_COUNTRY).setUnmarkedValue(from.country,
640:                        from.country);
641:                record2().getEntry(ICOL_PHONE).setUnmarkedValue(from.phone,
642:                        from.phone);
643:                super .fromBeanFieldsDataSaved(persistentObject);
644:            }
645:
646:            public String toString() {
647:
648:                StringBuffer buffer = new StringBuffer();
649:                buffer.append("{ " + "class = ").append(
650:                        this .getClass().getName()).append(" " + "table = ")
651:                        .append(TABLE_ACCOUNT).append(" columns = {");
652:
653:                if (record() != null) {
654:                    buffer.append(COL_USER_ID).append(" = ").append(
655:                            record().getObject(ICOL_USER_ID)).append(" ");
656:                    buffer.append(COL_EMAIL).append(" = ").append(
657:                            record().getObject(ICOL_EMAIL)).append(" ");
658:                    buffer.append(COL_FIRST_NAME).append(" = ").append(
659:                            record().getObject(ICOL_FIRST_NAME)).append(" ");
660:                    buffer.append(COL_LAST_NAME).append(" = ").append(
661:                            record().getObject(ICOL_LAST_NAME)).append(" ");
662:                    buffer.append(COL_STATUS).append(" = ").append(
663:                            record().getObject(ICOL_STATUS)).append(" ");
664:                    buffer.append(COL_ADDRESS1).append(" = ").append(
665:                            record().getObject(ICOL_ADDRESS1)).append(" ");
666:                    buffer.append(COL_ADDRESS2).append(" = ").append(
667:                            record().getObject(ICOL_ADDRESS2)).append(" ");
668:                    buffer.append(COL_CITY).append(" = ").append(
669:                            record().getObject(ICOL_CITY)).append(" ");
670:                    buffer.append(COL_STATE).append(" = ").append(
671:                            record().getObject(ICOL_STATE)).append(" ");
672:                    buffer.append(COL_ZIP).append(" = ").append(
673:                            record().getObject(ICOL_ZIP)).append(" ");
674:                    buffer.append(COL_COUNTRY).append(" = ").append(
675:                            record().getObject(ICOL_COUNTRY)).append(" ");
676:                    buffer.append(COL_PHONE).append(" = ").append(
677:                            record().getObject(ICOL_PHONE)).append(" ");
678:                } else {
679:                    buffer.append(COL_USER_ID).append(" = ").append(userId)
680:                            .append(" ");
681:                    buffer.append(COL_EMAIL).append(" = ").append(email)
682:                            .append(" ");
683:                    buffer.append(COL_FIRST_NAME).append(" = ").append(
684:                            firstName).append(" ");
685:                    buffer.append(COL_LAST_NAME).append(" = ").append(lastName)
686:                            .append(" ");
687:                    buffer.append(COL_STATUS).append(" = ").append(status)
688:                            .append(" ");
689:                    buffer.append(COL_ADDRESS1).append(" = ").append(address1)
690:                            .append(" ");
691:                    buffer.append(COL_ADDRESS2).append(" = ").append(address2)
692:                            .append(" ");
693:                    buffer.append(COL_CITY).append(" = ").append(city).append(
694:                            " ");
695:                    buffer.append(COL_STATE).append(" = ").append(state)
696:                            .append(" ");
697:                    buffer.append(COL_ZIP).append(" = ").append(zip)
698:                            .append(" ");
699:                    buffer.append(COL_COUNTRY).append(" = ").append(country)
700:                            .append(" ");
701:                    buffer.append(COL_PHONE).append(" = ").append(phone)
702:                            .append(" ");
703:                }
704:                buffer.append("}}");
705:                return buffer.toString();
706:            }
707:
708:            // naturalKey has no context 
709:
710:            /**
711:             * Equals by Basic Peristent object fields (without children objects)
712:             */
713:            public boolean equalsBasic(Object value) {
714:                if (this  == value)
715:                    return true;
716:                if (value == null || getClass() != value.getClass())
717:                    return false;
718:
719:                AccountPO that = (AccountPO) value;
720:
721:                if (userId != null ? !userId.equals(that.userId)
722:                        : that.userId != null)
723:                    return false;
724:                if (email != null ? !email.equals(that.email)
725:                        : that.email != null)
726:                    return false;
727:                if (firstName != null ? !firstName.equals(that.firstName)
728:                        : that.firstName != null)
729:                    return false;
730:                if (lastName != null ? !lastName.equals(that.lastName)
731:                        : that.lastName != null)
732:                    return false;
733:                if (status != null ? !status.equals(that.status)
734:                        : that.status != null)
735:                    return false;
736:                if (address1 != null ? !address1.equals(that.address1)
737:                        : that.address1 != null)
738:                    return false;
739:                if (address2 != null ? !address2.equals(that.address2)
740:                        : that.address2 != null)
741:                    return false;
742:                if (city != null ? !city.equals(that.city) : that.city != null)
743:                    return false;
744:                if (state != null ? !state.equals(that.state)
745:                        : that.state != null)
746:                    return false;
747:                if (zip != null ? !zip.equals(that.zip) : that.zip != null)
748:                    return false;
749:                if (country != null ? !country.equals(that.country)
750:                        : that.country != null)
751:                    return false;
752:                if (phone != null ? !phone.equals(that.phone)
753:                        : that.phone != null)
754:                    return false;
755:                return true;
756:            }
757:
758:            /**
759:             * hashCode by Basic Peristent object fields (without children objects)
760:             */
761:            public int hashCodeBasic() {
762:                int result;
763:                long temp;
764:                result = (userId != null ? userId.hashCode() : 0);
765:                result = 29 * result + (email != null ? email.hashCode() : 0);
766:                result = 29 * result
767:                        + (firstName != null ? firstName.hashCode() : 0);
768:                result = 29 * result
769:                        + (lastName != null ? lastName.hashCode() : 0);
770:                result = 29 * result + (status != null ? status.hashCode() : 0);
771:                result = 29 * result
772:                        + (address1 != null ? address1.hashCode() : 0);
773:                result = 29 * result
774:                        + (address2 != null ? address2.hashCode() : 0);
775:                result = 29 * result + (city != null ? city.hashCode() : 0);
776:                result = 29 * result + (state != null ? state.hashCode() : 0);
777:                result = 29 * result + (zip != null ? zip.hashCode() : 0);
778:                result = 29 * result
779:                        + (country != null ? country.hashCode() : 0);
780:                result = 29 * result + (phone != null ? phone.hashCode() : 0);
781:
782:                return result;
783:            }
784:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.