Source Code Cross Referenced for SignonPO.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 SignonPO 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_SIGNON = "SIGNON";
050:
051:            public SignonPO() {
052:                super (new Record(table));
053:            }
054:
055:            public SignonPO(String userName) {
056:                this ();
057:                setUserName(userName);
058:            }
059:
060:            public static final String COL_USER_NAME = "USER_NAME";
061:            public static final String TCOL_USER_NAME = "SIGNON.USER_NAME";
062:            public static final int ICOL_USER_NAME = 0;
063:            public static final int JDBC_TYPE_USER_NAME = 12;
064:
065:            public static final String COL_PASSWORD = "PASSWORD";
066:            public static final String TCOL_PASSWORD = "SIGNON.PASSWORD";
067:            public static final int ICOL_PASSWORD = 1;
068:            public static final int JDBC_TYPE_PASSWORD = 12;
069:
070:            private static final MetaTable table = new MetaTable("SIGNON",
071:                    "SIGNON", 2, 1);
072:
073:            static {
074:                table.setStaticFinal(true);
075:                //
076:                // Meta Foreign Keys:
077:                //
078:                table.addToForeignKey("ACCOUNT", new ForeignKeyEntry("USER_ID",
079:                        "USER_NAME"));
080:                //
081:                // Meta Natural Key:
082:                //
083:                // naturalKey has no context 
084:
085:                //
086:                // Meta Columns:
087:                //
088:
089:                final MetaColumn metaUserName = new MetaColumn(ICOL_USER_NAME,
090:                        "USER_NAME", "USER_NAME", table);
091:                metaUserName.setPrimaryKey(true);
092:                metaUserName.setRequired(true);
093:                metaUserName.setOptimisticLock(false);
094:                metaUserName.setType(ColumnType.STRING);
095:                metaUserName.setColumnSize(25);
096:                metaUserName.setRemarks("");
097:                metaUserName.setDecimalDigits(0);
098:                metaUserName.setAutoGenerated(false);
099:                metaUserName.setAutoIncrement(false);
100:                metaUserName.setJdbcType(12);
101:                table.addToPrimaryKey(new Integer(ICOL_USER_NAME));
102:                table.addColumn(metaUserName);
103:
104:                final MetaColumn metaPassword = new MetaColumn(ICOL_PASSWORD,
105:                        "PASSWORD", "PASSWORD", table);
106:                metaPassword.setPrimaryKey(false);
107:                metaPassword.setRequired(true);
108:                metaPassword.setOptimisticLock(false);
109:                metaPassword.setType(ColumnType.STRING);
110:                metaPassword.setColumnSize(25);
111:                metaPassword.setRemarks("");
112:                metaPassword.setDecimalDigits(0);
113:                metaPassword.setAutoGenerated(false);
114:                metaPassword.setAutoIncrement(false);
115:                metaPassword.setJdbcType(12);
116:                table.addColumn(metaPassword);
117:
118:            }
119:
120:            private String userName;
121:            private String password;
122:
123:            //
124:            // userName:
125:            //
126:            public String getUserName() {
127:                return this .userName;
128:            }
129:
130:            public void setUserName(String userName) {
131:                if (record2().setObject(ICOL_USER_NAME, userName)) {
132:                    this .userName = userName;
133:                }
134:            }
135:
136:            public boolean izNullUserName() {
137:                return record2().getObject(ICOL_USER_NAME) == null;
138:            }
139:
140:            public void setNullUserName() {
141:                if (record2().setObject(ICOL_USER_NAME, null)) {
142:                    this .userName = null;
143:                }
144:            }
145:
146:            //
147:            // password:
148:            //
149:            public String getPassword() {
150:                return this .password;
151:            }
152:
153:            public void setPassword(String password) {
154:                if (record2().setObject(ICOL_PASSWORD, password)) {
155:                    this .password = password;
156:                }
157:            }
158:
159:            public boolean izNullPassword() {
160:                return record2().getObject(ICOL_PASSWORD) == null;
161:            }
162:
163:            public void setNullPassword() {
164:                if (record2().setObject(ICOL_PASSWORD, null)) {
165:                    this .password = null;
166:                }
167:            }
168:
169:            public void toBeanFields() {
170:                toBeanFields(this );
171:            }
172:
173:            public void toBeanFields(PersistentObject from) {
174:                userName = (String) from.record2().getObject(ICOL_USER_NAME);
175:                password = (String) from.record2().getObject(ICOL_PASSWORD);
176:                super .toBeanFields(from);
177:            }
178:
179:            public void fromBeanFields(PersistentObject persistentObject) {
180:                SignonPO from = (SignonPO) persistentObject;
181:                record2().getEntry(ICOL_USER_NAME).setUnmarkedValue(
182:                        from.userName, from.userName);
183:                record2().getEntry(ICOL_PASSWORD).setUnmarkedValue(
184:                        from.password, from.password);
185:                super .fromBeanFieldsDataSaved(persistentObject);
186:            }
187:
188:            public String toString() {
189:
190:                StringBuffer buffer = new StringBuffer();
191:                buffer.append("{ " + "class = ").append(
192:                        this .getClass().getName()).append(" " + "table = ")
193:                        .append(TABLE_SIGNON).append(" columns = {");
194:
195:                if (record() != null) {
196:                    buffer.append(COL_USER_NAME).append(" = ").append(
197:                            record().getObject(ICOL_USER_NAME)).append(" ");
198:                    buffer.append(COL_PASSWORD).append(" = ").append(
199:                            record().getObject(ICOL_PASSWORD)).append(" ");
200:                } else {
201:                    buffer.append(COL_USER_NAME).append(" = ").append(userName)
202:                            .append(" ");
203:                    buffer.append(COL_PASSWORD).append(" = ").append(password)
204:                            .append(" ");
205:                }
206:                buffer.append("}}");
207:                return buffer.toString();
208:            }
209:
210:            // naturalKey has no context 
211:
212:            /**
213:             * Equals by Basic Peristent object fields (without children objects)
214:             */
215:            public boolean equalsBasic(Object value) {
216:                if (this  == value)
217:                    return true;
218:                if (value == null || getClass() != value.getClass())
219:                    return false;
220:
221:                SignonPO that = (SignonPO) value;
222:
223:                if (userName != null ? !userName.equals(that.userName)
224:                        : that.userName != null)
225:                    return false;
226:                if (password != null ? !password.equals(that.password)
227:                        : that.password != null)
228:                    return false;
229:                return true;
230:            }
231:
232:            /**
233:             * hashCode by Basic Peristent object fields (without children objects)
234:             */
235:            public int hashCodeBasic() {
236:                int result;
237:                long temp;
238:                result = (userName != null ? userName.hashCode() : 0);
239:                result = 29 * result
240:                        + (password != null ? password.hashCode() : 0);
241:
242:                return result;
243:            }
244:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.