Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
7dec4f80
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7dec4f80
编写于
6月 27, 2013
作者:
L
lancea
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8017471: Fix JDBC -Xdoclint public errors
Reviewed-by: darcy
上级
019c9349
变更
36
隐藏空白更改
内联
并排
Showing
36 changed file
with
386 addition
and
360 deletion
+386
-360
src/share/classes/java/sql/Blob.java
src/share/classes/java/sql/Blob.java
+2
-2
src/share/classes/java/sql/CallableStatement.java
src/share/classes/java/sql/CallableStatement.java
+2
-0
src/share/classes/java/sql/Clob.java
src/share/classes/java/sql/Clob.java
+2
-2
src/share/classes/java/sql/DatabaseMetaData.java
src/share/classes/java/sql/DatabaseMetaData.java
+2
-2
src/share/classes/java/sql/Driver.java
src/share/classes/java/sql/Driver.java
+3
-2
src/share/classes/java/sql/DriverAction.java
src/share/classes/java/sql/DriverAction.java
+1
-1
src/share/classes/java/sql/NClob.java
src/share/classes/java/sql/NClob.java
+2
-2
src/share/classes/java/sql/ResultSet.java
src/share/classes/java/sql/ResultSet.java
+4
-2
src/share/classes/java/sql/SQLInput.java
src/share/classes/java/sql/SQLInput.java
+1
-0
src/share/classes/java/sql/SQLPermission.java
src/share/classes/java/sql/SQLPermission.java
+0
-1
src/share/classes/java/sql/SQLXML.java
src/share/classes/java/sql/SQLXML.java
+3
-1
src/share/classes/java/sql/Wrapper.java
src/share/classes/java/sql/Wrapper.java
+2
-1
src/share/classes/javax/sql/CommonDataSource.java
src/share/classes/javax/sql/CommonDataSource.java
+3
-2
src/share/classes/javax/sql/ConnectionPoolDataSource.java
src/share/classes/javax/sql/ConnectionPoolDataSource.java
+2
-2
src/share/classes/javax/sql/DataSource.java
src/share/classes/javax/sql/DataSource.java
+1
-1
src/share/classes/javax/sql/RowSet.java
src/share/classes/javax/sql/RowSet.java
+2
-2
src/share/classes/javax/sql/XADataSource.java
src/share/classes/javax/sql/XADataSource.java
+2
-2
src/share/classes/javax/sql/rowset/BaseRowSet.java
src/share/classes/javax/sql/rowset/BaseRowSet.java
+4
-4
src/share/classes/javax/sql/rowset/CachedRowSet.java
src/share/classes/javax/sql/rowset/CachedRowSet.java
+5
-6
src/share/classes/javax/sql/rowset/FilteredRowSet.java
src/share/classes/javax/sql/rowset/FilteredRowSet.java
+4
-4
src/share/classes/javax/sql/rowset/JdbcRowSet.java
src/share/classes/javax/sql/rowset/JdbcRowSet.java
+7
-5
src/share/classes/javax/sql/rowset/Joinable.java
src/share/classes/javax/sql/rowset/Joinable.java
+2
-2
src/share/classes/javax/sql/rowset/Predicate.java
src/share/classes/javax/sql/rowset/Predicate.java
+2
-2
src/share/classes/javax/sql/rowset/RowSetProvider.java
src/share/classes/javax/sql/rowset/RowSetProvider.java
+4
-2
src/share/classes/javax/sql/rowset/RowSetWarning.java
src/share/classes/javax/sql/rowset/RowSetWarning.java
+2
-2
src/share/classes/javax/sql/rowset/WebRowSet.java
src/share/classes/javax/sql/rowset/WebRowSet.java
+288
-282
src/share/classes/javax/sql/rowset/package.html
src/share/classes/javax/sql/rowset/package.html
+2
-2
src/share/classes/javax/sql/rowset/serial/SerialArray.java
src/share/classes/javax/sql/rowset/serial/SerialArray.java
+2
-2
src/share/classes/javax/sql/rowset/serial/SerialBlob.java
src/share/classes/javax/sql/rowset/serial/SerialBlob.java
+2
-2
src/share/classes/javax/sql/rowset/serial/SerialClob.java
src/share/classes/javax/sql/rowset/serial/SerialClob.java
+2
-2
src/share/classes/javax/sql/rowset/serial/SerialDatalink.java
...share/classes/javax/sql/rowset/serial/SerialDatalink.java
+3
-2
src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java
...are/classes/javax/sql/rowset/serial/SerialJavaObject.java
+1
-1
src/share/classes/javax/sql/rowset/serial/SerialRef.java
src/share/classes/javax/sql/rowset/serial/SerialRef.java
+2
-2
src/share/classes/javax/sql/rowset/serial/SerialStruct.java
src/share/classes/javax/sql/rowset/serial/SerialStruct.java
+2
-2
src/share/classes/javax/sql/rowset/spi/SyncFactory.java
src/share/classes/javax/sql/rowset/spi/SyncFactory.java
+9
-5
src/share/classes/javax/sql/rowset/spi/SyncResolver.java
src/share/classes/javax/sql/rowset/spi/SyncResolver.java
+9
-6
未找到文件。
src/share/classes/java/sql/Blob.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 1998, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -29,7 +29,7 @@ import java.io.InputStream;
...
@@ -29,7 +29,7 @@ import java.io.InputStream;
/**
/**
* The representation (mapping) in
* The representation (mapping) in
* the Java
<sup><font size=-2>TM</font></sup>
programming
* the Java
™
programming
* language of an SQL
* language of an SQL
* <code>BLOB</code> value. An SQL <code>BLOB</code> is a built-in type
* <code>BLOB</code> value. An SQL <code>BLOB</code> is a built-in type
* that stores a Binary Large Object as a column value in a row of
* that stores a Binary Large Object as a column value in a row of
...
...
src/share/classes/java/sql/CallableStatement.java
浏览文件 @
7dec4f80
...
@@ -2445,6 +2445,7 @@ public interface CallableStatement extends PreparedStatement {
...
@@ -2445,6 +2445,7 @@ public interface CallableStatement extends PreparedStatement {
* @param parameterIndex the first parameter is 1, the second is 2, and so on
* @param parameterIndex the first parameter is 1, the second is 2, and so on
* @param type Class representing the Java data type to convert the
* @param type Class representing the Java data type to convert the
* designated parameter to.
* designated parameter to.
* @param <T> the type of the class modeled by this Class object
* @return an instance of {@code type} holding the OUT parameter value
* @return an instance of {@code type} holding the OUT parameter value
* @throws SQLException if conversion is not supported, type is null or
* @throws SQLException if conversion is not supported, type is null or
* another error occurs. The getCause() method of the
* another error occurs. The getCause() method of the
...
@@ -2473,6 +2474,7 @@ public interface CallableStatement extends PreparedStatement {
...
@@ -2473,6 +2474,7 @@ public interface CallableStatement extends PreparedStatement {
* @param parameterName the name of the parameter
* @param parameterName the name of the parameter
* @param type Class representing the Java data type to convert
* @param type Class representing the Java data type to convert
* the designated parameter to.
* the designated parameter to.
* @param <T> the type of the class modeled by this Class object
* @return an instance of {@code type} holding the OUT parameter
* @return an instance of {@code type} holding the OUT parameter
* value
* value
* @throws SQLException if conversion is not supported, type is null or
* @throws SQLException if conversion is not supported, type is null or
...
...
src/share/classes/java/sql/Clob.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 1998, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -28,7 +28,7 @@ package java.sql;
...
@@ -28,7 +28,7 @@ package java.sql;
import
java.io.Reader
;
import
java.io.Reader
;
/**
/**
* The mapping in the Java
<sup><font size=-2>TM</font></sup>
programming language
* The mapping in the Java
™
programming language
* for the SQL <code>CLOB</code> type.
* for the SQL <code>CLOB</code> type.
* An SQL <code>CLOB</code> is a built-in type
* An SQL <code>CLOB</code> is a built-in type
* that stores a Character Large Object as a column value in a row of
* that stores a Character Large Object as a column value in a row of
...
...
src/share/classes/java/sql/DatabaseMetaData.java
浏览文件 @
7dec4f80
...
@@ -31,7 +31,7 @@ package java.sql;
...
@@ -31,7 +31,7 @@ package java.sql;
* <P>
* <P>
* This interface is implemented by driver vendors to let users know the capabilities
* This interface is implemented by driver vendors to let users know the capabilities
* of a Database Management System (DBMS) in combination with
* of a Database Management System (DBMS) in combination with
* the driver based on JDBC
<sup><font size=-2>TM</font></sup>
technology
* the driver based on JDBC
™
technology
* ("JDBC driver") that is used with it. Different relational DBMSs often support
* ("JDBC driver") that is used with it. Different relational DBMSs often support
* different features, implement features in different ways, and use different
* different features, implement features in different ways, and use different
* data types. In addition, a driver may implement a feature on top of what the
* data types. In addition, a driver may implement a feature on top of what the
...
@@ -3074,7 +3074,7 @@ public interface DatabaseMetaData extends Wrapper {
...
@@ -3074,7 +3074,7 @@ public interface DatabaseMetaData extends Wrapper {
*
*
* @param holdability one of the following constants:
* @param holdability one of the following constants:
* <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
* <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<code>
* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<
/
code>
* @return <code>true</code> if so; <code>false</code> otherwise
* @return <code>true</code> if so; <code>false</code> otherwise
* @exception SQLException if a database access error occurs
* @exception SQLException if a database access error occurs
* @see Connection
* @see Connection
...
...
src/share/classes/java/sql/Driver.java
浏览文件 @
7dec4f80
...
@@ -144,7 +144,7 @@ public interface Driver {
...
@@ -144,7 +144,7 @@ public interface Driver {
/**
/**
* Reports whether this driver is a genuine JDBC
* Reports whether this driver is a genuine JDBC
* Compliant
<sup><font size=-2>TM</font></sup>
driver.
* Compliant
™
driver.
* A driver may only report <code>true</code> here if it passes the JDBC
* A driver may only report <code>true</code> here if it passes the JDBC
* compliance tests; otherwise it is required to return <code>false</code>.
* compliance tests; otherwise it is required to return <code>false</code>.
* <P>
* <P>
...
@@ -173,7 +173,8 @@ public interface Driver {
...
@@ -173,7 +173,8 @@ public interface Driver {
* In the worst case, this may be the root Logger.
* In the worst case, this may be the root Logger.
*
*
* @return the parent Logger for this driver
* @return the parent Logger for this driver
* @throws SQLFeatureNotSupportedException if the driver does not use <code>java.util.logging<code>.
* @throws SQLFeatureNotSupportedException if the driver does not use
* {@code java.util.logging}.
* @since 1.7
* @since 1.7
*/
*/
public
Logger
getParentLogger
()
throws
SQLFeatureNotSupportedException
;
public
Logger
getParentLogger
()
throws
SQLFeatureNotSupportedException
;
...
...
src/share/classes/java/sql/DriverAction.java
浏览文件 @
7dec4f80
...
@@ -33,7 +33,7 @@ package java.sql;
...
@@ -33,7 +33,7 @@ package java.sql;
* directly by applications. A JDBC Driver may choose
* directly by applications. A JDBC Driver may choose
* to create its {@code DriverAction} implementation in a private class
* to create its {@code DriverAction} implementation in a private class
* to avoid it being called directly.
* to avoid it being called directly.
* <
o
>
* <
p
>
* The JDBC driver's static initialization block must call
* The JDBC driver's static initialization block must call
* {@linkplain DriverManager#registerDriver(java.sql.Driver, java.sql.DriverAction) } in order
* {@linkplain DriverManager#registerDriver(java.sql.Driver, java.sql.DriverAction) } in order
* to inform {@code DriverManager} which {@code DriverAction} implementation to
* to inform {@code DriverManager} which {@code DriverAction} implementation to
...
...
src/share/classes/java/sql/NClob.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2005, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -28,7 +28,7 @@ package java.sql;
...
@@ -28,7 +28,7 @@ package java.sql;
import
java.sql.Clob
;
import
java.sql.Clob
;
/**
/**
* The mapping in the Java
<sup><font size=-2>TM</font></sup>
programming language
* The mapping in the Java
™
programming language
* for the SQL <code>NCLOB</code> type.
* for the SQL <code>NCLOB</code> type.
* An SQL <code>NCLOB</code> is a built-in type
* An SQL <code>NCLOB</code> is a built-in type
* that stores a Character Large Object using the National Character Set
* that stores a Character Large Object using the National Character Set
...
...
src/share/classes/java/sql/ResultSet.java
浏览文件 @
7dec4f80
...
@@ -90,7 +90,7 @@ import java.io.InputStream;
...
@@ -90,7 +90,7 @@ import java.io.InputStream;
* the intended columns, which can be assured with the SQL <i>AS</i> clause.
* the intended columns, which can be assured with the SQL <i>AS</i> clause.
* <P>
* <P>
* A set of updater methods were added to this interface
* A set of updater methods were added to this interface
* in the JDBC 2.0 API (Java
<sup><font size=-2>TM</font></sup>
2 SDK,
* in the JDBC 2.0 API (Java
™
2 SDK,
* Standard Edition, version 1.2). The comments regarding parameters
* Standard Edition, version 1.2). The comments regarding parameters
* to the getter methods also apply to parameters to the
* to the getter methods also apply to parameters to the
* updater methods.
* updater methods.
...
@@ -4101,7 +4101,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
...
@@ -4101,7 +4101,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* Appendix B, Table B-3 and conversion of appropriate user defined SQL
* Appendix B, Table B-3 and conversion of appropriate user defined SQL
* types to a Java type which implements {@code SQLData}, or {@code Struct}.
* types to a Java type which implements {@code SQLData}, or {@code Struct}.
* Additional conversions may be supported and are vendor defined.
* Additional conversions may be supported and are vendor defined.
*
*
@param <T> the type of the class modeled by this Class object
* @param columnIndex the first column is 1, the second is 2, ...
* @param columnIndex the first column is 1, the second is 2, ...
* @param type Class representing the Java data type to convert the designated
* @param type Class representing the Java data type to convert the designated
* column to.
* column to.
...
@@ -4135,6 +4135,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
...
@@ -4135,6 +4135,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* of the column
* of the column
* @param type Class representing the Java data type to convert the designated
* @param type Class representing the Java data type to convert the designated
* column to.
* column to.
* @param <T> the type of the class modeled by this Class object
* @return an instance of {@code type} holding the column value
* @return an instance of {@code type} holding the column value
* @throws SQLException if conversion is not supported, type is null or
* @throws SQLException if conversion is not supported, type is null or
* another error occurs. The getCause() method of the
* another error occurs. The getCause() method of the
...
@@ -4208,6 +4209,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
...
@@ -4208,6 +4209,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* @param columnLabel the label for the column specified with the SQL AS
* @param columnLabel the label for the column specified with the SQL AS
* clause. If the SQL AS clause was not specified, then the label is
* clause. If the SQL AS clause was not specified, then the label is
* the name of the column
* the name of the column
* @param x the new column value
* @param targetSqlType the SQL type to be sent to the database
* @param targetSqlType the SQL type to be sent to the database
* @param scaleOrLength for an object of {@code java.math.BigDecimal} ,
* @param scaleOrLength for an object of {@code java.math.BigDecimal} ,
* this is the number of digits after the decimal point. For
* this is the number of digits after the decimal point. For
...
...
src/share/classes/java/sql/SQLInput.java
浏览文件 @
7dec4f80
...
@@ -444,6 +444,7 @@ public interface SQLInput {
...
@@ -444,6 +444,7 @@ public interface SQLInput {
*<p>
*<p>
* The default implementation will throw {@code SQLFeatureNotSupportedException}
* The default implementation will throw {@code SQLFeatureNotSupportedException}
*
*
* @param<T> the type of the class modeled by this Class object
* @param type Class representing the Java data type to convert the attribute to.
* @param type Class representing the Java data type to convert the attribute to.
* @return the attribute at the head of the stream as an {@code Object} in the
* @return the attribute at the head of the stream as an {@code Object} in the
* Java programming language;{@code null} if the attribute is SQL {@code NULL}
* Java programming language;{@code null} if the attribute is SQL {@code NULL}
...
...
src/share/classes/java/sql/SQLPermission.java
浏览文件 @
7dec4f80
...
@@ -103,7 +103,6 @@ import java.security.*;
...
@@ -103,7 +103,6 @@ import java.security.*;
* <td>Permits an application to remove a JDBC driver from the list of
* <td>Permits an application to remove a JDBC driver from the list of
* registered Drivers and release its resources.</td>
* registered Drivers and release its resources.</td>
* </tr>
* </tr>
* </tr>
* </table>
* </table>
*<p>
*<p>
* @since 1.3
* @since 1.3
...
...
src/share/classes/java/sql/SQLXML.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2005, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -360,6 +360,7 @@ public interface SQLXML
...
@@ -360,6 +360,7 @@ public interface SQLXML
* xmlReader.parse(saxSource.getInputSource());
* xmlReader.parse(saxSource.getInputSource());
* </pre>
* </pre>
*
*
* @param <T> the type of the class modeled by this Class object
* @param sourceClass The class of the source, or null.
* @param sourceClass The class of the source, or null.
* If the class is null, a vendor specifc Source implementation will be returned.
* If the class is null, a vendor specifc Source implementation will be returned.
* The following classes are supported at a minimum:
* The following classes are supported at a minimum:
...
@@ -401,6 +402,7 @@ public interface SQLXML
...
@@ -401,6 +402,7 @@ public interface SQLXML
* contentHandler.endDocument();
* contentHandler.endDocument();
* </pre>
* </pre>
*
*
* @param <T> the type of the class modeled by this Class object
* @param resultClass The class of the result, or null.
* @param resultClass The class of the result, or null.
* If resultClass is null, a vendor specific Result implementation will be returned.
* If resultClass is null, a vendor specific Result implementation will be returned.
* The following classes are supported at a minimum:
* The following classes are supported at a minimum:
...
...
src/share/classes/java/sql/Wrapper.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2005, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -53,6 +53,7 @@ public interface Wrapper {
...
@@ -53,6 +53,7 @@ public interface Wrapper {
* or a proxy for that result. If the receiver is not a
* or a proxy for that result. If the receiver is not a
* wrapper and does not implement the interface, then an <code>SQLException</code> is thrown.
* wrapper and does not implement the interface, then an <code>SQLException</code> is thrown.
*
*
* @param <T> the type of the class modeled by this Class object
* @param iface A Class defining an interface that the result must implement.
* @param iface A Class defining an interface that the result must implement.
* @return an object that implements the interface. May be a proxy for the actual implementing object.
* @return an object that implements the interface. May be a proxy for the actual implementing object.
* @throws java.sql.SQLException If no object found that implements the interface
* @throws java.sql.SQLException If no object found that implements the interface
...
...
src/share/classes/javax/sql/CommonDataSource.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2005, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -122,7 +122,8 @@ public interface CommonDataSource {
...
@@ -122,7 +122,8 @@ public interface CommonDataSource {
* In the worst case, this may be the root Logger.
* In the worst case, this may be the root Logger.
*
*
* @return the parent Logger for this data source
* @return the parent Logger for this data source
* @throws SQLFeatureNotSupportedException if the data source does not use <code>java.util.logging<code>.
* @throws SQLFeatureNotSupportedException if the data source does not use
* {@code java.util.logging}
* @since 1.7
* @since 1.7
*/
*/
public
Logger
getParentLogger
()
throws
SQLFeatureNotSupportedException
;
public
Logger
getParentLogger
()
throws
SQLFeatureNotSupportedException
;
...
...
src/share/classes/javax/sql/ConnectionPoolDataSource.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -32,7 +32,7 @@ import java.sql.SQLException;
...
@@ -32,7 +32,7 @@ import java.sql.SQLException;
* A factory for <code>PooledConnection</code>
* A factory for <code>PooledConnection</code>
* objects. An object that implements this interface will typically be
* objects. An object that implements this interface will typically be
* registered with a naming service that is based on the
* registered with a naming service that is based on the
* Java
<sup><font size=-2>TM</font></sup>
Naming and Directory Interface
* Java
™
Naming and Directory Interface
* (JNDI).
* (JNDI).
*
*
* @since 1.4
* @since 1.4
...
...
src/share/classes/javax/sql/DataSource.java
浏览文件 @
7dec4f80
...
@@ -36,7 +36,7 @@ import java.sql.Wrapper;
...
@@ -36,7 +36,7 @@ import java.sql.Wrapper;
* is the preferred means of getting a connection. An object that implements
* is the preferred means of getting a connection. An object that implements
* the {@code DataSource} interface will typically be
* the {@code DataSource} interface will typically be
* registered with a naming service based on the
* registered with a naming service based on the
* Java
<sup><font size=-2>TM</font></sup>
Naming and Directory (JNDI) API.
* Java
™
Naming and Directory (JNDI) API.
* <P>
* <P>
* The {@code DataSource} interface is implemented by a driver vendor.
* The {@code DataSource} interface is implemented by a driver vendor.
* There are three types of implementations:
* There are three types of implementations:
...
...
src/share/classes/javax/sql/RowSet.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2000, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -32,7 +32,7 @@ import java.util.*;
...
@@ -32,7 +32,7 @@ import java.util.*;
/**
/**
* The interface that adds support to the JDBC API for the
* The interface that adds support to the JDBC API for the
* JavaBeans
<sup><font size=-2>TM</font></sup>
component model.
* JavaBeans
™
component model.
* A rowset, which can be used as a JavaBeans component in
* A rowset, which can be used as a JavaBeans component in
* a visual Bean development environment, can be created and
* a visual Bean development environment, can be created and
* configured at design time and executed at run time.
* configured at design time and executed at run time.
...
...
src/share/classes/javax/sql/XADataSource.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2000, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -31,7 +31,7 @@ import java.sql.*;
...
@@ -31,7 +31,7 @@ import java.sql.*;
* A factory for {@code XAConnection} objects that is used internally.
* A factory for {@code XAConnection} objects that is used internally.
* An object that implements the {@code XADataSource} interface is
* An object that implements the {@code XADataSource} interface is
* typically registered with a naming service that uses the
* typically registered with a naming service that uses the
* Java Naming and Directory Interface
<sup><font size=-3>TM</font></sup>
* Java Naming and Directory Interface
™
* (JNDI).
* (JNDI).
* <p>
* <p>
* An implementation of {@code XADataSource} must include a public no-arg
* An implementation of {@code XADataSource} must include a public no-arg
...
...
src/share/classes/javax/sql/rowset/BaseRowSet.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -37,7 +37,7 @@ import javax.sql.rowset.serial.*;
...
@@ -37,7 +37,7 @@ import javax.sql.rowset.serial.*;
/**
/**
* An abstract class providing a <code>RowSet</code> object with its basic functionality.
* An abstract class providing a <code>RowSet</code> object with its basic functionality.
* The basic functions include having properties and sending event notifications,
* The basic functions include having properties and sending event notifications,
* which all JavaBeans
<sup><font size=-2>TM</font></sup>
components must implement.
* which all JavaBeans
™
components must implement.
* <P>
* <P>
* <h3>1.0 Overview</h3>
* <h3>1.0 Overview</h3>
* The <code>BaseRowSet</code> class provides the core functionality
* The <code>BaseRowSet</code> class provides the core functionality
...
@@ -93,7 +93,7 @@ import javax.sql.rowset.serial.*;
...
@@ -93,7 +93,7 @@ import javax.sql.rowset.serial.*;
* NOTE: In order to use a <code>DataSource</code> object for making a
* NOTE: In order to use a <code>DataSource</code> object for making a
* connection, the <code>DataSource</code> object must have been registered
* connection, the <code>DataSource</code> object must have been registered
* with a naming service that uses the Java Naming and Directory
* with a naming service that uses the Java Naming and Directory
* Interface
<sup><font size=-2>TM</font></sup>
(JNDI) API. This registration
* Interface
™
(JNDI) API. This registration
* is usually done by a person acting in the capacity of a system administrator.
* is usually done by a person acting in the capacity of a system administrator.
* <P>
* <P>
* <h3>3.0 Setting the Command and Its Parameters</h3>
* <h3>3.0 Setting the Command and Its Parameters</h3>
...
@@ -106,7 +106,7 @@ import javax.sql.rowset.serial.*;
...
@@ -106,7 +106,7 @@ import javax.sql.rowset.serial.*;
* to <code>null</code> if required.
* to <code>null</code> if required.
* <P>
* <P>
* The following code fragment illustrates how the
* The following code fragment illustrates how the
* <code>CachedRowSet</code>
<sup><font size=-2>TM</font></sup>
* <code>CachedRowSet</code>
™
* object <code>crs</code> might have its command property set. Note that if a
* object <code>crs</code> might have its command property set. Note that if a
* tool is used to set properties, this is the code that the tool would use.
* tool is used to set properties, this is the code that the tool would use.
* <PRE>{@code
* <PRE>{@code
...
...
src/share/classes/javax/sql/rowset/CachedRowSet.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -46,7 +46,7 @@ import javax.sql.rowset.spi.*;
...
@@ -46,7 +46,7 @@ import javax.sql.rowset.spi.*;
* A <code>CachedRowSet</code> object is a container for rows of data
* A <code>CachedRowSet</code> object is a container for rows of data
* that caches its rows in memory, which makes it possible to operate without always being
* that caches its rows in memory, which makes it possible to operate without always being
* connected to its data source. Further, it is a
* connected to its data source. Further, it is a
* JavaBeans
<sup><font size=-2>TM</font></sup>
component and is scrollable,
* JavaBeans
™
component and is scrollable,
* updatable, and serializable. A <code>CachedRowSet</code> object typically
* updatable, and serializable. A <code>CachedRowSet</code> object typically
* contains rows from a result set, but it can also contain rows from any file
* contains rows from a result set, but it can also contain rows from any file
* with a tabular format, such as a spread sheet. The reference implementation
* with a tabular format, such as a spread sheet. The reference implementation
...
@@ -410,7 +410,7 @@ import javax.sql.rowset.spi.*;
...
@@ -410,7 +410,7 @@ import javax.sql.rowset.spi.*;
* NOTE: In order to use a <code>DataSource</code> object for making a
* NOTE: In order to use a <code>DataSource</code> object for making a
* connection, the <code>DataSource</code> object must have been registered
* connection, the <code>DataSource</code> object must have been registered
* with a naming service that uses the Java Naming and Directory
* with a naming service that uses the Java Naming and Directory
* Interface
<sup><font size=-2>TM</font></sup>
(JNDI) API. This registration
* Interface
™
(JNDI) API. This registration
* is usually done by a person acting in the capacity of a system
* is usually done by a person acting in the capacity of a system
* administrator.
* administrator.
* <P>
* <P>
...
@@ -734,7 +734,6 @@ public interface CachedRowSet extends RowSet, Joinable {
...
@@ -734,7 +734,6 @@ public interface CachedRowSet extends RowSet, Joinable {
* source. Otherwise, the application <b>must</b> explicity call the
* source. Otherwise, the application <b>must</b> explicity call the
* <code>commit()</code> or <code>rollback()</code> methods as appropriate.
* <code>commit()</code> or <code>rollback()</code> methods as appropriate.
*
*
* @throws SQLException if the cursor is on the insert row
* @throws SyncProviderException if the underlying
* @throws SyncProviderException if the underlying
* synchronization provider's writer fails to write the updates
* synchronization provider's writer fails to write the updates
* back to the data source
* back to the data source
...
@@ -805,7 +804,6 @@ public interface CachedRowSet extends RowSet, Joinable {
...
@@ -805,7 +804,6 @@ public interface CachedRowSet extends RowSet, Joinable {
* <code>commit</code> or <code>rollback</code> methods as appropriate.
* <code>commit</code> or <code>rollback</code> methods as appropriate.
*
*
* @param con a standard JDBC <code>Connection</code> object
* @param con a standard JDBC <code>Connection</code> object
* @throws SQLException if the cursor is on the insert row
* @throws SyncProviderException if the underlying
* @throws SyncProviderException if the underlying
* synchronization provider's writer fails to write the updates
* synchronization provider's writer fails to write the updates
* back to the data source
* back to the data source
...
@@ -1371,7 +1369,7 @@ public interface CachedRowSet extends RowSet, Joinable {
...
@@ -1371,7 +1369,7 @@ public interface CachedRowSet extends RowSet, Joinable {
* Applications can form a <code>WebRowSet</code> object from the <code>CachedRowSet</code>
* Applications can form a <code>WebRowSet</code> object from the <code>CachedRowSet</code>
* object returned by this method in order
* object returned by this method in order
* to export the <code>RowSet</code> schema definition to XML for future use.
* to export the <code>RowSet</code> schema definition to XML for future use.
*
*
@return An empty copy of this {@code CachedRowSet} object
* @throws SQLException if an error occurs in cloning the structure of this
* @throws SQLException if an error occurs in cloning the structure of this
* <code>CachedRowSet</code> object
* <code>CachedRowSet</code> object
* @see #createShared
* @see #createShared
...
@@ -1543,6 +1541,7 @@ public interface CachedRowSet extends RowSet, Joinable {
...
@@ -1543,6 +1541,7 @@ public interface CachedRowSet extends RowSet, Joinable {
* @param numRows when populating, the number of rows interval on which the
* @param numRows when populating, the number of rows interval on which the
* <code>CachedRowSet</code> populated should fire; the default value
* <code>CachedRowSet</code> populated should fire; the default value
* is zero; cannot be less than <code>fetchSize</code> or zero
* is zero; cannot be less than <code>fetchSize</code> or zero
* @throws SQLException {@code numRows < 0 or numRows < getFetchSize() }
*/
*/
public
void
rowSetPopulated
(
RowSetEvent
event
,
int
numRows
)
throws
SQLException
;
public
void
rowSetPopulated
(
RowSetEvent
event
,
int
numRows
)
throws
SQLException
;
...
...
src/share/classes/javax/sql/rowset/FilteredRowSet.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -51,7 +51,7 @@ import java.math.*;
...
@@ -51,7 +51,7 @@ import java.math.*;
* <p>
* <p>
* A JDBC <code>FilteredRowSet</code> standard implementation implements the
* A JDBC <code>FilteredRowSet</code> standard implementation implements the
* <code>RowSet</code> interfaces and extends the
* <code>RowSet</code> interfaces and extends the
* <code>CachedRowSet</code>
<sup><font size=-2>TM</font></sup>
class. The
* <code>CachedRowSet</code>
™
class. The
* <code>CachedRowSet</code> class provides a set of protected cursor manipulation
* <code>CachedRowSet</code> class provides a set of protected cursor manipulation
* methods, which a <code>FilteredRowSet</code> implementation can override
* methods, which a <code>FilteredRowSet</code> implementation can override
* to supply filtering support.
* to supply filtering support.
...
@@ -69,8 +69,8 @@ import java.math.*;
...
@@ -69,8 +69,8 @@ import java.math.*;
* class JavaDoc), a <code>FilteredRowSet</code> could then be used as described
* class JavaDoc), a <code>FilteredRowSet</code> could then be used as described
* below.
* below.
* <P>
* <P>
* <code>
* <pre>
* <pre>
* {@code
* FilteredRowSet frs = new FilteredRowSetImpl();
* FilteredRowSet frs = new FilteredRowSetImpl();
* frs.populate(rs);
* frs.populate(rs);
*
*
...
@@ -78,8 +78,8 @@ import java.math.*;
...
@@ -78,8 +78,8 @@ import java.math.*;
* frs.setFilter(name);
* frs.setFilter(name);
*
*
* frs.next() // only names from "Alpha" to "Bravo" will be returned
* frs.next() // only names from "Alpha" to "Bravo" will be returned
* }
* </pre>
* </pre>
* </code>
* In the example above, we initialize a <code>Range</code> object which
* In the example above, we initialize a <code>Range</code> object which
* implements the <code>Predicate</code> interface. This object expresses
* implements the <code>Predicate</code> interface. This object expresses
* the following constraints: All rows outputted or modified from this
* the following constraints: All rows outputted or modified from this
...
...
src/share/classes/javax/sql/rowset/JdbcRowSet.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -38,7 +38,7 @@ import java.io.*;
...
@@ -38,7 +38,7 @@ import java.io.*;
*
*
* <h3>1.0 Overview</h3>
* <h3>1.0 Overview</h3>
* A wrapper around a <code>ResultSet</code> object that makes it possible
* A wrapper around a <code>ResultSet</code> object that makes it possible
* to use the result set as a JavaBeans
<sup><font size=-2>TM</font></sup>
* to use the result set as a JavaBeans
™
* component. Thus, a <code>JdbcRowSet</code> object can be one of the Beans that
* component. Thus, a <code>JdbcRowSet</code> object can be one of the Beans that
* a tool makes available for composing an application. Because
* a tool makes available for composing an application. Because
* a <code>JdbcRowSet</code> is a connected rowset, that is, it continually
* a <code>JdbcRowSet</code> is a connected rowset, that is, it continually
...
@@ -113,7 +113,7 @@ import java.io.*;
...
@@ -113,7 +113,7 @@ import java.io.*;
* <P>
* <P>
* The implementation of the <code>RowSet</code> method <code>execute</code> in the
* The implementation of the <code>RowSet</code> method <code>execute</code> in the
* <code>JdbcRowSet</code> reference implementation differs from that in the
* <code>JdbcRowSet</code> reference implementation differs from that in the
* <code>CachedRowSet</code>
<sup><font size=-2>TM</font></sup>
* <code>CachedRowSet</code>
™
* reference implementation to account for the different
* reference implementation to account for the different
* requirements of connected and disconnected <code>RowSet</code> objects.
* requirements of connected and disconnected <code>RowSet</code> objects.
* <p>
* <p>
...
@@ -238,6 +238,7 @@ public interface JdbcRowSet extends RowSet, Joinable {
...
@@ -238,6 +238,7 @@ public interface JdbcRowSet extends RowSet, Joinable {
* call to either the method commit or the method rollback. By default,
* call to either the method commit or the method rollback. By default,
* new connections are in auto-commit mode.
* new connections are in auto-commit mode.
*
*
* @return {@code true} if auto-commit is enabled; {@code false} otherwise
* @throws SQLException if a database access error occurs
* @throws SQLException if a database access error occurs
* @see java.sql.Connection#getAutoCommit()
* @see java.sql.Connection#getAutoCommit()
*/
*/
...
@@ -251,7 +252,8 @@ public interface JdbcRowSet extends RowSet, Joinable {
...
@@ -251,7 +252,8 @@ public interface JdbcRowSet extends RowSet, Joinable {
* to allow an application to set the <code>JdbcRowSet</code> transaction behavior.
* to allow an application to set the <code>JdbcRowSet</code> transaction behavior.
* <p>
* <p>
* Sets the current auto-commit mode for this <code>Connection</code> object.
* Sets the current auto-commit mode for this <code>Connection</code> object.
*
* @param autoCommit {@code true} to enable auto-commit; {@code false} to
* disable auto-commit
* @throws SQLException if a database access error occurs
* @throws SQLException if a database access error occurs
* @see java.sql.Connection#setAutoCommit(boolean)
* @see java.sql.Connection#setAutoCommit(boolean)
*/
*/
...
@@ -277,7 +279,7 @@ public interface JdbcRowSet extends RowSet, Joinable {
...
@@ -277,7 +279,7 @@ public interface JdbcRowSet extends RowSet, Joinable {
* Undoes all changes made in the current transaction to the last set savepoint
* Undoes all changes made in the current transaction to the last set savepoint
* and releases any database locks currently held by this <code>Connection</code>
* and releases any database locks currently held by this <code>Connection</code>
* object. This method should be used only when auto-commit mode has been disabled.
* object. This method should be used only when auto-commit mode has been disabled.
*
*
@param s The {@code Savepoint} to rollback to
* @throws SQLException if a database access error occurs or this <code>Connection</code>
* @throws SQLException if a database access error occurs or this <code>Connection</code>
* object within this <code>JdbcRowSet</code> is in auto-commit mode.
* object within this <code>JdbcRowSet</code> is in auto-commit mode.
* @see #rollback
* @see #rollback
...
...
src/share/classes/javax/sql/rowset/Joinable.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -137,7 +137,7 @@ public interface Joinable {
...
@@ -137,7 +137,7 @@ public interface Joinable {
* object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
* object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
* object based on the match column.
* object based on the match column.
* <p>
* <p>
* Sub-interfaces such as the <code>CachedRowSet</code>
<sup><font size=-2>TM</font></sup>
* Sub-interfaces such as the <code>CachedRowSet</code>
™
* interface define the method <code>CachedRowSet.setKeyColumns</code>, which allows
* interface define the method <code>CachedRowSet.setKeyColumns</code>, which allows
* primary key semantics to be enforced on specific columns.
* primary key semantics to be enforced on specific columns.
* Implementations of the <code>setMatchColumn(int columnIdx)</code> method
* Implementations of the <code>setMatchColumn(int columnIdx)</code> method
...
...
src/share/classes/javax/sql/rowset/Predicate.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -111,7 +111,7 @@ public interface Predicate {
...
@@ -111,7 +111,7 @@ public interface Predicate {
* cursor moving from row to the next. In addition, if this internal method
* cursor moving from row to the next. In addition, if this internal method
* moves the cursor onto a row that has been deleted, the internal method will
* moves the cursor onto a row that has been deleted, the internal method will
* continue to ove the cursor until a valid row is found.
* continue to ove the cursor until a valid row is found.
*
*
@param rs The {@code RowSet} to be evaluated
* @return <code>true</code> if there are more rows in the filter;
* @return <code>true</code> if there are more rows in the filter;
* <code>false</code> otherwise
* <code>false</code> otherwise
*/
*/
...
...
src/share/classes/javax/sql/rowset/RowSetProvider.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2010, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -71,7 +71,9 @@ public class RowSetProvider {
...
@@ -71,7 +71,9 @@ public class RowSetProvider {
debug
=
val
!=
null
&&
!
"false"
.
equals
(
val
);
debug
=
val
!=
null
&&
!
"false"
.
equals
(
val
);
}
}
/**
* RowSetProvider constructor
*/
protected
RowSetProvider
()
{
protected
RowSetProvider
()
{
}
}
...
...
src/share/classes/javax/sql/rowset/RowSetWarning.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -35,7 +35,7 @@ import java.sql.SQLException;
...
@@ -35,7 +35,7 @@ import java.sql.SQLException;
* This class complements the <code>SQLWarning</code> class.
* This class complements the <code>SQLWarning</code> class.
* <P>
* <P>
* Rowset warnings may be retrieved from <code>JdbcRowSet</code>,
* Rowset warnings may be retrieved from <code>JdbcRowSet</code>,
* <code>CachedRowSet</code>
<sup><font size=-2>TM</font></sup>
,
* <code>CachedRowSet</code>
™
,
* <code>WebRowSet</code>, <code>FilteredRowSet</code>, or <code>JoinRowSet</code>
* <code>WebRowSet</code>, <code>FilteredRowSet</code>, or <code>JoinRowSet</code>
* implementations. To retrieve the first warning reported on any
* implementations. To retrieve the first warning reported on any
* <code>RowSet</code>
* <code>RowSet</code>
...
...
src/share/classes/javax/sql/rowset/WebRowSet.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -33,306 +33,310 @@ import java.math.*;
...
@@ -33,306 +33,310 @@ import java.math.*;
import
org.xml.sax.*
;
import
org.xml.sax.*
;
/**
/**
* The standard interface that all implementations of a
<code>WebRowSet</code>
* The standard interface that all implementations of a
{@code WebRowSet}
* must implement.
* must implement.
* <P>
* <P>
* <h3>1.0 Overview</h3>
* <h3>1.0 Overview</h3>
* The
<code>WebRowSetImpl</code>
provides the standard
* The
{@code WebRowSetImpl}
provides the standard
* reference implementation, which may be extended if required.
* reference implementation, which may be extended if required.
* <P>
* <P>
* The standard WebRowSet XML Schema definition is available at the following
* The standard WebRowSet XML Schema definition is available at the following
* URI:
* URI:
* <ul>
* <ul>
* <
pre
>
* <
li
>
* <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
* <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
* </
pre
>
* </
li
>
* </ul>
* </ul>
* It describes the standard XML document format required when describing a
* It describes the standard XML document format required when describing a
*
<code>RowSet</code>
object in XML and must be used be all standard implementations
*
{@code RowSet}
object in XML and must be used be all standard implementations
* of the
<code>WebRowSet</code>
interface to ensure interoperability. In addition,
* of the
{@code WebRowSet}
interface to ensure interoperability. In addition,
* the
<code>WebRowSet</code>
schema uses specific SQL/XML Schema annotations,
* the
{@code WebRowSet}
schema uses specific SQL/XML Schema annotations,
* thus ensuring greater cross
* thus ensuring greater cross
* platform inter-operability. This is an effort currently under way at the ISO
* platform inter-operability. This is an effort currently under way at the ISO
* organization. The SQL/XML definition is available at the following URI:
* organization. The SQL/XML definition is available at the following URI:
* <ul>
* <ul>
* <
pre
>
* <
li
>
* <a href="http://standards.iso.org/iso/9075/2002/12/sqlxml">http://standards.iso.org/iso/9075/2002/12/sqlxml</a>
* <a href="http://standards.iso.org/iso/9075/2002/12/sqlxml">http://standards.iso.org/iso/9075/2002/12/sqlxml</a>
* </
pre
>
* </
li
>
* </ul>
* </ul>
* The schema definition describes the internal data of a
<code>RowSet</code>
object
* The schema definition describes the internal data of a
{@code RowSet}
object
* in three distinct areas:
* in three distinct areas:
* <UL>
* <UL>
* <li><b>properties</b></li>
* <li>properties - These properties describe the standard synchronization
* These properties describe the standard synchronization provider properties in
* provider properties in addition to the more general {@code RowSet} properties.
* addition to the more general <code>RowSet</code> properties.
* </li>
* <p>
* <li>metadata - This describes the metadata associated with the tabular structure governed by a
* <li><b>metadata</b></li>
* {@code WebRowSet} object. The metadata described is closely aligned with the
* This describes the metadata associated with the tabular structure governed by a
* metadata accessible in the underlying {@code java.sql.ResultSet} interface.
* <code>WebRowSet</code> object. The metadata described is closely aligned with the
* </li>
* metadata accessible in the underlying <code>java.sql.ResultSet</code> interface.
* <li>data - This describes the original data (the state of data since the
* <p>
* last population
* <li><b>data</b></li>
* or last synchronization of the {@code WebRowSet} object) and the current
* This describes the original data (the state of data since the last population
* or last synchronization of the <code>WebRowSet</code> object) and the current
* data. By keeping track of the delta between the original data and the current data,
* data. By keeping track of the delta between the original data and the current data,
* a <code>WebRowSet</code> maintains
* a {@code WebRowSet} maintains the ability to synchronize changes
* the ability to synchronize changes in its data back to the originating data source.
* in its data back to the originating data source.
* </li>
* </ul>
* </ul>
* <P>
* <P>
* <h3>2.0 WebRowSet States</h3>
* <h3>2.0 WebRowSet States</h3>
* The following sections demonstrates how a
<code>WebRowSet</code>
implementation
* The following sections demonstrates how a
{@code WebRowSet}
implementation
* should use the XML Schema to describe update, insert, and delete operations
* should use the XML Schema to describe update, insert, and delete operations
* and to describe the state of a
<code>WebRowSet</code>
object in XML.
* and to describe the state of a
{@code WebRowSet}
object in XML.
* <p>
* <p>
* <h4>2.1 State 1 - Outputting a
<code>WebRowSet</code> Object to XML</h3
>
* <h4>2.1 State 1 - Outputting a
{@code WebRowSet} Object to XML</h4
>
* In this example, a
<code>WebRowSet</code>
object is created and populated with a simple 2 column,
* In this example, a
{@code WebRowSet}
object is created and populated with a simple 2 column,
* 5 row table from a data source. Having the 5 rows in a
<code>WebRowSet</code>
object
* 5 row table from a data source. Having the 5 rows in a
{@code WebRowSet}
object
* makes it possible to describe them in XML. The
* makes it possible to describe them in XML. The
* metadata describing the various standard JavaBeans properties as defined
* metadata describing the various standard JavaBeans properties as defined
* in the RowSet interface plus the standard properties defined in
* in the RowSet interface plus the standard properties defined in
* the
<code>CachedRowSet</code><sup><font size=-2>TM</font></sup>
interface
* the
{@code CachedRowSet}™
interface
* provide key details that describe WebRowSet
* provide key details that describe WebRowSet
* properties. Outputting the WebRowSet object to XML using the standard
* properties. Outputting the WebRowSet object to XML using the standard
*
<code>writeXml</code>
methods describes the internal properties as follows:
*
{@code writeXml}
methods describes the internal properties as follows:
* <PRE>
* <PRE>
* <<font color=red>properties</font>>
* {@code
* <<font color=red>command</font>>select co1, col2 from test_table<<font color=red>/command</font>>
* <properties>
* <<font color=red>concurrency</font>>1<<font color=red>/concurrency</font>>
* <command>select co1, col2 from test_table</command>
* <<font color=red>datasource/</font>>
* <concurrency>1</concurrency>
* <<font color=red>escape-processing</font>>true<<font color=red>/escape-processing</font>>
* <datasource/>
* <<font color=red>fetch-direction</font>>0<<font color=red>/fetch-direction</font>>
* <escape-processing>true</escape-processing>
* <<font color=red>fetch-size</font>>0<<font color=red>/fetch-size</font>>
* <fetch-direction>0</fetch-direction>
* <<font color=red>isolation-level</font>>1<<font color=red>/isolation-level</font>>
* <fetch-size>0</fetch-size>
* <<font color=red>key-columns/</font>>
* <isolation-level>1</isolation-level>
* <<font color=red>map/</font>>
* <key-columns/>
* <<font color=red>max-field-size</font>>0<<font color=red>/max-field-size</font>>
* <map/>
* <<font color=red>max-rows</font>>0<<font color=red>/max-rows</font>>
* <max-field-size>0</max-field-size>
* <<font color=red>query-timeout</font>>0<<font color=red>/query-timeout</font>>
* <max-rows>0</max-rows>
* <<font color=red>read-only</font>>false<<font color=red>/read-only</font>>
* <query-timeout>0</query-timeout>
* <<font color=red>rowset-type</font>>TRANSACTION_READ_UNCOMMITED<<font color=red>/rowset-type</font>>
* <read-only>false</read-only>
* <<font color=red>show-deleted</font>>false<<font color=red>/show-deleted</font>>
* <rowset-type>TRANSACTION_READ_UNCOMMITED</rowset-type>
* <<font color=red>table-name/</font>>
* <show-deleted>false</show-deleted>
* <<font color=red>url</font>>jdbc:thin:oracle<<font color=red>/url</font>>
* <table-name/>
* <<font color=red>sync-provider</font>>
* <url>jdbc:thin:oracle</url>
* <<font color=red>sync-provider-name</font>>.com.rowset.provider.RIOptimisticProvider<<font color=red>/sync-provider-name</font>>
* <sync-provider>
* <<font color=red>sync-provider-vendor</font>>Oracle Corporation<<font color=red>/sync-provider-vendor</font>>
* <sync-provider-name>.com.rowset.provider.RIOptimisticProvider</sync-provider-name>
* <<font color=red>sync-provider-version</font>>1.0<<font color=red>/sync-provider-name</font>>
* <sync-provider-vendor>Oracle Corporation</sync-provider-vendor>
* <<font color=red>sync-provider-grade</font>>LOW<<font color=red>/sync-provider-grade</font>>
* <sync-provider-version>1.0</sync-provider-name>
* <<font color=red>data-source-lock</font>>NONE<<font color=red>/data-source-lock</font>>
* <sync-provider-grade>LOW</sync-provider-grade>
* <<font color=red>/sync-provider</font>>
* <data-source-lock>NONE</data-source-lock>
* <<font color=red>/properties</font>>
* </sync-provider>
* </PRE>
* </properties>
* } </PRE>
* The meta-data describing the make up of the WebRowSet is described
* The meta-data describing the make up of the WebRowSet is described
* in XML as detailed below. Note both columns are described between the
* in XML as detailed below. Note both columns are described between the
*
<code>column-definition</code>
tags.
*
{@code column-definition}
tags.
* <PRE>
* <PRE>
* <<font color=red>metadata</font>>
* {@code
* <<font color=red>column-count</font>>2<<font color=red>/column-count</font>>
* <metadata>
* <<font color=red>column-definition</font>>
* <column-count>2</column-count>
* <<font color=red>column-index</font>>1<<font color=red>/column-index</font>>
* <column-definition>
* <<font color=red>auto-increment</font>>false<<font color=red>/auto-increment</font>>
* <column-index>1</column-index>
* <<font color=red>case-sensitive</font>>true<<font color=red>/case-sensitive</font>>
* <auto-increment>false</auto-increment>
* <<font color=red>currency</font>>false<<font color=red>/currency</font>>
* <case-sensitive>true</case-sensitive>
* <<font color=red>nullable</font>>1<<font color=red>/nullable</font>>
* <currency>false</currency>
* <<font color=red>signed</font>>false<<font color=red>/signed</font>>
* <nullable>1</nullable>
* <<font color=red>searchable</font>>true<<font color=red>/searchable</font>>
* <signed>false</signed>
* <<font color=red>column-display-size</font>>10<<font color=red>/column-display-size</font>>
* <searchable>true</searchable>
* <<font color=red>column-label</font>>COL1<<font color=red>/column-label</font>>
* <column-display-size>10</column-display-size>
* <<font color=red>column-name</font>>COL1<<font color=red>/column-name</font>>
* <column-label>COL1</column-label>
* <<font color=red>schema-name/</font>>
* <column-name>COL1</column-name>
* <<font color=red>column-precision</font>>10<<font color=red>/column-precision</font>>
* <schema-name/>
* <<font color=red>column-scale</font>>0<<font color=red>/column-scale</font>>
* <column-precision>10</column-precision>
* <<font color=red>table-name/</font>>
* <column-scale>0</column-scale>
* <<font color=red>catalog-name/</font>>
* <table-name/>
* <<font color=red>column-type</font>>1<<font color=red>/column-type</font>>
* <catalog-name/>
* <<font color=red>column-type-name</font>>CHAR<<font color=red>/column-type-name</font>>
* <column-type>1</column-type>
* <<font color=red>/column-definition</font>>
* <column-type-name>CHAR</column-type-name>
* <<font color=red>column-definition</font>>
* </column-definition>
* <<font color=red>column-index</font>>2<<font color=red>/column-index</font>>
* <column-definition>
* <<font color=red>auto-increment</font>>false<<font color=red>/auto-increment</font>>
* <column-index>2</column-index>
* <<font color=red>case-sensitive</font>>false<<font color=red>/case-sensitive</font>>
* <auto-increment>false</auto-increment>
* <<font color=red>currency</font>>false<<font color=red>/currency</font>>
* <case-sensitive>false</case-sensitive>
* <<font color=red>nullable</font>>1<<font color=red>/nullable</font>>
* <currency>false</currency>
* <<font color=red>signed</font>>true<<font color=red>/signed</font>>
* <nullable>1</nullable>
* <<font color=red>searchable</font>>true<<font color=red>/searchable</font>>
* <signed>true</signed>
* <<font color=red>column-display-size</font>>39<<font color=red>/column-display-size</font>>
* <searchable>true</searchable>
* <<font color=red>column-label</font>>COL2<<font color=red>/column-label</font>>
* <column-display-size>39</column-display-size>
* <<font color=red>column-name</font>>COL2<<font color=red>/column-name</font>>
* <column-label>COL2</column-label>
* <<font color=red>schema-name/</font>>
* <column-name>COL2</column-name>
* <<font color=red>column-precision</font>>38<<font color=red>/column-precision</font>>
* <schema-name/>
* <<font color=red>column-scale</font>>0<<font color=red>/column-scale</font>>
* <column-precision>38</column-precision>
* <<font color=red>table-name/</font>>
* <column-scale>0</column-scale>
* <<font color=red>catalog-name/</font>>
* <table-name/>
* <<font color=red>column-type</font>>3<<font color=red>/column-type</font>>
* <catalog-name/>
* <<font color=red>column-type-name</font>>NUMBER<<font color=red>/column-type-name</font>>
* <column-type>3</column-type>
* <<font color=red>/column-definition</font>>
* <column-type-name>NUMBER</column-type-name>
* <<font color=red>/metadata</font>>
* </column-definition>
* </PRE>
* </metadata>
* }</PRE>
* Having detailed how the properties and metadata are described, the following details
* Having detailed how the properties and metadata are described, the following details
* how the contents of a
<code>WebRowSet</code>
object is described in XML. Note, that
* how the contents of a
{@code WebRowSet}
object is described in XML. Note, that
* this describes a
<code>WebRowSet</code>
object that has not undergone any
* this describes a
{@code WebRowSet}
object that has not undergone any
* modifications since its instantiation.
* modifications since its instantiation.
* A
<code>currentRow</code>
tag is mapped to each row of the table structure that the
* A
{@code currentRow}
tag is mapped to each row of the table structure that the
*
<code>WebRowSet</code> object provides. A <code>columnValue</code>
tag may contain
*
{@code WebRowSet} object provides. A {@code columnValue}
tag may contain
* either the
<code>stringData</code> or <code>binaryData</code>
tag, according to
* either the
{@code stringData} or {@code binaryData}
tag, according to
* the SQL type that
* the SQL type that
* the XML value is mapping back to. The
<code>binaryData</code>
tag contains data in the
* the XML value is mapping back to. The
{@code binaryData}
tag contains data in the
* Base64 encoding and is typically used for
<code>BLOB</code> and <code>CLOB</code>
type data.
* Base64 encoding and is typically used for
{@code BLOB} and {@code CLOB}
type data.
* <PRE>
* <PRE>
* <<font color=red>data</font>>
* {@code
* <<font color=red>currentRow</font>>
* <data>
* <<font color=red>columnValue</font>>
* <currentRow>
* <columnValue>
* firstrow
* firstrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 1
* 1
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* secondrow
* secondrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 2
* 2
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* thirdrow
* thirdrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 3
* 3
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* fourthrow
* fourthrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 4
* 4
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>/data</font>>
*
</data>
* </PRE>
*
}
</PRE>
* <h4>2.2 State 2 - Deleting a Row</h4>
* <h4>2.2 State 2 - Deleting a Row</h4>
* Deleting a row in a
<code>WebRowSet</code>
object involves simply moving to the row
* Deleting a row in a
{@code WebRowSet}
object involves simply moving to the row
* to be deleted and then calling the method
<code>deleteRow</code>
, as in any other
* to be deleted and then calling the method
{@code deleteRow}
, as in any other
*
<code>RowSet</code>
object. The following
*
{@code RowSet}
object. The following
* two lines of code, in which <i>wrs</i> is a
<code>WebRowSet</code>
object, delete
* two lines of code, in which <i>wrs</i> is a
{@code WebRowSet}
object, delete
* the third row.
* the third row.
* <PRE>
* <PRE>
* wrs.absolute(3);
* wrs.absolute(3);
* wrs.deleteRow();
* wrs.deleteRow();
* </PRE>
* </PRE>
* The XML description shows the third row is marked as a
<code>deleteRow</code>
,
* The XML description shows the third row is marked as a
{@code deleteRow}
,
* which eliminates the third row in the
<code>WebRowSet</code>
object.
* which eliminates the third row in the
{@code WebRowSet}
object.
* <PRE>
* <PRE>
* <<font color=red>data</font>>
* {@code
* <<font color=red>currentRow</font>>
* <data>
* <<font color=red>columnValue</font>>
* <currentRow>
* <columnValue>
* firstrow
* firstrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 1
* 1
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* secondrow
* secondrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 2
* 2
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>deleteRow</font>>
*
<deleteRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* thirdrow
* thirdrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 3
* 3
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/deleteRow</font>>
*
</deleteRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* fourthrow
* fourthrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 4
* 4
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>/data</font>>
*
</data>
* </PRE>
*
}
</PRE>
* <h4>2.3 State 3 - Inserting a Row</h4>
* <h4>2.3 State 3 - Inserting a Row</h4>
* A
<code>WebRowSet</code>
object can insert a new row by moving to the insert row,
* A
{@code WebRowSet}
object can insert a new row by moving to the insert row,
* calling the appropriate updater methods for each column in the row, and then
* calling the appropriate updater methods for each column in the row, and then
* calling the method
<code>insertRow</code>
.
* calling the method
{@code insertRow}
.
* <PRE>
* <PRE>
* {@code
* wrs.moveToInsertRow();
* wrs.moveToInsertRow();
* wrs.updateString(1, "fifththrow");
* wrs.updateString(1, "fifththrow");
* wrs.updateString(2, "5");
* wrs.updateString(2, "5");
* wrs.insertRow();
* wrs.insertRow();
* </PRE>
*
}
</PRE>
* The following code fragment changes the second column value in the row just inserted.
* The following code fragment changes the second column value in the row just inserted.
* Note that this code applies when new rows are inserted right after the current row,
* Note that this code applies when new rows are inserted right after the current row,
* which is why the method
<code>next</code>
moves the cursor to the correct row.
* which is why the method
{@code next}
moves the cursor to the correct row.
* Calling the method
<code>acceptChanges</code>
writes the change to the data source.
* Calling the method
{@code acceptChanges}
writes the change to the data source.
*
*
* <PRE>
* <PRE>
* wrs.moveToCurrentRow();
*
{@code
wrs.moveToCurrentRow();
* wrs.next();
* wrs.next();
* wrs.updateString(2, "V");
* wrs.updateString(2, "V");
* wrs.acceptChanges();
* wrs.acceptChanges();
* :
* }</PRE>
* </PRE>
* Describing this in XML demonstrates where the Java code inserts a new row and then
* Describing this in XML demonstrates where the Java code inserts a new row and then
* performs an update on the newly inserted row on an individual field.
* performs an update on the newly inserted row on an individual field.
* <PRE>
* <PRE>
* <<font color=red>data</font>>
* {@code
* <<font color=red>currentRow</font>>
* <data>
* <<font color=red>columnValue</font>>
* <currentRow>
* <columnValue>
* firstrow
* firstrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 1
* 1
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* secondrow
* secondrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 2
* 2
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* newthirdrow
* newthirdrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* III
* III
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>insertRow</font>>
*
<insertRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* fifthrow
* fifthrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 5
* 5
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>updateValue</font>>
*
<updateValue>
* V
* V
*
<<font color=red>/updateValue</font>>
*
</updateValue>
*
<<font color=red>/insertRow</font>>
*
</insertRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* fourthrow
* fourthrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 4
* 4
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>/date</font>>
*
</date>
* </PRE>
*
}
</PRE>
* <h4>2.4 State 4 - Modifying a Row</h4>
* <h4>2.4 State 4 - Modifying a Row</h4>
* Modifying a row produces specific XML that records both the new value and the
* Modifying a row produces specific XML that records both the new value and the
* value that was replaced. The value that was replaced becomes the original value,
* value that was replaced. The value that was replaced becomes the original value,
...
@@ -340,63 +344,65 @@ import org.xml.sax.*;
...
@@ -340,63 +344,65 @@ import org.xml.sax.*;
* code moves the cursor to a specific row, performs some modifications, and updates
* code moves the cursor to a specific row, performs some modifications, and updates
* the row when complete.
* the row when complete.
* <PRE>
* <PRE>
*{@code
* wrs.absolute(5);
* wrs.absolute(5);
* wrs.updateString(1, "new4thRow");
* wrs.updateString(1, "new4thRow");
* wrs.updateString(2, "IV");
* wrs.updateString(2, "IV");
* wrs.updateRow();
* wrs.updateRow();
* </PRE>
*
}
</PRE>
* In XML, this is described by the
<code>modifyRow</code>
tag. Both the original and new
* In XML, this is described by the
{@code modifyRow}
tag. Both the original and new
* values are contained within the tag for original row tracking purposes.
* values are contained within the tag for original row tracking purposes.
* <PRE>
* <PRE>
* <<font color=red>data</font>>
* {@code
* <<font color=red>currentRow</font>>
* <data>
* <<font color=red>columnValue</font>>
* <currentRow>
* <columnValue>
* firstrow
* firstrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 1
* 1
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* secondrow
* secondrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 2
* 2
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* newthirdrow
* newthirdrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* III
* III
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>currentRow</font>>
*
<currentRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* fifthrow
* fifthrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 5
* 5
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>/currentRow</font>>
*
</currentRow>
*
<<font color=red>modifyRow</font>>
*
<modifyRow>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* fourthrow
* fourthrow
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>updateValue</font>>
*
<updateValue>
* new4thRow
* new4thRow
*
<<font color=red>/updateValue</font>>
*
</updateValue>
*
<<font color=red>columnValue</font>>
*
<columnValue>
* 4
* 4
*
<<font color=red>/columnValue</font>>
*
</columnValue>
*
<<font color=red>updateValue</font>>
*
<updateValue>
* IV
* IV
*
<<font color=red>/updateValue</font>>
*
</updateValue>
*
<<font color=red>/modifyRow</font>>
*
</modifyRow>
*
<<font color=red>/data</font>>
*
</data>
* </PRE>
*
}
</PRE>
*
*
* @see javax.sql.rowset.JdbcRowSet
* @see javax.sql.rowset.JdbcRowSet
* @see javax.sql.rowset.CachedRowSet
* @see javax.sql.rowset.CachedRowSet
...
@@ -407,78 +413,78 @@ import org.xml.sax.*;
...
@@ -407,78 +413,78 @@ import org.xml.sax.*;
public
interface
WebRowSet
extends
CachedRowSet
{
public
interface
WebRowSet
extends
CachedRowSet
{
/**
/**
* Reads a
<code>WebRowSet</code>
object in its XML format from the given
* Reads a
{@code WebRowSet}
object in its XML format from the given
*
<code>Reader</code>
object.
*
{@code Reader}
object.
*
*
* @param reader the
<code>java.io.Reader</code>
stream from which this
* @param reader the
{@code java.io.Reader}
stream from which this
*
<code>WebRowSet</code>
object will be populated
*
{@code WebRowSet}
object will be populated
* @throws SQLException if a database access error occurs
* @throws SQLException if a database access error occurs
*/
*/
public
void
readXml
(
java
.
io
.
Reader
reader
)
throws
SQLException
;
public
void
readXml
(
java
.
io
.
Reader
reader
)
throws
SQLException
;
/**
/**
* Reads a stream based XML input to populate this
<code>WebRowSet</code>
* Reads a stream based XML input to populate this
{@code WebRowSet}
* object.
* object.
*
*
* @param iStream the
<code>java.io.InputStream</code>
from which this
* @param iStream the
{@code java.io.InputStream}
from which this
*
<code>WebRowSet</code>
object will be populated
*
{@code WebRowSet}
object will be populated
* @throws SQLException if a data source access error occurs
* @throws SQLException if a data source access error occurs
* @throws IOException if an IO exception occurs
* @throws IOException if an IO exception occurs
*/
*/
public
void
readXml
(
java
.
io
.
InputStream
iStream
)
throws
SQLException
,
IOException
;
public
void
readXml
(
java
.
io
.
InputStream
iStream
)
throws
SQLException
,
IOException
;
/**
/**
* Populates this
<code>WebRowSet</code>
object with
* Populates this
{@code WebRowSet}
object with
* the contents of the given
<code>ResultSet</code>
object and writes its
* the contents of the given
{@code ResultSet}
object and writes its
* data, properties, and metadata
* data, properties, and metadata
* to the given
<code>Writer</code>
object in XML format.
* to the given
{@code Writer}
object in XML format.
* <p>
* <p>
* NOTE: The
<code>WebRowSet</code>
cursor may be moved to write out the
* NOTE: The
{@code WebRowSet}
cursor may be moved to write out the
* contents to the XML data source. If implemented in this way, the cursor <b>must</b>
* contents to the XML data source. If implemented in this way, the cursor <b>must</b>
* be returned to its position just prior to the
<code>writeXml()</code>
call.
* be returned to its position just prior to the
{@code writeXml()}
call.
*
*
* @param rs the
<code>ResultSet</code>
object with which to populate this
* @param rs the
{@code ResultSet}
object with which to populate this
*
<code>WebRowSet</code>
object
*
{@code WebRowSet}
object
* @param writer the
<code>java.io.Writer</code>
object to write to.
* @param writer the
{@code java.io.Writer}
object to write to.
* @throws SQLException if an error occurs writing out the rowset
* @throws SQLException if an error occurs writing out the rowset
* contents in XML format
* contents in XML format
*/
*/
public
void
writeXml
(
ResultSet
rs
,
java
.
io
.
Writer
writer
)
throws
SQLException
;
public
void
writeXml
(
ResultSet
rs
,
java
.
io
.
Writer
writer
)
throws
SQLException
;
/**
/**
* Populates this
<code>WebRowSet</code>
object with
* Populates this
{@code WebRowSet}
object with
* the contents of the given
<code>ResultSet</code>
object and writes its
* the contents of the given
{@code ResultSet}
object and writes its
* data, properties, and metadata
* data, properties, and metadata
* to the given
<code>OutputStream</code>
object in XML format.
* to the given
{@code OutputStream}
object in XML format.
* <p>
* <p>
* NOTE: The
<code>WebRowSet</code>
cursor may be moved to write out the
* NOTE: The
{@code WebRowSet}
cursor may be moved to write out the
* contents to the XML data source. If implemented in this way, the cursor <b>must</b>
* contents to the XML data source. If implemented in this way, the cursor <b>must</b>
* be returned to its position just prior to the
<code>writeXml()</code>
call.
* be returned to its position just prior to the
{@code writeXml()}
call.
*
*
* @param rs the
<code>ResultSet</code>
object with which to populate this
* @param rs the
{@code ResultSet}
object with which to populate this
*
<code>WebRowSet</code>
object
*
{@code WebRowSet}
object
* @param oStream the
<code>java.io.OutputStream</code>
to write to
* @param oStream the
{@code java.io.OutputStream}
to write to
* @throws SQLException if a data source access error occurs
* @throws SQLException if a data source access error occurs
* @throws IOException if a IO exception occurs
* @throws IOException if a IO exception occurs
*/
*/
public
void
writeXml
(
ResultSet
rs
,
java
.
io
.
OutputStream
oStream
)
throws
SQLException
,
IOException
;
public
void
writeXml
(
ResultSet
rs
,
java
.
io
.
OutputStream
oStream
)
throws
SQLException
,
IOException
;
/**
/**
* Writes the data, properties, and metadata for this
<code>WebRowSet</code>
object
* Writes the data, properties, and metadata for this
{@code WebRowSet}
object
* to the given
<code>Writer</code>
object in XML format.
* to the given
{@code Writer}
object in XML format.
*
*
* @param writer the
<code>java.io.Writer</code>
stream to write to
* @param writer the
{@code java.io.Writer}
stream to write to
* @throws SQLException if an error occurs writing out the rowset
* @throws SQLException if an error occurs writing out the rowset
* contents to XML
* contents to XML
*/
*/
public
void
writeXml
(
java
.
io
.
Writer
writer
)
throws
SQLException
;
public
void
writeXml
(
java
.
io
.
Writer
writer
)
throws
SQLException
;
/**
/**
* Writes the data, properties, and metadata for this
<code>WebRowSet</code>
object
* Writes the data, properties, and metadata for this
{@code WebRowSet}
object
* to the given
<code>OutputStream</code>
object in XML format.
* to the given
{@code OutputStream}
object in XML format.
*
*
* @param oStream the
<code>java.io.OutputStream</code>
stream to write to
* @param oStream the
{@code java.io.OutputStream}
stream to write to
* @throws SQLException if a data source access error occurs
* @throws SQLException if a data source access error occurs
* @throws IOException if a IO exception occurs
* @throws IOException if a IO exception occurs
*/
*/
...
@@ -486,14 +492,14 @@ public interface WebRowSet extends CachedRowSet {
...
@@ -486,14 +492,14 @@ public interface WebRowSet extends CachedRowSet {
/**
/**
* The public identifier for the XML Schema definition that defines the XML
* The public identifier for the XML Schema definition that defines the XML
* tags and their valid values for a
<code>WebRowSet</code>
implementation.
* tags and their valid values for a
{@code WebRowSet}
implementation.
*/
*/
public
static
String
PUBLIC_XML_SCHEMA
=
public
static
String
PUBLIC_XML_SCHEMA
=
"--//Oracle Corporation//XSD Schema//EN"
;
"--//Oracle Corporation//XSD Schema//EN"
;
/**
/**
* The URL for the XML Schema definition file that defines the XML tags and
* The URL for the XML Schema definition file that defines the XML tags and
* their valid values for a
<code>WebRowSet</code>
implementation.
* their valid values for a
{@code WebRowSet}
implementation.
*/
*/
public
static
String
SCHEMA_SYSTEM_ID
=
"http://java.sun.com/xml/ns/jdbc/webrowset.xsd"
;
public
static
String
SCHEMA_SYSTEM_ID
=
"http://java.sun.com/xml/ns/jdbc/webrowset.xsd"
;
}
}
src/share/classes/javax/sql/rowset/package.html
浏览文件 @
7dec4f80
...
@@ -67,7 +67,7 @@ interfaces.
...
@@ -67,7 +67,7 @@ interfaces.
<ul>
<ul>
<li><a
href=
"JdbcRowSet.html"
><b><code>
JdbcRowSet
</code></b></a>
- A wrapper around
<li><a
href=
"JdbcRowSet.html"
><b><code>
JdbcRowSet
</code></b></a>
- A wrapper around
a
<tt>
ResultSet
</tt>
object that makes it possible to use the result set as a
a
<tt>
ResultSet
</tt>
object that makes it possible to use the result set as a
JavaBeans
<sup><font
size=
-2
>
TM
</font></sup>
component. Thus,
JavaBeans
™
component. Thus,
a
<tt>
JdbcRowSet
</tt>
object can be a Bean that any tool
a
<tt>
JdbcRowSet
</tt>
object can be a Bean that any tool
makes available for assembling an application as part of a component based
makes available for assembling an application as part of a component based
architecture . A
<tt>
JdbcRowSet
</tt>
object is a connected
<code>
RowSet
</code>
architecture . A
<tt>
JdbcRowSet
</tt>
object is a connected
<code>
RowSet
</code>
...
@@ -79,7 +79,7 @@ data structure as defined in the JDBC 3.0 specification.
...
@@ -79,7 +79,7 @@ data structure as defined in the JDBC 3.0 specification.
<p>
<p>
<li><a
href=
"CachedRowSet.html"
>
<li><a
href=
"CachedRowSet.html"
>
<b><code>
CachedRowSet
</code>
™
</b></a>
<b><code>
CachedRowSet
</code>
™
</b></a>
- A
<tt>
CachedRowSet
</tt>
object is a JavaBeans
<sup><font
size=
-2
>
TM
</font></sup>
- A
<tt>
CachedRowSet
</tt>
object is a JavaBeans
™
component that is scrollable, updatable, serializable, and generally disconnected from
component that is scrollable, updatable, serializable, and generally disconnected from
the source of its data. A
<tt>
CachedRowSet
</tt>
object
the source of its data. A
<tt>
CachedRowSet
</tt>
object
typically contains rows from a result set, but it can also contain rows from any
typically contains rows from a result set, but it can also contain rows from any
...
...
src/share/classes/javax/sql/rowset/serial/SerialArray.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -50,7 +50,7 @@ import java.util.Arrays;
...
@@ -50,7 +50,7 @@ import java.util.Arrays;
* if necessary. At this time, logical pointers to the data in the data source,
* if necessary. At this time, logical pointers to the data in the data source,
* such as locators, are not currently supported.
* such as locators, are not currently supported.
*
*
* <h
4> Thread safety </h4
>
* <h
3> Thread safety </h3
>
*
*
* A SerialArray is not safe for use by multiple concurrent threads. If a
* A SerialArray is not safe for use by multiple concurrent threads. If a
* SerialArray is to be used by more than one thread then access to the
* SerialArray is to be used by more than one thread then access to the
...
...
src/share/classes/javax/sql/rowset/serial/SerialBlob.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -51,7 +51,7 @@ import java.util.Arrays;
...
@@ -51,7 +51,7 @@ import java.util.Arrays;
* <code>Blob</code> object within a <code>SerialBlob</code> object
* <code>Blob</code> object within a <code>SerialBlob</code> object
* and to update or truncate a <code>Blob</code> object.
* and to update or truncate a <code>Blob</code> object.
*
*
* <h
4> Thread safety </h4
>
* <h
3> Thread safety </h3
>
*
*
* <p> A SerialBlob is not safe for use by multiple concurrent threads. If a
* <p> A SerialBlob is not safe for use by multiple concurrent threads. If a
* SerialBlob is to be used by more than one thread then access to the SerialBlob
* SerialBlob is to be used by more than one thread then access to the SerialBlob
...
...
src/share/classes/javax/sql/rowset/serial/SerialClob.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -44,7 +44,7 @@ import java.util.Arrays;
...
@@ -44,7 +44,7 @@ import java.util.Arrays;
* from a <code>SerialClob</code> object or to locate the start of
* from a <code>SerialClob</code> object or to locate the start of
* a pattern of characters.
* a pattern of characters.
*
*
* <h
4> Thread safety </h4
>
* <h
3> Thread safety </h3
>
*
*
* <p> A SerialClob is not safe for use by multiple concurrent threads. If a
* <p> A SerialClob is not safe for use by multiple concurrent threads. If a
* SerialClob is to be used by more than one thread then access to the SerialClob
* SerialClob is to be used by more than one thread then access to the SerialClob
...
...
src/share/classes/javax/sql/rowset/serial/SerialDatalink.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -43,7 +43,7 @@ import java.net.URL;
...
@@ -43,7 +43,7 @@ import java.net.URL;
* java.net.URL url = rowset.getURL(1);
* java.net.URL url = rowset.getURL(1);
* </pre>
* </pre>
*
*
* <h
4> Thread safety </h4
>
* <h
3> Thread safety </h3
>
*
*
* A SerialDatalink is not safe for use by multiple concurrent threads. If a
* A SerialDatalink is not safe for use by multiple concurrent threads. If a
* SerialDatalink is to be used by more than one thread then access to the
* SerialDatalink is to be used by more than one thread then access to the
...
@@ -77,6 +77,7 @@ public class SerialDatalink implements Serializable, Cloneable {
...
@@ -77,6 +77,7 @@ public class SerialDatalink implements Serializable, Cloneable {
* Constructs a new <code>SerialDatalink</code> object from the given
* Constructs a new <code>SerialDatalink</code> object from the given
* <code>java.net.URL</code> object.
* <code>java.net.URL</code> object.
* <P>
* <P>
* @param url the {@code URL} to create the {@code SerialDataLink} from
* @throws SerialException if url parameter is a null
* @throws SerialException if url parameter is a null
*/
*/
public
SerialDatalink
(
URL
url
)
throws
SerialException
{
public
SerialDatalink
(
URL
url
)
throws
SerialException
{
...
...
src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java
浏览文件 @
7dec4f80
...
@@ -47,7 +47,7 @@ import sun.reflect.misc.ReflectUtil;
...
@@ -47,7 +47,7 @@ import sun.reflect.misc.ReflectUtil;
* Static or transient fields cannot be serialized; an attempt to serialize
* Static or transient fields cannot be serialized; an attempt to serialize
* them will result in a <code>SerialException</code> object being thrown.
* them will result in a <code>SerialException</code> object being thrown.
*
*
* <h
4> Thread safety </h4
>
* <h
3> Thread safety </h3
>
*
*
* A SerialJavaObject is not safe for use by multiple concurrent threads. If a
* A SerialJavaObject is not safe for use by multiple concurrent threads. If a
* SerialJavaObject is to be used by more than one thread then access to the
* SerialJavaObject is to be used by more than one thread then access to the
...
...
src/share/classes/javax/sql/rowset/serial/SerialRef.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -37,7 +37,7 @@ import java.util.*;
...
@@ -37,7 +37,7 @@ import java.util.*;
* creating a <code>SerialRef</code> instance from a <code>Ref</code>
* creating a <code>SerialRef</code> instance from a <code>Ref</code>
* object and provides methods for getting and setting the <code>Ref</code> object.
* object and provides methods for getting and setting the <code>Ref</code> object.
*
*
* <h
4> Thread safety </h4
>
* <h
3> Thread safety </h3
>
*
*
* A SerialRef is not safe for use by multiple concurrent threads. If a
* A SerialRef is not safe for use by multiple concurrent threads. If a
* SerialRef is to be used by more than one thread then access to the SerialRef
* SerialRef is to be used by more than one thread then access to the SerialRef
...
...
src/share/classes/javax/sql/rowset/serial/SerialStruct.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -51,7 +51,7 @@ import javax.sql.rowset.*;
...
@@ -51,7 +51,7 @@ import javax.sql.rowset.*;
* the SQL type name of the SQL structured type in the database, and methods
* the SQL type name of the SQL structured type in the database, and methods
* for retrieving its attribute values.
* for retrieving its attribute values.
*
*
* <h
4> Thread safety </h4
>
* <h
3> Thread safety </h3
>
*
*
* A SerialStruct is not safe for use by multiple concurrent threads. If a
* A SerialStruct is not safe for use by multiple concurrent threads. If a
* SerialStruct is to be used by more than one thread then access to the
* SerialStruct is to be used by more than one thread then access to the
...
...
src/share/classes/javax/sql/rowset/spi/SyncFactory.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -260,13 +260,14 @@ public class SyncFactory {
...
@@ -260,13 +260,14 @@ public class SyncFactory {
* <p>
* <p>
* Synchronization providers bound to a JNDI context can be
* Synchronization providers bound to a JNDI context can be
* registered by binding a SyncProvider instance to a JNDI namespace.
* registered by binding a SyncProvider instance to a JNDI namespace.
*
<ul>
*
* <pre>
* <pre>
* {@code
* SyncProvider p = new MySyncProvider();
* SyncProvider p = new MySyncProvider();
* InitialContext ic = new InitialContext();
* InitialContext ic = new InitialContext();
* ic.bind ("jdbc/rowset/MySyncProvider", p);
* ic.bind ("jdbc/rowset/MySyncProvider", p);
* </pre>
*
}
</pre>
*
</ul>
*
* Furthermore, an initial JNDI context should be set with the
* Furthermore, an initial JNDI context should be set with the
* <code>SyncFactory</code> using the <code>setJNDIContext</code> method.
* <code>SyncFactory</code> using the <code>setJNDIContext</code> method.
* The <code>SyncFactory</code> leverages this context to search for
* The <code>SyncFactory</code> leverages this context to search for
...
@@ -564,6 +565,8 @@ public class SyncFactory {
...
@@ -564,6 +565,8 @@ public class SyncFactory {
*
*
* @return Enumeration A enumeration of available synchronization
* @return Enumeration A enumeration of available synchronization
* providers that are registered with this Factory
* providers that are registered with this Factory
* @throws SyncFactoryException If an error occurs obtaining the registered
* providers
*/
*/
public
static
Enumeration
<
SyncProvider
>
getRegisteredProviders
()
public
static
Enumeration
<
SyncProvider
>
getRegisteredProviders
()
throws
SyncFactoryException
{
throws
SyncFactoryException
{
...
@@ -648,7 +651,8 @@ public class SyncFactory {
...
@@ -648,7 +651,8 @@ public class SyncFactory {
/**
/**
* Returns the logging object for applications to retrieve
* Returns the logging object for applications to retrieve
* synchronization events posted by SyncProvider implementations.
* synchronization events posted by SyncProvider implementations.
*
* @return The {@code Logger} that has been specified for use by
* {@code SyncProvider} implementations
* @throws SyncFactoryException if no logging object has been set.
* @throws SyncFactoryException if no logging object has been set.
*/
*/
public
static
Logger
getLogger
()
throws
SyncFactoryException
{
public
static
Logger
getLogger
()
throws
SyncFactoryException
{
...
...
src/share/classes/javax/sql/rowset/spi/SyncResolver.java
浏览文件 @
7dec4f80
/*
/*
* Copyright (c) 2003, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -81,10 +81,13 @@ import java.sql.SQLException;
...
@@ -81,10 +81,13 @@ import java.sql.SQLException;
* <code>SyncProviderException</code> method <code>getSyncResolver</code> to get
* <code>SyncProviderException</code> method <code>getSyncResolver</code> to get
* the <code>SyncResolver</code> object <i>resolver</i>.
* the <code>SyncResolver</code> object <i>resolver</i>.
* <PRE>
* <PRE>
* {@code
* } catch (SyncProviderException spe) {
* } catch (SyncProviderException spe) {
* SyncResolver resolver = spe.getSyncResolver();
* SyncResolver resolver = spe.getSyncResolver();
* ...
* ...
* }
* }
*
* }
* </PRE>
* </PRE>
* <P>
* <P>
* With <i>resolver</i> in hand, an application can use it to get the information
* With <i>resolver</i> in hand, an application can use it to get the information
...
@@ -97,7 +100,7 @@ import java.sql.SQLException;
...
@@ -97,7 +100,7 @@ import java.sql.SQLException;
* The following kinds of information can be obtained from a <code>SyncResolver</code>
* The following kinds of information can be obtained from a <code>SyncResolver</code>
* object:
* object:
* <P>
* <P>
* <
LI>What operation was being attempted when a conflict occurred<BR
>
* <
h3>What operation was being attempted when a conflict occurred</h3
>
* The <code>SyncProvider</code> interface defines four constants
* The <code>SyncProvider</code> interface defines four constants
* describing states that may occur. Three
* describing states that may occur. Three
* constants describe the type of operation (update, delete, or insert) that a
* constants describe the type of operation (update, delete, or insert) that a
...
@@ -106,10 +109,10 @@ import java.sql.SQLException;
...
@@ -106,10 +109,10 @@ import java.sql.SQLException;
* These constants are the possible return values when a <code>SyncResolver</code> object
* These constants are the possible return values when a <code>SyncResolver</code> object
* calls the method <code>getStatus</code>.
* calls the method <code>getStatus</code>.
* <PRE>
* <PRE>
*
int operation = resolver.getStatus();
*
{@code int operation = resolver.getStatus(); }
* </PRE>
* </PRE>
* <P>
* <P>
* <
LI>The value in the data source that caused a conflict<BR
>
* <
h3>The value in the data source that caused a conflict</h3
>
* A conflict exists when a value that a <code>RowSet</code> object has changed
* A conflict exists when a value that a <code>RowSet</code> object has changed
* and is attempting to write to the data source
* and is attempting to write to the data source
* has also been changed in the data source since the last synchronization. An
* has also been changed in the data source since the last synchronization. An
...
@@ -122,7 +125,6 @@ import java.sql.SQLException;
...
@@ -122,7 +125,6 @@ import java.sql.SQLException;
* </PRE>
* </PRE>
* Note that the column in <i>resolver</i> can be designated by the column number,
* Note that the column in <i>resolver</i> can be designated by the column number,
* as is done in the preceding line of code, or by the column name.
* as is done in the preceding line of code, or by the column name.
* </UL>
* <P>
* <P>
* With the information retrieved from the methods <code>getStatus</code> and
* With the information retrieved from the methods <code>getStatus</code> and
* <code>getConflictValue</code>, the application may make a determination as to
* <code>getConflictValue</code>, the application may make a determination as to
...
@@ -193,7 +195,8 @@ import java.sql.SQLException;
...
@@ -193,7 +195,8 @@ import java.sql.SQLException;
* code fragment, the value in <i>crs</i> is the one set as the resolved value, which means
* code fragment, the value in <i>crs</i> is the one set as the resolved value, which means
* that it will be used to overwrite the conflict value in the data source.
* that it will be used to overwrite the conflict value in the data source.
*
*
* <PRE>{@code
* <PRE>
* {@code
* try {
* try {
*
*
* crs.acceptChanges(con);
* crs.acceptChanges(con);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录