Source Code Cross Referenced for ResultSetColumn.java in  » IDE-Netbeans » sql.project » org » netbeans » modules » jdbcwizard » builder » 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 » IDE Netbeans » sql.project » org.netbeans.modules.jdbcwizard.builder 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the terms of the Common Development
003:         * and Distribution License (the License). You may not use this file except in
004:         * compliance with the License.
005:         * 
006:         * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007:         * or http://www.netbeans.org/cddl.txt.
008:         * 
009:         * When distributing Covered Code, include this CDDL Header Notice in each file
010:         * and include the License file at http://www.netbeans.org/cddl.txt.
011:         * If applicable, add the following below the CDDL Header, with the fields
012:         * enclosed by brackets [] replaced by your own identifying information:
013:         * "Portions Copyrighted [year] [name of copyright owner]"
014:         * 
015:         * The Original Software is NetBeans. The Initial Developer of the Original
016:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017:         * Microsystems, Inc. All Rights Reserved.
018:         */
019:
020:        /*
021:         * 
022:         * Copyright 2005 Sun Microsystems, Inc.
023:         * 
024:         * Licensed under the Apache License, Version 2.0 (the "License");
025:         * you may not use this file except in compliance with the License.
026:         * You may obtain a copy of the License at
027:         * 
028:         * 	http://www.apache.org/licenses/LICENSE-2.0
029:         * 
030:         * Unless required by applicable law or agreed to in writing, software
031:         * distributed under the License is distributed on an "AS IS" BASIS,
032:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
033:         * See the License for the specific language governing permissions and
034:         * limitations under the License.
035:         * 
036:         */
037:        package org.netbeans.modules.jdbcwizard.builder;
038:
039:        /**
040:         * Class to hold resultset column metadata.
041:         * 
042:         * @author
043:         */
044:        public class ResultSetColumn {
045:            private String name = ""; // name of parameter
046:
047:            private String javaType; // Java type - ex. java.lang.String
048:
049:            private String sqlType; // SQL type - ex. BIGINT, NUMERIC
050:
051:            private int ordinalPosition; // ordinal position
052:
053:            private int numericPrecision; // numeric precision
054:
055:            private int numericScale; // numeric scale
056:
057:            private boolean isNullable; // specifies if the parameter is nullable
058:
059:            private String label = ""; // title of column in resultset
060:
061:            /**
062:             * Creates a new instance of ResultSetColumn.
063:             */
064:            public ResultSetColumn() {
065:                this .name = "";
066:                this .javaType = "";
067:                this .sqlType = "";
068:                this .ordinalPosition = 0;
069:                this .numericPrecision = 0;
070:                this .numericScale = 0;
071:                this .isNullable = false;
072:            }
073:
074:            public ResultSetColumn(final ResultSetColumn rs) {
075:                this .name = rs.getName();
076:                this .javaType = rs.getJavaType();
077:                this .sqlType = rs.getSqlType();
078:                this .ordinalPosition = rs.getOrdinalPosition();
079:                this .numericPrecision = rs.getNumericPrecision();
080:                this .numericScale = rs.getNumericScale();
081:                this .isNullable = rs.getIsNullable();
082:                this .label = rs.getLabel();
083:            }
084:
085:            /**
086:             * Creates a new instance of ResultSetColumn with the given name.
087:             * 
088:             * @param newName ResultSetColumn name
089:             */
090:            public ResultSetColumn(final String newName) {
091:                this .name = newName;
092:            }
093:
094:            /**
095:             * Creates a new instance of ResultSetColum with the given attributes.
096:             * 
097:             * @param newName ResultSetColumn name
098:             * @param newJavaType Java type
099:             */
100:            public ResultSetColumn(final String newName,
101:                    final String newJavaType) {
102:                this .name = newName;
103:                this .javaType = newJavaType;
104:            }
105:
106:            /**
107:             * Creates a new instance of ResultSetColum with the given attributes.
108:             * 
109:             * @param newName ResultSetColumn name
110:             * @param newJavaType Java type
111:             * @param newOrdinalPosition Ordinal position
112:             * @param newNumericPrecision Numeric precision
113:             * @param newNumericScale Numeric scale
114:             * @param newIsNullable Nullable flag
115:             */
116:            public ResultSetColumn(final String newName,
117:                    final String newJavaType, final int newOrdinalPosition,
118:                    final int newNumericPrecision, final int newNumericScale,
119:                    final boolean newIsNullable) {
120:                this .name = newName;
121:                this .javaType = newJavaType;
122:                this .ordinalPosition = newOrdinalPosition;
123:                this .numericPrecision = newNumericPrecision;
124:                this .numericScale = newNumericScale;
125:                this .isNullable = newIsNullable;
126:            }
127:
128:            /**
129:             * Get the ResultSet column name.
130:             * 
131:             * @return ResultSet column name.
132:             */
133:            public String getName() {
134:                return this .name;
135:            }
136:
137:            /**
138:             * Get the Java type.
139:             * 
140:             * @return Java type
141:             */
142:            public String getJavaType() {
143:                return this .javaType;
144:            }
145:
146:            /**
147:             * Get the SQL type.
148:             * 
149:             * @return SQL type
150:             */
151:            public String getSqlType() {
152:                return this .sqlType;
153:            }
154:
155:            /**
156:             * Get the ResultSet column ordinal position.
157:             * 
158:             * @return ResultSet column ordinal position
159:             */
160:            public int getOrdinalPosition() {
161:                return this .ordinalPosition;
162:            }
163:
164:            /**
165:             * Get the ResultSet column numeric precision.
166:             * 
167:             * @return ResultSet column numeric precision
168:             */
169:            public int getNumericPrecision() {
170:                return this .numericPrecision;
171:            }
172:
173:            /**
174:             * Get the ResultSet column numeric scale.
175:             * 
176:             * @return ResultSet column numeric scale
177:             */
178:            public int getNumericScale() {
179:                return this .numericScale;
180:            }
181:
182:            /**
183:             * Get the ResultSet column nullable flag.
184:             * 
185:             * @return ResultSet column nullable flag.
186:             */
187:            public boolean getIsNullable() {
188:                return this .isNullable;
189:            }
190:
191:            /**
192:             * Set the ResultSet column name.
193:             * 
194:             * @param newName ResultSet column name
195:             */
196:            public void setName(final String newName) {
197:                this .name = newName;
198:            }
199:
200:            /**
201:             * Set the ResultSet column Java type.
202:             * 
203:             * @param newJavaType ResultSet column Java type.
204:             */
205:            public void setJavaType(final String newJavaType) {
206:                this .javaType = newJavaType;
207:            }
208:
209:            /**
210:             * Set the ResultSet column SQL type.
211:             * 
212:             * @param newSqlType ResultSet column SQL type.
213:             */
214:            public void setSqlType(final String newSqlType) {
215:                this .sqlType = newSqlType;
216:            }
217:
218:            /**
219:             * Set the ResultSet column ordinal position.
220:             * 
221:             * @param newOrdinalPosition ResultSet column ordinal position.
222:             */
223:            public void setOrdinalPosition(final int newOrdinalPosition) {
224:                this .ordinalPosition = newOrdinalPosition;
225:            }
226:
227:            /**
228:             * Set the ResultSet column numeric precision.
229:             * 
230:             * @param newNumericPrecision ResultSet column numeric precision.
231:             */
232:            public void setNumericPrecision(final int newNumericPrecision) {
233:                this .numericPrecision = newNumericPrecision;
234:            }
235:
236:            /**
237:             * Set the ResultSet column numeric scale.
238:             * 
239:             * @param newNumericScale ResultSet column numeric scale.
240:             */
241:            public void setNumericScale(final int newNumericScale) {
242:                this .numericScale = newNumericScale;
243:            }
244:
245:            /**
246:             * Set the ResultSet column nullable flag.
247:             * 
248:             * @param newIsNullable ResultSet column nullable flag
249:             */
250:            public void setIsNullable(final boolean newIsNullable) {
251:                this .isNullable = newIsNullable;
252:            }
253:
254:            /**
255:             * Get the ResultSet column label.
256:             * 
257:             * @return ResultSet column label.
258:             */
259:            public String getLabel() {
260:                return this .label;
261:            }
262:
263:            /**
264:             * Set the ResultSet column label.
265:             * 
266:             * @param newName ResultSet column label
267:             */
268:            public void setLabel(final String newName) {
269:                this.label = newName;
270:            }
271:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.