Source Code Cross Referenced for Ref.java in  » 6.0-JDK-Core » sql » 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
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Core » sql » java.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
003:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004:         *
005:         * This code is free software; you can redistribute it and/or modify it
006:         * under the terms of the GNU General Public License version 2 only, as
007:         * published by the Free Software Foundation.  Sun designates this
008:         * particular file as subject to the "Classpath" exception as provided
009:         * by Sun in the LICENSE file that accompanied this code.
010:         *
011:         * This code is distributed in the hope that it will be useful, but WITHOUT
012:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013:         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014:         * version 2 for more details (a copy is included in the LICENSE file that
015:         * accompanied this code).
016:         *
017:         * You should have received a copy of the GNU General Public License version
018:         * 2 along with this work; if not, write to the Free Software Foundation,
019:         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020:         *
021:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022:         * CA 95054 USA or visit www.sun.com if you need additional information or
023:         * have any questions.
024:         */
025:
026:        package java.sql;
027:
028:        /**
029:         * The mapping in the Java programming language of an SQL <code>REF</code>
030:         * value, which is a reference to an SQL structured type value in the database.
031:         * <P>
032:         * SQL <code>REF</code> values are stored in a table that contains
033:         * instances of a referenceable SQL structured type, and each <code>REF</code>
034:         * value is a unique identifier for one instance in that table. 
035:         * An SQL <code>REF</code> value may be used in place of the
036:         * SQL structured type it references, either as a column value in a
037:         * table or an attribute value in a structured type.
038:         * <P>
039:         * Because an SQL <code>REF</code> value is a logical pointer to an
040:         * SQL structured type, a <code>Ref</code> object is by default also a logical
041:         * pointer. Thus, retrieving an SQL <code>REF</code> value as
042:         * a <code>Ref</code> object does not materialize
043:         * the attributes of the structured type on the client.
044:         * <P>
045:         * A <code>Ref</code> object can be stored in the database using the 
046:         * <code>PreparedStatement.setRef</code> method.
047:         * <p>
048:         * All methods on the <code>Ref</code> interface must be fully implemented if the 
049:         * JDBC driver supports the data type.
050:         * 
051:         * @see Struct
052:         * @since 1.2
053:         */
054:        public interface Ref {
055:
056:            /**
057:             * Retrieves the fully-qualified SQL name of the SQL structured type that
058:             * this <code>Ref</code> object references.
059:             * 
060:             * @return the fully-qualified SQL name of the referenced SQL structured type 
061:             * @exception SQLException if a database access error occurs
062:             * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
063:             * this method
064:             * @since 1.2
065:             */
066:            String getBaseTypeName() throws SQLException;
067:
068:            /**
069:             * Retrieves the referenced object and maps it to a Java type
070:             * using the given type map.
071:             *
072:             * @param map a <code>java.util.Map</code> object that contains 
073:             *        the mapping to use (the fully-qualified name of the SQL
074:             *        structured type being referenced and the class object for
075:             *        <code>SQLData</code> implementation to which the SQL
076:             *        structured type will be mapped)
077:             * @return  a Java <code>Object</code> that is the custom mapping for 
078:             *          the SQL structured type to which this <code>Ref</code>
079:             *          object refers
080:             * @exception SQLException if a database access error occurs
081:             * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
082:             * this method
083:             * @since 1.4
084:             * @see #setObject
085:             */
086:            Object getObject(java.util.Map<String, Class<?>> map)
087:                    throws SQLException;
088:
089:            /**
090:             * Retrieves the SQL structured type instance referenced by
091:             * this <code>Ref</code> object.  If the connection's type map has an entry
092:             * for the structured type, the instance will be custom mapped to
093:             * the Java class indicated in the type map.  Otherwise, the
094:             * structured type instance will be mapped to a <code>Struct</code> object.
095:             *
096:             * @return  a Java <code>Object</code> that is the mapping for 
097:             *          the SQL structured type to which this <code>Ref</code>
098:             *          object refers
099:             * @exception SQLException if a database access error occurs
100:             * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
101:             * this method
102:             * @since 1.4
103:             * @see #setObject
104:             */
105:            Object getObject() throws SQLException;
106:
107:            /**
108:             * Sets the structured type value that this <code>Ref</code>
109:             * object references to the given instance of <code>Object</code>.
110:             * The driver converts this to an SQL structured type when it
111:             * sends it to the database.
112:             *
113:             * @param value an <code>Object</code> representing the SQL 
114:             *        structured type instance that this
115:             *        <code>Ref</code> object will reference
116:             * @exception SQLException if a database access error occurs
117:             * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
118:             * this method
119:             * @since 1.4
120:             * @see #getObject()
121:             * @see #getObject(Map)
122:             * @see PreparedStatement#setObject(int, Object)
123:             * @see CallableStatement#setObject(String, Object)
124:             */
125:            void setObject(Object value) throws SQLException;
126:
127:        }
w___w__w__.___jav_a___2_s._c__o__m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.