Source Code Cross Referenced for ParameterMetaData.java in  » Apache-Harmony-Java-SE » java-package » java » sql » 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 » Apache Harmony Java SE » java package » java.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package java.sql;
019:
020:        /**
021:         * An interface used to get information about the types and properties of
022:         * parameters in a PreparedStatement object.
023:         */
024:        public interface ParameterMetaData {
025:
026:            /**
027:             * Indicates that the parameter mode is IN.
028:             */
029:            public static final int parameterModeIn = 1;
030:
031:            /**
032:             * Indicates that the parameter mode is INOUT.
033:             */
034:            public static final int parameterModeInOut = 2;
035:
036:            /**
037:             * Indicates that the parameter mode is OUT.
038:             */
039:            public static final int parameterModeOut = 4;
040:
041:            /**
042:             * Indicates that the parameter mode is not known.
043:             */
044:            public static final int parameterModeUnknown = 0;
045:
046:            /**
047:             * Indicates that a parameter is not permitted to be NULL.
048:             */
049:            public static final int parameterNoNulls = 0;
050:
051:            /**
052:             * Indicates that a parameter is permitted to be NULL.
053:             */
054:            public static final int parameterNullable = 1;
055:
056:            /**
057:             * Indicates that whether a parameter is allowed to be null or not is not
058:             * known.
059:             */
060:            public static final int parameterNullableUnknown = 2;
061:
062:            /**
063:             * Gets the fully-qualified name of the Java class which should be passed as
064:             * a parameter to the method <code>PreparedStatement.setObject</code>.
065:             * 
066:             * @param paramIndex
067:             *            the index number of the parameter, where the first parameter
068:             *            has an index of 1
069:             * @return a String with the fully qualified Java class name of the
070:             *         parameter with the specified index. This class name is used for
071:             *         custom mapping.
072:             * @throws SQLException
073:             *             if a database error happens
074:             */
075:            public String getParameterClassName(int paramIndex)
076:                    throws SQLException;
077:
078:            /**
079:             * Gets the number of parameters in the PreparedStatement for which this
080:             * ParameterMetaData contains information.
081:             * 
082:             * @return the number of parameters as an int
083:             * @throws SQLException
084:             *             if a database error happens
085:             */
086:            public int getParameterCount() throws SQLException;
087:
088:            /**
089:             * Gets the mode of the specified parameter.
090:             * 
091:             * @param paramIndex
092:             *            the index number of the parameter, where the first parameter
093:             *            has an index of 1
094:             * @return the parameters mode. Can be: ParameterMetaData.parameterModeIn,
095:             *         ParameterMetaData.parameterModeOut,
096:             *         ParameterMetaData.parameterModeInOut or
097:             *         ParameterMetaData.parameterModeUnknown.
098:             * @throws SQLException
099:             *             if a database error happens
100:             */
101:            public int getParameterMode(int paramIndex) throws SQLException;
102:
103:            /**
104:             * Gets the SQL type of a specified parameter.
105:             * 
106:             * @param paramIndex
107:             *            the index number of the parameter, where the first parameter
108:             *            has an index of 1
109:             * @return the type of the parameter - an SQL type as defined in
110:             *         java.sql.Types.
111:             * @throws SQLException
112:             *             if a database error happens
113:             */
114:            public int getParameterType(int paramIndex) throws SQLException;
115:
116:            /**
117:             * Gets the database-specific type name of a specified parameter.
118:             * 
119:             * @param paramIndex
120:             *            the index number of the parameter, where the first parameter
121:             *            has an index of 1
122:             * @return the type name for the parameter as used by the database. A
123:             *         fully-qualified name is returned if the parameter is a User
124:             *         Defined Type.
125:             * @throws SQLException
126:             *             if a database error happens
127:             */
128:            public String getParameterTypeName(int paramIndex)
129:                    throws SQLException;
130:
131:            /**
132:             * Gets the number of decimal digits for a specified parameter.
133:             * 
134:             * @param paramIndex
135:             *            the index number of the parameter, where the first parameter
136:             *            has an index of 1
137:             * @return the number of decimal digits ("the precision") for the parameter.
138:             *         0 if the parameter is not a numeric type.
139:             * @throws SQLException
140:             *             if a database error happens
141:             */
142:            public int getPrecision(int paramIndex) throws SQLException;
143:
144:            /**
145:             * Gets the number of digits after the decimal point for a specified
146:             * parameter.
147:             * 
148:             * @param paramIndex
149:             *            the index number of the parameter, where the first parameter
150:             *            has an index of 1
151:             * @return the number of digits after the decimal point ("the scale") for
152:             *         the parameter. 0 if the parameter is not a numeric type.
153:             * @throws SQLException
154:             *             if a database error happens
155:             */
156:            public int getScale(int paramIndex) throws SQLException;
157:
158:            /**
159:             * Gets whether null values are allowed for the specified parameter.
160:             * 
161:             * @param paramIndex
162:             *            the index number of the parameter, where the first parameter
163:             *            has an index of 1
164:             * @return indicator of nullability, can be:
165:             *         ParameterMetaData.parameterNoNulls,
166:             *         ParameterMetaData.parameterNullable, or
167:             *         ParameterMetaData.parameterNullableUnknown
168:             * @throws SQLException
169:             *             if a database error is encountered
170:             */
171:            public int isNullable(int paramIndex) throws SQLException;
172:
173:            /**
174:             * Gets whether values for the specified parameter can be signed numbers.
175:             * 
176:             * @param paramIndex
177:             *            the index number of the parameter, where the first parameter
178:             *            has an index of 1
179:             * @return true if values can be signed numbers for this parameter, false
180:             *         otherwise.
181:             * @throws SQLException
182:             *             if a database error happens
183:             */
184:            public boolean isSigned(int paramIndex) throws SQLException;
185:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.