Source Code Cross Referenced for Parameter.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 parameter metadata.
037:         *
038:         * @author Susan Chen
039:         * @version 
040:         */
041:        public class Parameter {
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 String paramType; // parameter type description: IN, INOUT, OUT, RETURN, RESULT
046:            private int ordinalPosition; // ordinal position
047:            private int numericPrecision; // numeric precision
048:            private int numericScale; // numeric scale
049:            private boolean isNullable; //specifies if the parameter is nullable
050:
051:            /** 
052:             * Creates an instance of Paramter.
053:             */
054:            public Parameter() {
055:                name = "";
056:                javaType = "";
057:                sqlType = "";
058:                paramType = "";
059:                ordinalPosition = 0;
060:                numericPrecision = 0;
061:                numericScale = 0;
062:                isNullable = false;
063:            }
064:
065:            /**
066:             * Creates an instance of Parameter with the given name.
067:             *
068:             * @param newName Parameter name
069:             */
070:            public Parameter(String newName) {
071:                name = newName;
072:            }
073:
074:            /**
075:             * Creates an instance of Parameter with the given name and java type.
076:             *
077:             * @param newName Parameter name
078:             * @param newJavaType Java type
079:             */
080:            public Parameter(String newName, String newJavaType) {
081:                name = newName;
082:                javaType = newJavaType;
083:            }
084:
085:            /**
086:             * Creates an instance of Parameter with the given attributes.
087:             *
088:             * @param newName Parameter name
089:             * @param newJavaType Java type
090:             * @param newParamType Parameter type
091:             * @param newOrdinalPosition Ordinal position
092:             * @param newNumericPrecision Numeric precision
093:             * @param newNumericScale Numeric scale
094:             * @param newIsNullable Nullable flag
095:             */
096:            public Parameter(String newName, String newJavaType,
097:                    String newParamType, int newOrdinalPosition,
098:                    int newNumericPrecision, int newNumericScale,
099:                    boolean newIsNullable) {
100:                name = newName;
101:                javaType = newJavaType;
102:                paramType = newParamType;
103:                ordinalPosition = newOrdinalPosition;
104:                numericPrecision = newNumericPrecision;
105:                numericScale = newNumericScale;
106:                isNullable = newIsNullable;
107:            }
108:
109:            public Parameter(Parameter p) {
110:                name = p.getName();
111:                javaType = p.getJavaType();
112:                sqlType = p.getSqlType();
113:                paramType = p.getParamType();
114:                ordinalPosition = p.getOrdinalPosition();
115:                numericPrecision = p.getNumericPrecision();
116:                numericScale = p.getNumericScale();
117:                isNullable = p.getIsNullable();
118:            }
119:
120:            /**
121:             * Get the parameter name.
122:             *
123:             * @return parameter name
124:             */
125:            public String getName() {
126:                return name;
127:            }
128:
129:            /**
130:             * Get the Java type.
131:             *
132:             * @return Java type
133:             */
134:            public String getJavaType() {
135:                return javaType;
136:            }
137:
138:            /**
139:             * Get the SQL type.
140:             *
141:             * @return SQL type
142:             */
143:            public String getSqlType() {
144:                return sqlType;
145:            }
146:
147:            /** 
148:             * Get the parameter type.
149:             *
150:             * @return Parameter type
151:             */
152:            public String getParamType() {
153:                return paramType;
154:            }
155:
156:            /**
157:             * Get the parameter ordinal position.
158:             *
159:             * @return Parameter ordinal position
160:             */
161:            public int getOrdinalPosition() {
162:                return ordinalPosition;
163:            }
164:
165:            /**
166:             * Get the parameter numeric precision.
167:             *
168:             * @return Parameter numeric precision.
169:             */
170:            public int getNumericPrecision() {
171:                return numericPrecision;
172:            }
173:
174:            /**
175:             * Get the parameter numeric scale.
176:             *
177:             * @return Parameter numeric scale.
178:             */
179:            public int getNumericScale() {
180:                return numericScale;
181:            }
182:
183:            /**
184:             * Get the parameter nullable flag.
185:             *
186:             * @return Parameter nullable flag.
187:             */
188:            public boolean getIsNullable() {
189:                return isNullable;
190:            }
191:
192:            /**
193:             * Set the parameter name.
194:             *
195:             * @param newName Parameter name
196:             */
197:            public void setName(String newName) {
198:                name = newName;
199:            }
200:
201:            /**
202:             * Set the parameter Java type.
203:             *
204:             * @param newJavaType Parameter Java type.
205:             */
206:            public void setJavaType(String newJavaType) {
207:                javaType = newJavaType;
208:            }
209:
210:            /**
211:             * Set the parameter SQL type.
212:             *
213:             * @param newSqlType Parameter SQL type.
214:             */
215:            public void setSqlType(String newSqlType) {
216:                sqlType = newSqlType;
217:            }
218:
219:            /**
220:             * Set the parameter type.
221:             *
222:             * @param newParamType Parameter type.
223:             */
224:            public void setParamType(String newParamType) {
225:                paramType = newParamType;
226:            }
227:
228:            /**
229:             * Set the parameter ordinal position.
230:             *
231:             * @param newOrdinalPosition Parameter ordinal Position.
232:             */
233:            public void setOrdinalPosition(int newOrdinalPosition) {
234:                ordinalPosition = newOrdinalPosition;
235:            }
236:
237:            /**
238:             * Set the parameter numeric position.
239:             *
240:             * @param newNumericPrecision Parameter numeric precision
241:             */
242:            public void setNumericPrecision(int newNumericPrecision) {
243:                numericPrecision = newNumericPrecision;
244:            }
245:
246:            /**
247:             * Set the parameter numeric scale.
248:             *
249:             * @param newNumericScale Parameter numeric scale
250:             */
251:            public void setNumericScale(int newNumericScale) {
252:                numericScale = newNumericScale;
253:            }
254:
255:            /**
256:             * Set the parameter nullable flag.
257:             *
258:             * @param newIsNullable Parameter nullable flag
259:             */
260:            public void setIsNullable(boolean newIsNullable) {
261:                isNullable = newIsNullable;
262:            }
263:
264:            /*public int getAccessType() {
265:                if (getParamType().equals("IN")) {
266:                    return OtdLeaf.Access.WRITE;
267:                } 
268:                if (getParamType().equals("INOUT")) {
269:                    return OtdLeaf.Access.MODIFY;
270:                } 
271:                return OtdLeaf.Access.READ;
272:            }*/
273:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.