Source Code Cross Referenced for ResultSetColumn.java in  » IDE-Netbeans » sql.project » org » netbeans » modules » sql » project » dbmodel » 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.sql.project.dbmodel 
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:         *                 Sun Public License Notice
022:         *
023:         * The contents of this file are subject to the Sun Public License
024:         * Version 1.0 (the "License"). You may not use this file except in
025:         * compliance with the License. A copy of the License is available at
026:         * http://www.sun.com/
027:         *
028:         * The Original Code is NetBeans. The Initial Developer of the Original
029:         * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
030:         * Microsystems, Inc. All Rights Reserved.
031:         */
032:
033:        package org.netbeans.modules.sql.project.dbmodel;
034:
035:        /**
036:         * Class to hold resultset column metadata.
037:         *
038:         * @author Susan Chen
039:         * @version 
040:         */
041:        public class ResultSetColumn {
042:            private String name = ""; // name of parameter
043:            private String javaType; // Java type - ex. java.lang.String
044:            private String sqlType; // SQL type - ex. BIGINT, NUMERIC
045:            private int ordinalPosition; // ordinal position
046:            private int numericPrecision; // numeric precision
047:            private int numericScale; // numeric scale
048:            private boolean isNullable; //specifies if the parameter is nullable
049:            private String label = ""; // title of column in resultset
050:
051:            /** 
052:             * Creates a new instance of ResultSetColumn.
053:             */
054:            public ResultSetColumn() {
055:                name = "";
056:                javaType = "";
057:                sqlType = "";
058:                ordinalPosition = 0;
059:                numericPrecision = 0;
060:                numericScale = 0;
061:                isNullable = false;
062:            }
063:
064:            public ResultSetColumn(ResultSetColumn rs) {
065:                name = rs.getName();
066:                javaType = rs.getJavaType();
067:                sqlType = rs.getSqlType();
068:                ordinalPosition = rs.getOrdinalPosition();
069:                numericPrecision = rs.getNumericPrecision();
070:                numericScale = rs.getNumericScale();
071:                isNullable = rs.getIsNullable();
072:                label = rs.getLabel();
073:            }
074:
075:            /**
076:             * Creates a new instance of ResultSetColumn with the given name.
077:             *
078:             * @param newName ResultSetColumn name
079:             */
080:            public ResultSetColumn(String newName) {
081:                name = newName;
082:            }
083:
084:            /**
085:             * Creates a new instance of ResultSetColum with the given attributes.
086:             *
087:             * @param newName ResultSetColumn name
088:             * @param newJavaType Java type
089:             */
090:            public ResultSetColumn(String newName, String newJavaType) {
091:                name = newName;
092:                javaType = newJavaType;
093:            }
094:
095:            /**
096:             * Creates a new instance of ResultSetColum with the given attributes.
097:             *
098:             * @param newName ResultSetColumn name
099:             * @param newJavaType Java type
100:             * @param newOrdinalPosition Ordinal position
101:             * @param newNumericPrecision Numeric precision
102:             * @param newNumericScale Numeric scale
103:             * @param newIsNullable Nullable flag
104:             */
105:            public ResultSetColumn(String newName, String newJavaType,
106:                    int newOrdinalPosition, int newNumericPrecision,
107:                    int newNumericScale, boolean newIsNullable) {
108:                name = newName;
109:                javaType = newJavaType;
110:                ordinalPosition = newOrdinalPosition;
111:                numericPrecision = newNumericPrecision;
112:                numericScale = newNumericScale;
113:                isNullable = newIsNullable;
114:            }
115:
116:            /**
117:             * Get the ResultSet column name.
118:             *
119:             * @return ResultSet column name.
120:             */
121:            public String getName() {
122:                return name;
123:            }
124:
125:            /**
126:             * Get the Java type.
127:             *
128:             * @return Java type
129:             */
130:            public String getJavaType() {
131:                return javaType;
132:            }
133:
134:            /**
135:             * Get the SQL type.
136:             *
137:             * @return SQL type
138:             */
139:            public String getSqlType() {
140:                return sqlType;
141:            }
142:
143:            /**
144:             * Get the ResultSet column ordinal position.
145:             *
146:             * @return ResultSet column ordinal position
147:             */
148:            public int getOrdinalPosition() {
149:                return ordinalPosition;
150:            }
151:
152:            /**
153:             * Get the ResultSet column numeric precision.
154:             *
155:             * @return ResultSet column numeric precision
156:             */
157:            public int getNumericPrecision() {
158:                return numericPrecision;
159:            }
160:
161:            /**
162:             * Get the ResultSet column numeric scale.
163:             *
164:             * @return ResultSet column numeric scale
165:             */
166:            public int getNumericScale() {
167:                return numericScale;
168:            }
169:
170:            /**
171:             * Get the ResultSet column nullable flag.
172:             *
173:             * @return ResultSet column nullable flag.
174:             */
175:            public boolean getIsNullable() {
176:                return isNullable;
177:            }
178:
179:            /**
180:             * Set the ResultSet column name.
181:             *
182:             * @param newName ResultSet column name
183:             */
184:            public void setName(String newName) {
185:                name = newName;
186:            }
187:
188:            /**
189:             * Set the ResultSet column Java type.
190:             *
191:             * @param newJavaType ResultSet column Java type.
192:             */
193:            public void setJavaType(String newJavaType) {
194:                javaType = newJavaType;
195:            }
196:
197:            /**
198:             * Set the ResultSet column SQL type.
199:             *
200:             * @param newSqlType ResultSet column SQL type.
201:             */
202:            public void setSqlType(String newSqlType) {
203:                sqlType = newSqlType;
204:            }
205:
206:            /**
207:             * Set the ResultSet column ordinal position.
208:             *
209:             * @param newOrdinalPosition ResultSet column ordinal position.
210:             */
211:            public void setOrdinalPosition(int newOrdinalPosition) {
212:                ordinalPosition = newOrdinalPosition;
213:            }
214:
215:            /**
216:             * Set the ResultSet column numeric precision.
217:             *
218:             * @param newNumericPrecision ResultSet column numeric precision.
219:             */
220:            public void setNumericPrecision(int newNumericPrecision) {
221:                numericPrecision = newNumericPrecision;
222:            }
223:
224:            /**
225:             * Set the ResultSet column numeric scale.
226:             *
227:             * @param newNumericScale ResultSet column numeric scale.
228:             */
229:            public void setNumericScale(int newNumericScale) {
230:                numericScale = newNumericScale;
231:            }
232:
233:            /**
234:             * Set the ResultSet column nullable flag.
235:             *
236:             * @param newIsNullable ResultSet column nullable flag
237:             */
238:            public void setIsNullable(boolean newIsNullable) {
239:                isNullable = newIsNullable;
240:            }
241:
242:            /**
243:             * Get the ResultSet column label.
244:             *
245:             * @return ResultSet column label.
246:             */
247:            public String getLabel() {
248:                return label;
249:            }
250:
251:            /**
252:             * Set the ResultSet column label.
253:             *
254:             * @param newName ResultSet column label
255:             */
256:            public void setLabel(String newName) {
257:                label = newName;
258:            }
259:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.