Update sql to Harmony 802921.
Notable changes
- ConnectionEvent field changed for serialization
- Date toString classes no longer use SimpleDateFormat
- Timestamp doesn't call through an overridable method in its constructor
- Timestamp now checks the String passed to valueOf() using a regex
- Properties now specifies a buffer size to avoid a user-inescapable warning
Squashed commit of the following:
commit dd9926cddda4db0227adbc174070791e5a9afa72
Merge: 8be3b27 4bed1fc
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 10:34:56 2009 -0700
Merge branch 'sql_802921' into sql_dalvik
Conflicts:
libcore/sql/.classpath
libcore/sql/META-INF/MANIFEST.MF
libcore/sql/build.xml
libcore/sql/src/main/java/java/sql/Array.java
libcore/sql/src/main/java/java/sql/BatchUpdateException.java
libcore/sql/src/main/java/java/sql/Blob.java
libcore/sql/src/main/java/java/sql/CallableStatement.java
libcore/sql/src/main/java/java/sql/Clob.java
libcore/sql/src/main/java/java/sql/Connection.java
libcore/sql/src/main/java/java/sql/DataTruncation.java
libcore/sql/src/main/java/java/sql/DatabaseMetaData.java
libcore/sql/src/main/java/java/sql/Date.java
libcore/sql/src/main/java/java/sql/Driver.java
libcore/sql/src/main/java/java/sql/DriverManager.java
libcore/sql/src/main/java/java/sql/DriverPropertyInfo.java
libcore/sql/src/main/java/java/sql/ParameterMetaData.java
libcore/sql/src/main/java/java/sql/PreparedStatement.java
libcore/sql/src/main/java/java/sql/Ref.java
libcore/sql/src/main/java/java/sql/ResultSet.java
libcore/sql/src/main/java/java/sql/ResultSetMetaData.java
libcore/sql/src/main/java/java/sql/SQLData.java
libcore/sql/src/main/java/java/sql/SQLException.java
libcore/sql/src/main/java/java/sql/SQLInput.java
libcore/sql/src/main/java/java/sql/SQLOutput.java
libcore/sql/src/main/java/java/sql/SQLPermission.java
libcore/sql/src/main/java/java/sql/SQLWarning.java
libcore/sql/src/main/java/java/sql/Savepoint.java
libcore/sql/src/main/java/java/sql/Statement.java
libcore/sql/src/main/java/java/sql/Struct.java
libcore/sql/src/main/java/java/sql/Time.java
libcore/sql/src/main/java/java/sql/Timestamp.java
libcore/sql/src/main/java/java/sql/Types.java
libcore/sql/src/main/java/javax/sql/ConnectionEvent.java
libcore/sql/src/main/java/javax/sql/ConnectionEventListener.java
libcore/sql/src/main/java/javax/sql/ConnectionPoolDataSource.java
libcore/sql/src/main/java/javax/sql/DataSource.java
libcore/sql/src/main/java/javax/sql/PooledConnection.java
libcore/sql/src/main/java/javax/sql/RowSet.java
libcore/sql/src/main/java/javax/sql/RowSetEvent.java
libcore/sql/src/main/java/javax/sql/RowSetInternal.java
libcore/sql/src/main/java/javax/sql/RowSetListener.java
libcore/sql/src/main/java/javax/sql/RowSetMetaData.java
libcore/sql/src/main/java/javax/sql/RowSetReader.java
libcore/sql/src/main/java/javax/sql/RowSetWriter.java
libcore/sql/src/main/java/javax/sql/rowset/BaseRowSet.java
libcore/sql/src/main/java/javax/sql/rowset/WebRowSet.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialClob.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialDatalink.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialException.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialJavaObject.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialRef.java
libcore/sql/src/main/java/javax/sql/rowset/serial/SerialStruct.java
libcore/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java
libcore/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java
libcore/sql/src/main/java/javax/transaction/xa/XAException.java
libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DataTruncationTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DateTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverManagerTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverPropertyInfoTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ParameterMetaDataTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ResultSetMetaDataTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ResultSetTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLPermissionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLWarningTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/StatementTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_ClassLoader.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_DriverManager.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimeTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimestampTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TypesTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/ConnectionEventTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/BaseRowSetTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialClobTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialJavaObjectTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialRefTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialStructTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/InvalidTransactionExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/TransactionRequiredExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/TransactionRolledbackExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/xa/XAExceptionTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/xa/XAResourceTest.java
libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/xa/XidTest.java
commit 8be3b27082122a5c5b650ad5aad6a70b45fd58d4
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 09:39:01 2009 -0700
Dalvik SQL
commit 4bed1fc3972b50198299137dc152d46dd9d5d532
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 09:38:11 2009 -0700
SQL 802921
commit 82f57ed5049955585aecfae659310b6bde3354d8
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Aug 12 09:36:42 2009 -0700
SQL 527399
diff --git a/libcore/luni/src/main/java/java/util/Properties.java b/libcore/luni/src/main/java/java/util/Properties.java
index 79d7069..b0f3b9d 100644
--- a/libcore/luni/src/main/java/java/util/Properties.java
+++ b/libcore/luni/src/main/java/java/util/Properties.java
@@ -293,7 +293,10 @@
char nextChar, buf[] = new char[40];
int offset = 0, keyLength = -1, intVal;
boolean firstChar = true;
- BufferedInputStream bis = new BufferedInputStream(in);
+
+ // BEGIN android-changed
+ BufferedInputStream bis = new BufferedInputStream(in, 8192);
+ // END android-changed
while (true) {
intVal = bis.read();
diff --git a/libcore/sql/src/main/java/java/sql/Array.java b/libcore/sql/src/main/java/java/sql/Array.java
index 6113c46..fc9debe 100644
--- a/libcore/sql/src/main/java/java/sql/Array.java
+++ b/libcore/sql/src/main/java/java/sql/Array.java
@@ -21,8 +21,6 @@
/**
* A Java representation of the SQL {@code ARRAY} type.
- *
- * @since Android 1.0
*/
public interface Array {
@@ -33,7 +31,6 @@
* @return A Java array containing the elements of this Array
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Object getArray() throws SQLException;
@@ -50,7 +47,6 @@
* @return A Java array containing the desired set of elements from this Array
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Object getArray(long index, int count) throws SQLException;
@@ -70,7 +66,6 @@
* @return A Java array containing the desired set of elements from this Array
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Object getArray(long index, int count, Map<String, Class<?>> map)
throws SQLException;
@@ -84,7 +79,6 @@
* @return A Java array containing the elements of this array
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Object getArray(Map<String, Class<?>> map) throws SQLException;
@@ -95,7 +89,6 @@
* @return An integer constant from the {@code java.sql.Types} class
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int getBaseType() throws SQLException;
@@ -106,7 +99,6 @@
* @return The database specific name or a fully-qualified SQL type name.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getBaseTypeName() throws SQLException;
@@ -117,7 +109,6 @@
* @return the elements of the array as a {@code ResultSet}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getResultSet() throws SQLException;
@@ -134,7 +125,6 @@
* @return the elements of the array as a {@code ResultSet}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getResultSet(long index, int count) throws SQLException;
@@ -155,7 +145,6 @@
* database error has occurred.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getResultSet(long index, int count,
Map<String, Class<?>> map) throws SQLException;
@@ -170,7 +159,6 @@
* @return the array as a {@code ResultSet}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getResultSet(Map<String, Class<?>> map)
throws SQLException;
diff --git a/libcore/sql/src/main/java/java/sql/BatchUpdateException.java b/libcore/sql/src/main/java/java/sql/BatchUpdateException.java
index 36a7ef9..0a616db 100644
--- a/libcore/sql/src/main/java/java/sql/BatchUpdateException.java
+++ b/libcore/sql/src/main/java/java/sql/BatchUpdateException.java
@@ -26,7 +26,7 @@
* problem that occurred, compared with a standard {@code SQLException}. It
* supplies update counts for successful commands which were executed before the
* exception was encountered.
- * </p>
+ * <p>
* The element order in the array of update counts matches the order that the
* commands were added to the batch operation.
* <p>
@@ -37,9 +37,6 @@
* for every command in the batch, not only those that executed successfully. In
* this case, the array element for any command which encountered a problem is
* set to {@code Statement.EXECUTE_FAILED}.
- * </p>
- *
- * @since Android 1.0
*/
public class BatchUpdateException extends SQLException implements Serializable {
@@ -51,8 +48,6 @@
* Creates a default {@code BatchUpdateException} with the parameters
* <i>reason</i>, <i>SQLState</i>, and <i>update counts</i> set to {@code
* null} and the <i>vendor code</i> set to 0.
- *
- * @since Android 1.0
*/
public BatchUpdateException() {
super();
@@ -67,7 +62,6 @@
* the array of {@code updateCounts} giving the number of
* successful updates (or another status code) for each command
* in the batch that was attempted.
- * @since Android 1.0
*/
public BatchUpdateException(int[] updateCounts) {
super();
@@ -86,7 +80,6 @@
* the array of {@code updateCounts} giving the number of
* successful updates (or another status code) for each command
* in the batch that was attempted.
- * @since Android 1.0
*/
public BatchUpdateException(String reason, int[] updateCounts) {
super(reason);
@@ -107,7 +100,6 @@
* the array of {@code updateCounts} giving the number of
* successful updates (or another status code) for each command
* in the batch that was attempted.
- * @since Android 1.0
*/
public BatchUpdateException(String reason, String SQLState,
int[] updateCounts) {
@@ -130,7 +122,6 @@
* the array of {@code updateCounts} giving the number of
* successful updates (or another status code) for each command
* in the batch that was attempted.
- * @since Android 1.0
*/
public BatchUpdateException(String reason, String SQLState, int vendorCode,
int[] updateCounts) {
@@ -162,7 +153,6 @@
* <li>{@code Statement.EXECUTE_FAILED} indicating that the command
* was unsuccessful.</li>
* </ol>
- * @since Android 1.0
*/
public int[] getUpdateCounts() {
return updateCounts;
diff --git a/libcore/sql/src/main/java/java/sql/Blob.java b/libcore/sql/src/main/java/java/sql/Blob.java
index e6d9b19..0074b98 100644
--- a/libcore/sql/src/main/java/java/sql/Blob.java
+++ b/libcore/sql/src/main/java/java/sql/Blob.java
@@ -25,12 +25,10 @@
* <p>
* An SQL {@code BLOB} type stores a large array of binary data (bytes) as the
* value in a column of a database.
- * </p>
+ * <p>
* The {@code java.sql.Blob} interface provides methods for setting and
* retrieving data in the {@code Blob}, for querying {@code Blob} data length,
* and for searching for data within the {@code Blob}.
- *
- * @since Android 1.0
*/
public interface Blob {
@@ -41,7 +39,6 @@
* data.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public InputStream getBinaryStream() throws SQLException;
@@ -57,7 +54,6 @@
* at {@code pos} and is up to {@code length} bytes long.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public byte[] getBytes(long pos, int length) throws SQLException;
@@ -68,7 +64,6 @@
* bytes.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public long length() throws SQLException;
@@ -87,7 +82,6 @@
* {@code Blob}.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public long position(Blob pattern, long start) throws SQLException;
@@ -106,7 +100,6 @@
* {@code Blob}.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public long position(byte[] pattern, long start) throws SQLException;
@@ -121,7 +114,6 @@
* the {@code Blob} starting at the specified position.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public OutputStream setBinaryStream(long pos) throws SQLException;
@@ -139,7 +131,6 @@
* Blob}.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public int setBytes(long pos, byte[] theBytes) throws SQLException;
@@ -162,7 +153,6 @@
* Blob}.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public int setBytes(long pos, byte[] theBytes, int offset, int len)
throws SQLException;
@@ -176,7 +166,6 @@
* is to be truncated.
* @throws SQLException
* if an error occurs accessing the {@code Blob}.
- * @since Android 1.0
*/
public void truncate(long len) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/CallableStatement.java b/libcore/sql/src/main/java/java/sql/CallableStatement.java
index 7a90041..be5463b 100644
--- a/libcore/sql/src/main/java/java/sql/CallableStatement.java
+++ b/libcore/sql/src/main/java/java/sql/CallableStatement.java
@@ -36,7 +36,6 @@
* name or by a numerical index starting at 1.
* <p>
* The correct syntax is:
- * </p>
* <dd>
* <dl>
* { ?= call <procedurename> [( [parameter1,parameter2,...] )] }
@@ -44,7 +43,8 @@
* <dl>
* { call <procedurename> [( [parameter1,parameter2,...] )] }
* </dl>
- * </code></dd> </p> {@code IN} parameters are set before calling the procedure,
+ * </code></dd>
+ * {@code IN} parameters are set before calling the procedure,
* using the setter methods which are inherited from {@code PreparedStatement}.
* For {@code OUT} parameters, their type must be registered before executing
* the stored procedure. The values are retrieved using the getter methods
@@ -53,9 +53,6 @@
* {@code CallableStatement}s can return one or more {@code ResultSets}. In the
* event that multiple {@code ResultSets} are returned, they are accessed using
* the methods inherited from the {@code Statement} interface.
- * </p>
- *
- * @since Android 1.0
*/
public interface CallableStatement extends PreparedStatement {
@@ -69,7 +66,6 @@
* @return a {@code java.sql.Array} containing the parameter value.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Array getArray(int parameterIndex) throws SQLException;
@@ -82,7 +78,6 @@
* @return a {@code java.sql.Array} containing the parameter's value.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Array getArray(String parameterName) throws SQLException;
@@ -98,7 +93,6 @@
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public BigDecimal getBigDecimal(int parameterIndex) throws SQLException;
@@ -119,7 +113,6 @@
* if a database error occurs.
* @deprecated Use {@link #getBigDecimal(int)} or
* {@link #getBigDecimal(String)}
- * @since Android 1.0
*/
@Deprecated
public BigDecimal getBigDecimal(int parameterIndex, int scale)
@@ -136,7 +129,6 @@
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public BigDecimal getBigDecimal(String parameterName) throws SQLException;
@@ -152,7 +144,6 @@
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Blob getBlob(int parameterIndex) throws SQLException;
@@ -167,7 +158,6 @@
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Blob getBlob(String parameterName) throws SQLException;
@@ -181,7 +171,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public boolean getBoolean(int parameterIndex) throws SQLException;
@@ -195,7 +184,6 @@
* {@code false} is returned if the SQL value is {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public boolean getBoolean(String parameterName) throws SQLException;
@@ -210,7 +198,6 @@
* {@code 0} is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public byte getByte(int parameterIndex) throws SQLException;
@@ -224,7 +211,6 @@
* {@code 0} is returned if the SQL value is {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public byte getByte(String parameterName) throws SQLException;
@@ -239,7 +225,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public byte[] getBytes(int parameterIndex) throws SQLException;
@@ -253,7 +238,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public byte[] getBytes(String parameterName) throws SQLException;
@@ -270,7 +254,6 @@
* @throws SQLException
* if a database error occurs.
* @see Clob
- * @since Android 1.0
*/
public Clob getClob(int parameterIndex) throws SQLException;
@@ -285,7 +268,6 @@
* @throws SQLException
* if a database error occurs.
* @see Clob
- * @since Android 1.0
*/
public Clob getClob(String parameterName) throws SQLException;
@@ -301,7 +283,6 @@
* @throws SQLException
* if a database error occurs.
* @see Date
- * @since Android 1.0
*/
public Date getDate(int parameterIndex) throws SQLException;
@@ -312,8 +293,7 @@
* The JDBC driver uses the calendar to create the Date using a particular
* timezone and locale. The default behavior of the driver is to use the Java
* virtual machine default settings.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -324,7 +304,6 @@
* @throws SQLException
* if a database error occurs.
* @see Date
- * @since Android 1.0
*/
public Date getDate(int parameterIndex, Calendar cal) throws SQLException;
@@ -339,7 +318,6 @@
* @throws SQLException
* if a database error occurs.
* @see Date
- * @since Android 1.0
*/
public Date getDate(String parameterName) throws SQLException;
@@ -350,8 +328,7 @@
* The JDBC driver uses the calendar to create the date using a particular
* timezone and locale. The default behavior of the driver is to use the Java
* virtual machine default settings.
- * </p>
- *
+ *
* @param parameterName
* the name of the desired parameter.
* @param cal
@@ -361,7 +338,6 @@
* @throws SQLException
* if a database error occurs.
* @see Date
- * @since Android 1.0
*/
public Date getDate(String parameterName, Calendar cal) throws SQLException;
@@ -376,7 +352,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public double getDouble(int parameterIndex) throws SQLException;
@@ -390,7 +365,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public double getDouble(String parameterName) throws SQLException;
@@ -405,7 +379,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public float getFloat(int parameterIndex) throws SQLException;
@@ -419,7 +392,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public float getFloat(String parameterName) throws SQLException;
@@ -434,7 +406,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public int getInt(int parameterIndex) throws SQLException;
@@ -448,7 +419,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public int getInt(String parameterName) throws SQLException;
@@ -463,7 +433,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public long getLong(int parameterIndex) throws SQLException;
@@ -477,7 +446,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public long getLong(String parameterName) throws SQLException;
@@ -488,15 +456,13 @@
* with a {@code registerOutParameter} call. If a parameter was registered
* as a {@code java.sql.Types.OTHER} then it may hold abstract types that
* are particular to the connected database.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
* @return an Object holding the value of the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Object getObject(int parameterIndex) throws SQLException;
@@ -513,7 +479,6 @@
* @return an Object holding the value of the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Object getObject(int parameterIndex, Map<String, Class<?>> map)
throws SQLException;
@@ -526,15 +491,13 @@
* If a parameter was registered as a {@code java.sql.Types.OTHER}
* then it may hold abstract types that are particular to the
* connected database.
- * </p>
- *
+ *
* @param parameterName
* the parameter name.
* @return the Java {@code Object} representation of the value of the
* parameter.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Object getObject(String parameterName) throws SQLException;
@@ -550,7 +513,6 @@
* @return an {@code Object} holding the value of the parameter.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Object getObject(String parameterName, Map<String, Class<?>> map)
throws SQLException;
@@ -566,7 +528,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Ref getRef(int parameterIndex) throws SQLException;
@@ -582,7 +543,6 @@
* @throws SQLException
* if there is a problem accessing the database.
* @see Ref
- * @since Android 1.0
*/
public Ref getRef(String parameterName) throws SQLException;
@@ -597,7 +557,6 @@
* if the parameter's value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public short getShort(int parameterIndex) throws SQLException;
@@ -611,7 +570,6 @@
* if the parameter's value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public short getShort(String parameterName) throws SQLException;
@@ -623,8 +581,7 @@
* The {@code String} corresponding to a {@code CHAR} of fixed length
* will be of identical length to the value in the database inclusive
* of padding characters.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -632,7 +589,6 @@
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public String getString(int parameterIndex) throws SQLException;
@@ -644,15 +600,13 @@
* The string corresponding to a {@code CHAR} of fixed length will be of
* identical length to the value in the database inclusive of padding
* characters.
- * </p>
- *
+ *
* @param parameterName
* the desired parameter's name.
* @return the parameter's value as a {@code String}. {@code null}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public String getString(String parameterName) throws SQLException;
@@ -668,7 +622,6 @@
* @throws SQLException
* if a database error occurs.
* @see Time
- * @since Android 1.0
*/
public Time getTime(int parameterIndex) throws SQLException;
@@ -689,7 +642,6 @@
* if a database error occurs.
* @see Time
* @see java.util.Calendar
- * @since Android 1.0
*/
public Time getTime(int parameterIndex, Calendar cal) throws SQLException;
@@ -704,7 +656,6 @@
* @throws SQLException
* if a database error occurs.
* @see Time
- * @since Android 1.0
*/
public Time getTime(String parameterName) throws SQLException;
@@ -724,7 +675,6 @@
* if a database error occurs.
* @see Time
* @see java.util.Calendar
- * @since Android 1.0
*/
public Time getTime(String parameterName, Calendar cal) throws SQLException;
@@ -741,7 +691,6 @@
* @throws SQLException
* if a database error occurs.
* @see Timestamp
- * @since Android 1.0
*/
public Timestamp getTimestamp(int parameterIndex) throws SQLException;
@@ -761,7 +710,6 @@
* @throws SQLException
* if a database error occurs.
* @see Timestamp
- * @since Android 1.0
*/
public Timestamp getTimestamp(int parameterIndex, Calendar cal)
throws SQLException;
@@ -778,7 +726,6 @@
* @throws SQLException
* if a database error occurs.
* @see Timestamp
- * @since Android 1.0
*/
public Timestamp getTimestamp(String parameterName) throws SQLException;
@@ -797,7 +744,6 @@
* @throws SQLException
* if a database error occurs.
* @see Timestamp
- * @since Android 1.0
*/
public Timestamp getTimestamp(String parameterName, Calendar cal)
throws SQLException;
@@ -814,7 +760,6 @@
* @throws SQLException
* if a database error occurs.
* @see java.net.URL
- * @since Android 1.0
*/
public URL getURL(int parameterIndex) throws SQLException;
@@ -830,7 +775,6 @@
* @throws SQLException
* if a database error occurs.
* @see java.net.URL
- * @since Android 1.0
*/
public URL getURL(String parameterName) throws SQLException;
@@ -845,8 +789,7 @@
* If a database specific type is expected for a parameter, the Type {@code
* java.sql.Types.OTHER} should be used. Note that there is another variant
* of this method for User Defined Types or a {@code REF} type.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1
@@ -857,7 +800,6 @@
* @throws SQLException
* if a database error occurs.
* @see Types
- * @since Android 1.0
*/
public void registerOutParameter(int parameterIndex, int sqlType)
throws SQLException;
@@ -873,8 +815,7 @@
* The type supplied in the {@code sqlType} parameter fixes the
* type that will be returned by the getter methods of
* {@code CallableStatement}.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1
@@ -886,7 +827,6 @@
* @throws SQLException
* if a database error occurs.
* @see Types
- * @since Android 1.0
*/
public void registerOutParameter(int parameterIndex, int sqlType, int scale)
throws SQLException;
@@ -908,7 +848,6 @@
* @throws SQLException
* if a database error occurs.
* @see Ref
- * @since Android 1.0
*/
public void registerOutParameter(int paramIndex, int sqlType,
String typeName) throws SQLException;
@@ -923,8 +862,7 @@
* If a database-specific type is expected for a parameter, the Type {@code
* java.sql.Types.OTHER} should be used. Note that there is another variant
* of this method for User Defined Types or a {@code REF} type.
- * </p>
- *
+ *
* @param parameterName
* the parameter name.
* @param sqlType
@@ -934,7 +872,6 @@
* parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void registerOutParameter(String parameterName, int sqlType)
throws SQLException;
@@ -950,8 +887,7 @@
* The type supplied in the {@code sqlType} parameter fixes the
* type that will be returned by the getter methods of
* {@code CallableStatement}.
- * </p>
- *
+ *
* @param parameterName
* the parameter name.
* @param sqlType
@@ -961,7 +897,6 @@
* than or equal to 0.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void registerOutParameter(String parameterName, int sqlType,
int scale) throws SQLException;
@@ -982,7 +917,6 @@
* of the referenced type.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void registerOutParameter(String parameterName, int sqlType,
String typeName) throws SQLException;
@@ -991,12 +925,11 @@
* Sets the value of a specified parameter to the content of a supplied
* {@code InputStream}, which has a specified number of bytes.
* <p>
- * This is a good method for setting an SQL {@code LONVARCHAR} parameter
+ * This is a good method for setting an SQL {@code LONGVARCHAR} parameter
* where the length of the data is large. Data is read from the {@code
* InputStream} until end-of-file is reached or the specified number of
* bytes is copied.
- * </p>
- *
+ *
* @param parameterName
* the parameter name
* @param theInputStream
@@ -1007,7 +940,6 @@
* parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setAsciiStream(String parameterName,
InputStream theInputStream, int length) throws SQLException;
@@ -1022,7 +954,6 @@
* the {@code java.math.BigInteger} value to set.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setBigDecimal(String parameterName, BigDecimal theBigDecimal)
throws SQLException;
@@ -1033,8 +964,7 @@
* <p>
* Use this method when a large amount of data needs to be set into a
* {@code LONGVARBINARY} parameter.
- * </p>
- *
+ *
* @param parameterName
* the name of the parameter.
* @param theInputStream
@@ -1045,7 +975,6 @@
* parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setBinaryStream(String parameterName,
InputStream theInputStream, int length) throws SQLException;
@@ -1060,7 +989,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setBoolean(String parameterName, boolean theBoolean)
throws SQLException;
@@ -1074,7 +1002,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setByte(String parameterName, byte theByte) throws SQLException;
@@ -1089,7 +1016,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setBytes(String parameterName, byte[] theBytes)
throws SQLException;
@@ -1106,7 +1032,6 @@
* a count of the characters contained in {@code reader}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setCharacterStream(String parameterName, Reader reader,
int length) throws SQLException;
@@ -1121,7 +1046,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setDate(String parameterName, Date theDate) throws SQLException;
@@ -1144,7 +1068,6 @@
* if a database error occurs.
* @see java.util.Calendar
* @see Date
- * @since Android 1.0
*/
public void setDate(String parameterName, Date theDate, Calendar cal)
throws SQLException;
@@ -1159,7 +1082,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setDouble(String parameterName, double theDouble)
throws SQLException;
@@ -1174,7 +1096,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setFloat(String parameterName, float theFloat)
throws SQLException;
@@ -1188,7 +1109,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setInt(String parameterName, int theInt) throws SQLException;
@@ -1201,7 +1121,6 @@
* the new value with which to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setLong(String parameterName, long theLong) throws SQLException;
@@ -1216,7 +1135,6 @@
* a JDBC type expressed as a constant from {@link Types}.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setNull(String parameterName, int sqlType) throws SQLException;
@@ -1229,8 +1147,7 @@
* type code and type name (which is just the parameter name if the type is
* user defined, referred to as a {@code UDT}, or the name of the referenced
* type in case of a {@code REF} type).
- * </p>
- *
+ *
* @param parameterName
* the parameter name.
* @param sqlType
@@ -1243,7 +1160,6 @@
* @throws SQLException
* if a database error occurs.
* @see Types
- * @since Android 1.0
*/
public void setNull(String parameterName, int sqlType, String typeName)
throws SQLException;
@@ -1263,8 +1179,7 @@
* <li>{@link Array}</li>
* <li>{@link Clob}</li>
* <li>{@link Blob}</li> </ul>
- * </p>
- *
+ *
* @param parameterName
* the parameter name
* @param theObject
@@ -1272,7 +1187,6 @@
* @throws SQLException
* if a database error occurs.
* @see SQLData
- * @since Android 1.0
*/
public void setObject(String parameterName, Object theObject)
throws SQLException;
@@ -1295,8 +1209,7 @@
* </ul>
* then the driver is in charge of mapping the value to the appropriate
* SQL type and deliver it to the database.
- * </p>
- *
+ *
* @param parameterName
* the parameter name.
* @param theObject
@@ -1306,7 +1219,6 @@
* @throws SQLException
* if a database error occurs.
* @see SQLData
- * @since Android 1.0
*/
public void setObject(String parameterName, Object theObject,
int targetSqlType) throws SQLException;
@@ -1328,8 +1240,7 @@
* </ul>
* then the driver is charge of mapping the value to the appropriate
* SQL type.
- * </p>
- *
+ *
* @param parameterName
* the parameter name.
* @param theObject
@@ -1342,7 +1253,6 @@
* @throws SQLException
* if a database error occurs.
* @see SQLData
- * @since Android 1.0
*/
public void setObject(String parameterName, Object theObject,
int targetSqlType, int scale) throws SQLException;
@@ -1357,7 +1267,6 @@
* a short value to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setShort(String parameterName, short theShort)
throws SQLException;
@@ -1371,7 +1280,6 @@
* a {@code String} value to update the parameter.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void setString(String parameterName, String theString)
throws SQLException;
@@ -1387,7 +1295,6 @@
* @throws SQLException
* if a database error occurs.
* @see Time
- * @since Android 1.0
*/
public void setTime(String parameterName, Time theTime) throws SQLException;
@@ -1409,7 +1316,6 @@
* @throws SQLException
* if a database error occurs.
* @see Time
- * @since Android 1.0
*/
public void setTime(String parameterName, Time theTime, Calendar cal)
throws SQLException;
@@ -1425,7 +1331,6 @@
* @throws SQLException
* if a database error occurs.
* @see Timestamp
- * @since Android 1.0
*/
public void setTimestamp(String parameterName, Timestamp theTimestamp)
throws SQLException;
@@ -1437,8 +1342,7 @@
* The driver uses the supplied calendar to create the SQL {@code TIMESTAMP}
* value, which allows it to use a custom timezone - otherwise the driver
* uses the default timezone of the Java virtual machine.
- * </p>
- *
+ *
* @param parameterName
* the parameter name.
* @param theTimestamp
@@ -1449,7 +1353,6 @@
* if a database error occurs.
* @see Timestamp
* @see java.util.Calendar
- * @since Android 1.0
*/
public void setTimestamp(String parameterName, Timestamp theTimestamp,
Calendar cal) throws SQLException;
@@ -1465,7 +1368,6 @@
* @throws SQLException
* if a database error occurs.
* @see java.net.URL
- * @since Android 1.0
*/
public void setURL(String parameterName, URL theURL) throws SQLException;
@@ -1477,7 +1379,6 @@
* otherwise.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public boolean wasNull() throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/Clob.java b/libcore/sql/src/main/java/java/sql/Clob.java
index 339d4e5..73fe7fb 100644
--- a/libcore/sql/src/main/java/java/sql/Clob.java
+++ b/libcore/sql/src/main/java/java/sql/Clob.java
@@ -31,8 +31,6 @@
* The {@code java.sql.Clob} interface provides methods for setting and
* retrieving data in the {@code Clob}, for querying {@code Clob} data length,
* for searching for data within the {@code Clob}.
- *
- * @since Android 1.0
*/
public interface Clob {
@@ -43,7 +41,6 @@
* {@code Clob} data.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public InputStream getAsciiStream() throws SQLException;
@@ -54,7 +51,6 @@
* Clob} data.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public Reader getCharacterStream() throws SQLException;
@@ -68,7 +64,6 @@
* @return A string containing the requested data.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public String getSubString(long pos, int length) throws SQLException;
@@ -78,7 +73,6 @@
* @return a long value with the number of character in this {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public long length() throws SQLException;
@@ -94,7 +88,6 @@
* Clob} occurs within this {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public long position(Clob searchstr, long start) throws SQLException;
@@ -111,7 +104,6 @@
* occurs within this {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public long position(String searchstr, long start) throws SQLException;
@@ -125,7 +117,6 @@
* this {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public OutputStream setAsciiStream(long pos) throws SQLException;
@@ -139,7 +130,6 @@
* {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public Writer setCharacterStream(long pos) throws SQLException;
@@ -154,7 +144,6 @@
* @return the number of characters written.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public int setString(long pos, String str) throws SQLException;
@@ -173,7 +162,6 @@
* @return the number of characters written.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public int setString(long pos, String str, int offset, int len)
throws SQLException;
@@ -186,7 +174,6 @@
* truncate this {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
- * @since Android 1.0
*/
public void truncate(long len) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/Connection.java b/libcore/sql/src/main/java/java/sql/Connection.java
index 523071c..0704cca 100644
--- a/libcore/sql/src/main/java/java/sql/Connection.java
+++ b/libcore/sql/src/main/java/java/sql/Connection.java
@@ -23,8 +23,10 @@
* A connection represents a link from a Java application to a database. All SQL
* statements and results are returned within the context of a connection.
* Database statements that are executed within this context form a
- * database session which forms one or more closed transactions. Especially In distributed applications, multiple concurrent connections may exist accessing the same values of the database.
- * which may lead to the following phenomena (referred to as <i>transaction isolation levels</i>):
+ * database session which forms one or more closed transactions. Especially in
+ * distributed applications, multiple concurrent connections may exist accessing
+ * the same values of the database. which may lead to the following phenomena
+ * (referred to as <i>transaction isolation levels</i>):
* <ul>
* <li><i>dirty reads</i>:<br>
* reading values from table rows that are not committed.</br></li>
@@ -36,15 +38,11 @@
* because other transactions have inserted additional rows that satisfy an
* SQL {@code WHERE} clause</br></li>
* </ul>
- *
- * @since Android 1.0
*/
public interface Connection {
/**
* A constant indicating that transactions are not supported.
- *
- * @since Android 1.0
*/
public static final int TRANSACTION_NONE = 0;
@@ -52,8 +50,6 @@
* No <i>dirty reads</i> are permitted, therefore transactions may not read
* a row containing uncommitted values - but does not prevent an application
* from <i>non-repeatable reads</i> and <i>phantom reads</i>.
- *
- * @since Android 1.0
*/
public static final int TRANSACTION_READ_COMMITTED = 2;
@@ -65,16 +61,12 @@
* <li><i>non-repeatable reads</i></li>
* <li><i>phantom reads</i></li>
* </ul>
- *
- * @since Android 1.0
*/
public static final int TRANSACTION_READ_UNCOMMITTED = 1;
/**
* A constant indicating that <i>dirty reads</i> and <i>non-repeatable
* reads</i> are <b>prevented</b> but <i>phantom reads</i> can occur.
- *
- * @since Android 1.0
*/
public static final int TRANSACTION_REPEATABLE_READ = 4;
@@ -86,8 +78,6 @@
* <li><i>non-repeatable reads</i></li>
* <li><i>phantom reads</i></li>
* </ul>
- *
- * @since Android 1.0
*/
public static final int TRANSACTION_SERIALIZABLE = 8;
@@ -112,8 +102,7 @@
* connection before garbage collection takes place, it is not advisable to
* leave the {@code close} operation to take place in this way. Mainly
* because undesired side-effects may appear.
- * </p>
- *
+ *
* @throws SQLException
* if there is a problem accessing the database.
*/
@@ -217,7 +206,6 @@
* false}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public boolean getAutoCommit() throws SQLException;
@@ -242,7 +230,6 @@
* </ul>
* @throws SQLException
* if there is a problem accessing the a database.
- * @since Android 1.0
*/
public int getHoldability() throws SQLException;
@@ -255,7 +242,6 @@
* description.
* @throws SQLException
* if there is a problem accessing the a database.
- * @since Android 1.0
*/
public DatabaseMetaData getMetaData() throws SQLException;
@@ -270,7 +256,6 @@
* @see #TRANSACTION_READ_UNCOMMITTED
* @see #TRANSACTION_REPEATABLE_READ
* @see #TRANSACTION_SERIALIZABLE
- * @since Android 1.0
*/
public int getTransactionIsolation() throws SQLException;
@@ -281,7 +266,6 @@
* @return the Type Map as a {@code java.util.Map}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Map<String, Class<?>> getTypeMap() throws SQLException;
@@ -294,14 +278,12 @@
* By invoking the {@link SQLWarning#getNextWarning()} method of the
* returned {@code SQLWarning} object it is possible to obtain all of
* this connection's warning objects.
- * </p>
- *
+ *
* @return the first warning as an SQLWarning object (may be {@code null}).
* @throws SQLException
* if there is a problem accessing the database or if the call
* has been made on a connection which has been previously
* closed.
- * @since Android 1.0
*/
public SQLWarning getWarnings() throws SQLException;
@@ -315,7 +297,6 @@
* @return {@code true} if closed, otherwise {@code false}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public boolean isClosed() throws SQLException;
@@ -326,7 +307,6 @@
* @return {@code true} if in read-only state, otherwise {@code false}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public boolean isReadOnly() throws SQLException;
@@ -356,7 +336,6 @@
* {@link ResultSet#CONCUR_READ_ONLY}.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public CallableStatement prepareCall(String sql) throws SQLException;
@@ -387,7 +366,6 @@
* resultSetType} and {@code resultSetConcurrency} values.
* @throws SQLException
* if a problem occurs accessing the database
- * @since Android 1.0
*/
public CallableStatement prepareCall(String sql, int resultSetType,
int resultSetConcurrency) throws SQLException;
@@ -426,7 +404,6 @@
* resultSetHoldability} values.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public CallableStatement prepareCall(String sql, int resultSetType,
int resultSetConcurrency, int resultSetHoldability)
@@ -441,7 +418,7 @@
* the driver does not support precompiled statements, the statement will
* not reach the database server until it is executed. This distinction
* determines the moment when {@code SQLException}s get raised.
- * </p>
+ * <p>
* By default, {@code ResultSet}s from the returned object will be
* {@link ResultSet#TYPE_FORWARD_ONLY} type with a
* {@link ResultSet#CONCUR_READ_ONLY} mode of concurrency.
@@ -452,7 +429,6 @@
* statement.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public PreparedStatement prepareStatement(String sql) throws SQLException;
@@ -467,7 +443,7 @@
* precompiled in a {@code PreparedStatement}. The {@code PreparedStatement}
* can then be then be used to execute the statement multiple times in an
* efficient way.
- * </p>
+ * <p>
* Subject to JDBC driver support, this operation will attempt to send the
* precompiled version of the statement to the database. If
* the driver does not support precompiled statements, the statement will
@@ -477,8 +453,7 @@
* By default, {@code ResultSet}s from the returned object will be
* {@link ResultSet#TYPE_FORWARD_ONLY} type with a
* {@link ResultSet#CONCUR_READ_ONLY} mode of concurrency.
- * </p>
- *
+ *
* @param sql
* the SQL statement.
* @param autoGeneratedKeys
@@ -491,7 +466,6 @@
* SQL statement.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
throws SQLException;
@@ -509,13 +483,11 @@
* the driver does not support precompiled statements, the statement will
* not reach the database server until it is executed. This distinction
* determines the moment when {@code SQLException}s get raised.
- * </p>
* <p>
* By default, {@code ResultSet}s from the returned object will be
* {@link ResultSet#TYPE_FORWARD_ONLY} type with a
* {@link ResultSet#CONCUR_READ_ONLY} concurrency mode.
- * </p>
- *
+ *
* @param sql
* the SQL statement.
* @param columnIndexes
@@ -524,7 +496,6 @@
* @return the PreparedStatement containing the supplied SQL statement.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
throws SQLException;
@@ -556,7 +527,6 @@
* resultSetType} and {@code resultSetConcurrency} values.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public PreparedStatement prepareStatement(String sql, int resultSetType,
int resultSetConcurrency) throws SQLException;
@@ -594,7 +564,6 @@
* resultSetHoldability} values.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public PreparedStatement prepareStatement(String sql, int resultSetType,
int resultSetConcurrency, int resultSetHoldability)
@@ -614,13 +583,11 @@
* statement will not reach the database server until it is executed. This
* will have a bearing on precisely <i>when</i> {@code SQLException}
* instances get raised.
- * </p>
* <p>
* By default, ResultSets from the returned object will be
* {@link ResultSet#TYPE_FORWARD_ONLY} type with a
* {@link ResultSet#CONCUR_READ_ONLY} concurrency mode.
- * </p>
- *
+ *
* @param sql
* the SQL statement.
* @param columnNames
@@ -629,7 +596,6 @@
* @return the PreparedStatement containing the supplied SQL statement.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public PreparedStatement prepareStatement(String sql, String[] columnNames)
throws SQLException;
@@ -645,7 +611,6 @@
* if there is a problem with accessing the database or if
* {@code savepoint} is considered not valid in this
* transaction.
- * @since Android 1.0
*/
public void releaseSavepoint(Savepoint savepoint) throws SQLException;
@@ -657,7 +622,6 @@
* @throws SQLException
* if there is a problem with the database or if the method is
* called while in auto-commit mode of operation.
- * @since Android 1.0
*/
public void rollback() throws SQLException;
@@ -669,7 +633,6 @@
* the Savepoint to roll back to
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void rollback(Savepoint savepoint) throws SQLException;
@@ -682,26 +645,23 @@
* statements get grouped into transactions that need to be completed by
* explicit calls to either the {@link #commit()} or {@link #rollback()}
* methods.
- * </p>
+ * <p>
* Auto-commit is the default mode for new connection instances.
* <p>
* When in this mode, commits will automatically occur upon successful SQL
* statement completion or upon successful completion of an execute.
* Statements are not considered successfully completed until all associated
* {@code ResultSet}s and output parameters have been obtained or closed.
- * </p>
* <p>
* Calling this operation during an uncommitted transaction will result in
* it being committed.
- * </p>
- *
+ *
* @param autoCommit
* {@code boolean} indication of whether to put the target
* connection into auto-commit mode ({@code true}) or not (
* {@code false}).
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setAutoCommit(boolean autoCommit) throws SQLException;
@@ -714,7 +674,6 @@
* the catalog name to use.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setCatalog(String catalog) throws SQLException;
@@ -738,14 +697,12 @@
* <p>
* This serves as a hint to the driver, which can enable database
* optimizations.
- * </p>
- *
+ *
* @param readOnly
* {@code true} to set the Connection to read only mode. {@code
* false} disables read-only mode.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setReadOnly(boolean readOnly) throws SQLException;
@@ -755,7 +712,6 @@
* @return a {@code Savepoint} object for this savepoint.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Savepoint setSavepoint() throws SQLException;
@@ -767,7 +723,6 @@
* @return a {@code Savepoint} object for this savepoint.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Savepoint setSavepoint(String name) throws SQLException;
@@ -776,8 +731,7 @@
* <p>
* If this method is called during a transaction, the results are
* implementation defined.
- * </p>
- *
+ *
* @param level
* the new transaction isolation level to use from the following
* list of possible values:
@@ -790,7 +744,6 @@
* @throws SQLException
* if there is a problem with the database or if the value of
* {@code level} is not one of the expected constant values.
- * @since Android 1.0
*/
public void setTransactionIsolation(int level) throws SQLException;
@@ -803,7 +756,6 @@
* @throws SQLException
* if there is a problem accessing the database or if {@code
* map} is not an instance of {@link Map}.
- * @since Android 1.0
*/
public void setTypeMap(Map<String, Class<?>> map) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/DataTruncation.java b/libcore/sql/src/main/java/java/sql/DataTruncation.java
index a472cc5..20da727 100644
--- a/libcore/sql/src/main/java/java/sql/DataTruncation.java
+++ b/libcore/sql/src/main/java/java/sql/DataTruncation.java
@@ -24,8 +24,6 @@
* value either when reading (resulting in warning), or when writing data
* (resulting in an error). The {@code SQLState} error code for truncated data
* is {@code 01004}.
- *
- * @since Android 1.0
*/
public class DataTruncation extends SQLWarning implements Serializable {
@@ -66,7 +64,6 @@
* the original size of the truncated data.
* @param transferSize
* the size of the data after truncation.
- * @since Android 1.0
*/
public DataTruncation(int index, boolean parameter, boolean read,
int dataSize, int transferSize) {
@@ -83,7 +80,6 @@
*
* @return the number of bytes that should have been read or written. The
* value is set to {@code -1} if the size is unknown.
- * @since Android 1.0
*/
public int getDataSize() {
return dataSize;
@@ -93,7 +89,6 @@
* Gets the index of the column or of the parameter that was truncated.
*
* @return the index number of the column or of the parameter.
- * @since Android 1.0
*/
public int getIndex() {
return index;
@@ -104,7 +99,6 @@
*
* @return {@code true} if the value truncated was a parameter value,
* {@code false} if it was a column value.
- * @since Android 1.0
*/
public boolean getParameter() {
return parameter;
@@ -116,7 +110,6 @@
*
* @return {@code true} if the value was truncated on a read operation,
* {@code false} otherwise.
- * @since Android 1.0
*/
public boolean getRead() {
return read;
@@ -127,7 +120,6 @@
*
* @return the number of bytes actually read/written. The value may be set
* to {@code -1} if the size is unknown.
- * @since Android 1.0
*/
public int getTransferSize() {
return transferSize;
diff --git a/libcore/sql/src/main/java/java/sql/DatabaseMetaData.java b/libcore/sql/src/main/java/java/sql/DatabaseMetaData.java
index 82219c5..aca03c0 100644
--- a/libcore/sql/src/main/java/java/sql/DatabaseMetaData.java
+++ b/libcore/sql/src/main/java/java/sql/DatabaseMetaData.java
@@ -24,7 +24,6 @@
* This interface is implemented by JDBC driver vendors in order to provide
* information about the underlying database capabilities in association with
* the JDBC driver.
- * </p>
* <p>
* Some of the methods in this interface take string parameters which are
* patterns. Within these string patterns, {@code '%'} and {@code '_'}
@@ -33,144 +32,105 @@
* "match any character". Only metadata entries that match the pattern are
* returned. If such a search pattern string is set to {@code null}, that
* argument's criteria are dropped from the search.
- * </p>
- *
- * @since Android 1.0
*/
public interface DatabaseMetaData {
/**
* States that it may not be permitted to store {@code NULL} values.
- *
- * @since Android 1.0
*/
public static final short attributeNoNulls = 0;
/**
* States that {@code NULL} values are definitely permitted.
- *
- * @since Android 1.0
*/
public static final short attributeNullable = 1;
/**
* States that whether {@code NULL} values are permitted is unknown.
- *
- * @since Android 1.0
*/
public static final short attributeNullableUnknown = 2;
/**
* States the best row identifier is <em>NOT</em> a pseudo column.
- *
- * @since Android 1.0
*/
public static final int bestRowNotPseudo = 1;
/**
* States that the best row identifier is a pseudo column.
- *
- * @since Android 1.0
*/
public static final int bestRowPseudo = 2;
/**
* States that the remainder of the current session is used as the scope for
* the best row identifier.
- *
- * @since Android 1.0
*/
public static final int bestRowSession = 2;
/**
* States that best row identifier scope lasts only while the row is being
* used.
- *
- * @since Android 1.0
*/
public static final int bestRowTemporary = 0;
/**
* States that the remainder of the current transaction is used as the scope
* for the best row identifier.
- *
- * @since Android 1.0
*/
public static final int bestRowTransaction = 1;
/**
* States that the best row identifier may or may not be a pseudo column.
- *
- * @since Android 1.0
*/
public static final int bestRowUnknown = 0;
/**
* States that the column must not allow {@code NULL} values.
- *
- * @since Android 1.0
*/
public static final int columnNoNulls = 0;
/**
* States that the column definitely allows {@code NULL} values.
- *
- * @since Android 1.0
*/
public static final int columnNullable = 1;
/**
* States that it is unknown whether the columns may be nulled.
- *
- * @since Android 1.0
*/
public static final int columnNullableUnknown = 2;
/**
* For the column {@code UPDATE_RULE}, states that when the primary key is
* updated, the foreign key (imported key) is changed accordingly.
- *
- * @since Android 1.0
*/
public static final int importedKeyCascade = 0;
/**
* States that the evaluation of foreign key constraints is deferred (delayed
* until commit).
- *
- * @since Android 1.0
*/
public static final int importedKeyInitiallyDeferred = 5;
/**
* States that the evaluation of foreign key constraint is {@code IMMEDIATE}
* .
- *
- * @since Android 1.0
*/
public static final int importedKeyInitiallyImmediate = 6;
/**
* For the columns {@code UPDATE_RULE} and {@code DELETE_RULE}, states that
* if the primary key has been imported, it cannot be updated or deleted.
- *
- * @since Android 1.0
*/
public static final int importedKeyNoAction = 3;
/**
* States that the evaluation of foreign key constraint must not be {@code
* DEFERRED}.
- *
- * @since Android 1.0
*/
public static final int importedKeyNotDeferrable = 7;
/**
* States that a primary key must not be updated when imported as a foreign
* key by some other table. Used for the column {@code UPDATE_RULE}.
- *
- * @since Android 1.0
*/
public static final int importedKeyRestrict = 1;
@@ -178,8 +138,6 @@
* States that when the primary key is modified (updated or deleted) the
* foreign (imported) key is changed to its default value. Applies to the
* {@code UPDATE_RULE} and {@code DELETE_RULE} columns.
- *
- * @since Android 1.0
*/
public static final int importedKeySetDefault = 4;
@@ -187,190 +145,138 @@
* States that when the primary key is modified (updated or deleted) the
* foreign (imported) key is changed to {@code NULL}. Applies to the {@code
* UPDATE_RULE} and {@code DELETE_RULE} columns.
- *
- * @since Android 1.0
*/
public static final int importedKeySetNull = 2;
/**
* States that the column stores {@code IN} type parameters.
- *
- * @since Android 1.0
*/
public static final int procedureColumnIn = 1;
/**
* States that this column stores {@code INOUT} type parameters.
- *
- * @since Android 1.0
*/
public static final int procedureColumnInOut = 2;
/**
* States that this column stores {@code OUT} type parameters.
- *
- * @since Android 1.0
*/
public static final int procedureColumnOut = 4;
/**
* States that the column stores results.
- *
- * @since Android 1.0
*/
public static final int procedureColumnResult = 3;
/**
* States that the column stores return values.
- *
- * @since Android 1.0
*/
public static final int procedureColumnReturn = 5;
/**
* States that type of the column is unknown.
- *
- * @since Android 1.0
*/
public static final int procedureColumnUnknown = 0;
/**
* States that {@code NULL} values are not permitted.
- *
- * @since Android 1.0
*/
public static final int procedureNoNulls = 0;
/**
* States that the procedure does not return a result.
- *
- * @since Android 1.0
*/
public static final int procedureNoResult = 1;
/**
* States that {@code NULL} values are permitted.
- *
- * @since Android 1.0
*/
public static final int procedureNullable = 1;
/**
* States that it is unknown whether {@code NULL} values are permitted.
- *
- * @since Android 1.0
*/
public static final int procedureNullableUnknown = 2;
/**
* States that it is unknown whether or not the procedure returns a result.
- *
- * @since Android 1.0
*/
public static final int procedureResultUnknown = 0;
/**
* States that the procedure returns a result.
- *
- * @since Android 1.0
*/
public static final int procedureReturnsResult = 2;
/**
* States that the value is an SQL99 {@code SQLSTATE} value.
- *
- * @since Android 1.0
*/
public static final int sqlStateSQL99 = 2;
/**
* States that the value is an SQL {@code CLI SQLSTATE} value as defined by
* the X/Open standard.
- *
- * @since Android 1.0
*/
public static final int sqlStateXOpen = 1;
/**
* States that this table index is a clustered index.
- *
- * @since Android 1.0
*/
public static final short tableIndexClustered = 1;
/**
* States that this table index is a hashed index.
- *
- * @since Android 1.0
*/
public static final short tableIndexHashed = 2;
/**
* States this table's index is neither a clustered index, not a hashed
* index, and not a table statistics index; i.e. it is something else.
- *
- * @since Android 1.0
*/
public static final short tableIndexOther = 3;
/**
* States this column has the table's statistics, and that it is returned in
* conjunction with the table's index description.
- *
- * @since Android 1.0
*/
public static final short tableIndexStatistic = 0;
/**
* States that a {@code NULL} value is <em>NOT</em> permitted for
* this data type.
- *
- * @since Android 1.0
*/
public static final int typeNoNulls = 0;
/**
* States that a {@code NULL} value is permitted for this data type.
- *
- * @since Android 1.0
*/
public static final int typeNullable = 1;
/**
* States that it is unknown if a {@code NULL} value is permitted for
* this data type.
- *
- * @since Android 1.0
*/
public static final int typeNullableUnknown = 2;
/**
* States that this column shall not be used for {@code WHERE} statements
* with a {@code LIKE} clause.
- *
- * @since Android 1.0
*/
public static final int typePredBasic = 2;
/**
* States that this column can only be used in a {@code WHERE...LIKE}
* statement.
- *
- * @since Android 1.0
*/
public static final int typePredChar = 1;
/**
* States that this column does not support searches.
- *
- * @since Android 1.0
*/
public static final int typePredNone = 0;
/**
* States that the column is searchable.
- *
- * @since Android 1.0
*/
public static final int typeSearchable = 3;
@@ -397,7 +303,6 @@
* {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean allProceduresAreCallable() throws SQLException;
@@ -409,7 +314,6 @@
* otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean allTablesAreSelectable() throws SQLException;
@@ -421,7 +325,6 @@
* otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean dataDefinitionCausesTransactionCommit() throws SQLException;
@@ -433,7 +336,6 @@
* {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean dataDefinitionIgnoredInTransactions() throws SQLException;
@@ -450,7 +352,6 @@
* false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean deletesAreDetected(int type) throws SQLException;
@@ -462,7 +363,6 @@
* and {@code LONGVARCHAR}, otherwise {@code false}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
@@ -530,8 +430,7 @@
* generated REF type or for a Distinct type. ({@code NULL} if {@code
* DATA_TYPE} is not DISTINCT or a user generated REF)</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -551,7 +450,6 @@
* @return a {@code ResultSet}, where each row is an attribute description.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getAttributes(String catalog, String schemaPattern,
String typeNamePattern, String attributeNamePattern)
@@ -592,8 +490,7 @@
* </ul>
* </li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -616,7 +513,6 @@
* and the complete set of rows is the optimal set for this table.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getBestRowIdentifier(String catalog, String schema,
String table, int scope, boolean nullable) throws SQLException;
@@ -630,7 +526,6 @@
* single column named {@code TABLE_CAT}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getCatalogs() throws SQLException;
@@ -641,7 +536,6 @@
* @return a String containing the separator.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getCatalogSeparator() throws SQLException;
@@ -651,7 +545,6 @@
* @return a String with the vendor's term for "catalog".
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getCatalogTerm() throws SQLException;
@@ -674,8 +567,7 @@
* receiver can grant access to others, {@code "NO"} if the receiver cannot
* grant access to others, {@code null} if unknown.</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -696,7 +588,6 @@
* each privilege description.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getColumnPrivileges(String catalog, String schema,
String table, String columnNamePattern) throws SQLException;
@@ -754,8 +645,7 @@
* generated REF type or for a Distinct type. ({@code NULL} if {@code
* DATA_TYPE} is not DISTINCT or a user generated REF)</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -776,7 +666,6 @@
* defined above.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getColumns(String catalog, String schemaPattern,
String tableNamePattern, String columnNamePattern)
@@ -788,7 +677,6 @@
* @return the connection to the database.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Connection getConnection() throws SQLException;
@@ -857,8 +745,7 @@
* </ul>
* </li>
* </ol>
- * </p>
- *
+ *
* @param primaryCatalog
* a catalog name for the primary key table. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -889,7 +776,6 @@
* foreign keys laid out according to the format defined above.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSet getCrossReference(String primaryCatalog,
String primarySchema, String primaryTable, String foreignCatalog,
@@ -901,7 +787,6 @@
* @return the major version number of the database software.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getDatabaseMajorVersion() throws SQLException;
@@ -911,7 +796,6 @@
* @return the minor version number of the database software.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getDatabaseMinorVersion() throws SQLException;
@@ -921,7 +805,6 @@
* @return a {@code String} with the name of the database software.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getDatabaseProductName() throws SQLException;
@@ -932,7 +815,6 @@
* software.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getDatabaseProductVersion() throws SQLException;
@@ -949,7 +831,6 @@
* </ul>
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getDefaultTransactionIsolation() throws SQLException;
@@ -957,7 +838,6 @@
* Returns the JDBC driver's major version number.
*
* @return the driver's major version number.
- * @since Android 1.0
*/
public int getDriverMajorVersion();
@@ -965,7 +845,6 @@
* Returns the JDBC driver's minor version number.
*
* @return the driver's minor version number.
- * @since Android 1.0
*/
public int getDriverMinorVersion();
@@ -975,7 +854,6 @@
* @return a {@code String} containing the name of the JDBC driver
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getDriverName() throws SQLException;
@@ -986,7 +864,6 @@
* JDBC driver.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getDriverVersion() throws SQLException;
@@ -1056,8 +933,7 @@
* </ul>
* </li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1075,7 +951,6 @@
* columns, as defined above
* @throws SQLException
* a database error occurred
- * @since Android 1.0
*/
public ResultSet getExportedKeys(String catalog, String schema, String table)
throws SQLException;
@@ -1088,7 +963,6 @@
* @return a String containing all the additional permitted characters.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getExtraNameCharacters() throws SQLException;
@@ -1099,7 +973,6 @@
* @return the String used to quote SQL identifiers.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getIdentifierQuoteString() throws SQLException;
@@ -1169,8 +1042,7 @@
* </ul>
* </li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1188,7 +1060,6 @@
* rows in the format defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getImportedKeys(String catalog, String schema, String table)
throws SQLException;
@@ -1235,8 +1106,7 @@
* <li>{@code FILTER_CONDITION} - String - Filter condition. (possibly null)
* </li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1262,7 +1132,6 @@
* for the table, in the format defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getIndexInfo(String catalog, String schema, String table,
boolean unique, boolean approximate) throws SQLException;
@@ -1273,7 +1142,6 @@
* @return the major JDBC version number.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getJDBCMajorVersion() throws SQLException;
@@ -1283,7 +1151,6 @@
* @return the Minor JDBC Version Number.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getJDBCMinorVersion() throws SQLException;
@@ -1295,7 +1162,6 @@
* literal. If the number is unlimited then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxBinaryLiteralLength() throws SQLException;
@@ -1306,7 +1172,6 @@
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxCatalogNameLength() throws SQLException;
@@ -1318,7 +1183,6 @@
* zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxCharLiteralLength() throws SQLException;
@@ -1329,7 +1193,6 @@
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxColumnNameLength() throws SQLException;
@@ -1342,7 +1205,6 @@
* is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxColumnsInGroupBy() throws SQLException;
@@ -1353,7 +1215,6 @@
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxColumnsInIndex() throws SQLException;
@@ -1366,7 +1227,6 @@
* is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxColumnsInOrderBy() throws SQLException;
@@ -1379,7 +1239,6 @@
* zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxColumnsInSelect() throws SQLException;
@@ -1390,7 +1249,6 @@
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxColumnsInTable() throws SQLException;
@@ -1401,7 +1259,6 @@
* the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxConnections() throws SQLException;
@@ -1412,7 +1269,6 @@
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxCursorNameLength() throws SQLException;
@@ -1424,7 +1280,6 @@
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxIndexLength() throws SQLException;
@@ -1437,7 +1292,6 @@
* zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxProcedureNameLength() throws SQLException;
@@ -1449,7 +1303,6 @@
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxRowSize() throws SQLException;
@@ -1461,7 +1314,6 @@
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxSchemaNameLength() throws SQLException;
@@ -1474,7 +1326,6 @@
* zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxStatementLength() throws SQLException;
@@ -1486,7 +1337,6 @@
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxStatements() throws SQLException;
@@ -1497,7 +1347,6 @@
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxTableNameLength() throws SQLException;
@@ -1510,7 +1359,6 @@
* then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxTablesInSelect() throws SQLException;
@@ -1521,7 +1369,6 @@
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getMaxUserNameLength() throws SQLException;
@@ -1534,7 +1381,6 @@
* separated list.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getNumericFunctions() throws SQLException;
@@ -1553,8 +1399,7 @@
* primary key</li>
* <li>{@code PK_NAME} - String - the primary key name (possibly null)</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1572,7 +1417,6 @@
* defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getPrimaryKeys(String catalog, String schema, String table)
throws SQLException;
@@ -1630,8 +1474,7 @@
* <li>{@code REMARKS} - String - an explanatory comment about the data item
* </li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1652,7 +1495,6 @@
* in the format defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getProcedureColumns(String catalog, String schemaPattern,
String procedureNamePattern, String columnNamePattern)
@@ -1702,7 +1544,6 @@
* procedure in the format defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getProcedures(String catalog, String schemaPattern,
String procedureNamePattern) throws SQLException;
@@ -1713,7 +1554,6 @@
* @return a String with the vendor's preferred name for "procedure".
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getProcedureTerm() throws SQLException;
@@ -1724,7 +1564,6 @@
* ResultSet.CLOSE_CURSORS_AT_COMMIT}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getResultSetHoldability() throws SQLException;
@@ -1741,7 +1580,6 @@
* defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getSchemas() throws SQLException;
@@ -1751,7 +1589,6 @@
* @return a String which is the vendor's preferred term for schema.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getSchemaTerm() throws SQLException;
@@ -1765,7 +1602,6 @@
* @return a String used to escape the wildcard characters.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getSearchStringEscape() throws SQLException;
@@ -1777,7 +1613,6 @@
* format.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getSQLKeywords() throws SQLException;
@@ -1791,7 +1626,6 @@
* DatabaseMetaData.sqlStateXOpen}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public int getSQLStateType() throws SQLException;
@@ -1804,7 +1638,6 @@
* separated format.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getStringFunctions() throws SQLException;
@@ -1824,8 +1657,7 @@
* <li>{@code TABLE_NAME} - String - The table name</li>
* <li>SUPER{@code TABLE_NAME} - String - The super table name</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1846,7 +1678,6 @@
* returned if the database does not support table hierarchies.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getSuperTables(String catalog, String schemaPattern,
String tableNamePattern) throws SQLException;
@@ -1871,8 +1702,7 @@
* (possibly {@code null})</li>
* <li>SUPER{@code TYPE_NAME} - String - direct supertype's name</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* the catalog name. "" means get the UDTs without a catalog.
* {@code null} means don't use the catalog name to restrict the
@@ -1889,7 +1719,6 @@
* returned for a database that does not support type hierarchies.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getSuperTypes(String catalog, String schemaPattern,
String typeNamePattern) throws SQLException;
@@ -1903,7 +1732,6 @@
* separated format.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getSystemFunctions() throws SQLException;
@@ -1930,8 +1758,7 @@
* access to others, {@code "NO"} implies guarantee cannot grant access to
* others, {@code null} means this status is unknown</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1949,7 +1776,6 @@
* in the format defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getTablePrivileges(String catalog, String schemaPattern,
String tableNamePattern) throws SQLException;
@@ -1982,8 +1808,7 @@
* "USER" | "DERIVED" - specifies how values in the {@code
* SELF_REFERENCING_COL_NAME} are created (possibly {@code null})</li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -2004,7 +1829,6 @@
* above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getTables(String catalog, String schemaPattern,
String tableNamePattern, String[] types) throws SQLException;
@@ -2020,13 +1844,11 @@
* {@code "TABLE"}, {@code "VIEW"}, "{@code SYSTEM TABLE"}, {@code "ALIAS"},
* {@code "SYNONYM"}, {@code "GLOBAL TEMPORARY"}</li>
* </ol>
- * </p>
- *
+ *
* @return a {@code ResultSet} with one row per table type in the format
* defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getTableTypes() throws SQLException;
@@ -2037,7 +1859,6 @@
* functions.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getTimeDateFunctions() throws SQLException;
@@ -2096,7 +1917,6 @@
* @return a {@code ResultSet} which is structured as described above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getTypeInfo() throws SQLException;
@@ -2122,11 +1942,9 @@
* This is defined in {@code java.sql.Types}, and will be {@code null} if
* the {@code DATA_TYPE} does not match these criteria.</li>
* </ol>
- * </p>
* <p>
* If the driver does not support UDTs, the {@code ResultSet} is empty.
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -2146,7 +1964,6 @@
* @return a {@code ResultSet} in the format described above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getUDTs(String catalog, String schemaPattern,
String typeNamePattern, int[] types) throws SQLException;
@@ -2157,7 +1974,6 @@
* @return the URL for the database. {@code null} if it cannot be generated.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getURL() throws SQLException;
@@ -2167,7 +1983,6 @@
* @return the user name.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public String getUserName() throws SQLException;
@@ -2197,8 +2012,7 @@
* </ul>
* </li>
* </ol>
- * </p>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search using catalog name. Otherwise, the name must match
@@ -2216,7 +2030,6 @@
* column, in the format defined above.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public ResultSet getVersionColumns(String catalog, String schema,
String table) throws SQLException;
@@ -2235,7 +2048,6 @@
* @throws SQLException
* a database error occurred.
* @see ResultSet#rowInserted()
- * @since Android 1.0
*/
public boolean insertsAreDetected(int type) throws SQLException;
@@ -2247,7 +2059,6 @@
* qualified table name, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean isCatalogAtStart() throws SQLException;
@@ -2258,7 +2069,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean isReadOnly() throws SQLException;
@@ -2270,7 +2080,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean locatorsUpdateCopy() throws SQLException;
@@ -2282,7 +2091,6 @@
* produce a {@code NULL} result, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean nullPlusNonNullIsNull() throws SQLException;
@@ -2296,7 +2104,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean nullsAreSortedAtEnd() throws SQLException;
@@ -2309,7 +2116,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean nullsAreSortedAtStart() throws SQLException;
@@ -2321,7 +2127,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean nullsAreSortedHigh() throws SQLException;
@@ -2333,7 +2138,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean nullsAreSortedLow() throws SQLException;
@@ -2350,7 +2154,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean othersDeletesAreVisible(int type) throws SQLException;
@@ -2367,7 +2170,6 @@
* false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean othersInsertsAreVisible(int type) throws SQLException;
@@ -2384,7 +2186,6 @@
* false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean othersUpdatesAreVisible(int type) throws SQLException;
@@ -2401,7 +2202,6 @@
* ResultSet} itself, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean ownDeletesAreVisible(int type) throws SQLException;
@@ -2418,7 +2218,6 @@
* ResultSet} itself, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean ownInsertsAreVisible(int type) throws SQLException;
@@ -2435,7 +2234,6 @@
* ResultSet} itself, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean ownUpdatesAreVisible(int type) throws SQLException;
@@ -2448,7 +2246,6 @@
* case, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean storesLowerCaseIdentifiers() throws SQLException;
@@ -2460,7 +2257,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean storesLowerCaseQuotedIdentifiers() throws SQLException;
@@ -2472,7 +2268,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean storesMixedCaseIdentifiers() throws SQLException;
@@ -2485,7 +2280,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean storesMixedCaseQuotedIdentifiers() throws SQLException;
@@ -2497,7 +2291,6 @@
* case, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean storesUpperCaseIdentifiers() throws SQLException;
@@ -2509,7 +2302,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean storesUpperCaseQuotedIdentifiers() throws SQLException;
@@ -2521,7 +2313,6 @@
* supported, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsAlterTableWithAddColumn() throws SQLException;
@@ -2533,7 +2324,6 @@
* supported, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsAlterTableWithDropColumn() throws SQLException;
@@ -2544,7 +2334,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsANSI92EntryLevelSQL() throws SQLException;
@@ -2555,7 +2344,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsANSI92FullSQL() throws SQLException;
@@ -2566,7 +2354,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsANSI92IntermediateSQL() throws SQLException;
@@ -2577,7 +2364,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsBatchUpdates() throws SQLException;
@@ -2589,7 +2375,6 @@
* statements, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsCatalogsInDataManipulation() throws SQLException;
@@ -2600,7 +2385,6 @@
* statements, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsCatalogsInIndexDefinitions() throws SQLException;
@@ -2612,7 +2396,6 @@
* statements, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;
@@ -2623,7 +2406,6 @@
* statements.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsCatalogsInProcedureCalls() throws SQLException;
@@ -2634,7 +2416,6 @@
* statements, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsCatalogsInTableDefinitions() throws SQLException;
@@ -2643,8 +2424,7 @@
* <p>
* If aliasing is supported, then the SQL AS clause is used to provide names
* for computed columns and provide alias names for columns.
- * </p>
- *
+ *
* @return {@code true} if column aliasing is supported, {@code false}
* otherwise.
* @throws SQLException
@@ -2660,7 +2440,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsConvert() throws SQLException;
@@ -2676,7 +2455,6 @@
* these types, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsConvert(int fromType, int toType)
throws SQLException;
@@ -2688,7 +2466,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsCoreSQLGrammar() throws SQLException;
@@ -2699,7 +2476,6 @@
* and {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsCorrelatedSubqueries() throws SQLException;
@@ -2711,7 +2487,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsDataDefinitionAndDataManipulationTransactions()
throws SQLException;
@@ -2724,7 +2499,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsDataManipulationTransactionsOnly()
throws SQLException;
@@ -2737,7 +2511,6 @@
* names, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsDifferentTableCorrelationNames() throws SQLException;
@@ -2748,7 +2521,6 @@
* supported.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsExpressionsInOrderBy() throws SQLException;
@@ -2759,7 +2531,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsExtendedSQLGrammar() throws SQLException;
@@ -2770,7 +2541,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsFullOuterJoins() throws SQLException;
@@ -2782,7 +2552,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsGetGeneratedKeys() throws SQLException;
@@ -2793,7 +2562,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsGroupBy() throws SQLException;
@@ -2807,7 +2575,6 @@
* this way, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsGroupByBeyondSelect() throws SQLException;
@@ -2819,7 +2586,6 @@
* in the {@code SELECT} statement, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsGroupByUnrelated() throws SQLException;
@@ -2831,7 +2597,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsIntegrityEnhancementFacility() throws SQLException;
@@ -2842,7 +2607,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsLikeEscapeClause() throws SQLException;
@@ -2855,7 +2619,6 @@
* {@code supportsFullOuterJoins} returns {@code true}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsLimitedOuterJoins() throws SQLException;
@@ -2866,7 +2629,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsMinimumSQLGrammar() throws SQLException;
@@ -2878,7 +2640,6 @@
* case, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsMixedCaseIdentifiers() throws SQLException;
@@ -2890,7 +2651,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;
@@ -2903,7 +2663,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsMultipleOpenResults() throws SQLException;
@@ -2915,7 +2674,6 @@
* {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsMultipleResultSets() throws SQLException;
@@ -2927,7 +2685,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsMultipleTransactions() throws SQLException;
@@ -2938,7 +2695,6 @@
* statements, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsNamedParameters() throws SQLException;
@@ -2949,7 +2705,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsNonNullableColumns() throws SQLException;
@@ -2972,7 +2727,6 @@
* operations, {@code false} if they might get closed.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsOpenCursorsAcrossRollback() throws SQLException;
@@ -2984,7 +2738,6 @@
* they might not.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsOpenStatementsAcrossCommit() throws SQLException;
@@ -2996,7 +2749,6 @@
* they might not.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsOpenStatementsAcrossRollback() throws SQLException;
@@ -3008,7 +2760,6 @@
* not in the {@code SELECT}, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsOrderByUnrelated() throws SQLException;
@@ -3019,7 +2770,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsOuterJoins() throws SQLException;
@@ -3030,7 +2780,6 @@
* statements.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsPositionedDelete() throws SQLException;
@@ -3041,7 +2790,6 @@
* statements, {@code false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsPositionedUpdate() throws SQLException;
@@ -3065,7 +2813,6 @@
* pairing is supported otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsResultSetConcurrency(int type, int concurrency)
throws SQLException;
@@ -3082,7 +2829,6 @@
* if it isn't then {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsResultSetHoldability(int holdability)
throws SQLException;
@@ -3099,7 +2845,6 @@
* false} otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsResultSetType(int type) throws SQLException;
@@ -3110,7 +2855,6 @@
* otherwise.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSavepoints() throws SQLException;
@@ -3122,7 +2866,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSchemasInDataManipulation() throws SQLException;
@@ -3134,7 +2877,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSchemasInIndexDefinitions() throws SQLException;
@@ -3146,7 +2888,6 @@
* definition, otherwise {@code false}
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;
@@ -3157,7 +2898,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSchemasInProcedureCalls() throws SQLException;
@@ -3168,7 +2908,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSchemasInTableDefinitions() throws SQLException;
@@ -3179,7 +2918,6 @@
* supported, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSelectForUpdate() throws SQLException;
@@ -3190,7 +2928,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsStatementPooling() throws SQLException;
@@ -3202,7 +2939,6 @@
* escape syntax are supported, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsStoredProcedures() throws SQLException;
@@ -3213,7 +2949,6 @@
* expressions.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSubqueriesInComparisons() throws SQLException;
@@ -3224,7 +2959,6 @@
* expressions, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSubqueriesInExists() throws SQLException;
@@ -3235,7 +2969,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSubqueriesInIns() throws SQLException;
@@ -3245,7 +2978,6 @@
* @return {@code true} if subqueries are supported, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsSubqueriesInQuantifieds() throws SQLException;
@@ -3256,7 +2988,6 @@
* {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsTableCorrelationNames() throws SQLException;
@@ -3273,7 +3004,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsTransactionIsolationLevel(int level)
throws SQLException;
@@ -3284,13 +3014,11 @@
* If transactions are not supported, then the {@code commit} method does
* nothing and the transaction isolation level is always {@code
* TRANSACTION_NONE}.
- * </p>
- *
+ *
* @return {@code true} if transactions are supported, otherwise {@code
* false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsTransactions() throws SQLException;
@@ -3301,7 +3029,6 @@
* {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsUnion() throws SQLException;
@@ -3312,7 +3039,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean supportsUnionAll() throws SQLException;
@@ -3328,7 +3054,6 @@
* false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean updatesAreDetected(int type) throws SQLException;
@@ -3339,7 +3064,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean usesLocalFilePerTable() throws SQLException;
@@ -3350,7 +3074,6 @@
* otherwise {@code false}.
* @throws SQLException
* a database error occurred.
- * @since Android 1.0
*/
public boolean usesLocalFiles() throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/Date.java b/libcore/sql/src/main/java/java/sql/Date.java
index e506a43..90b5246 100644
--- a/libcore/sql/src/main/java/java/sql/Date.java
+++ b/libcore/sql/src/main/java/java/sql/Date.java
@@ -17,25 +17,20 @@
package java.sql;
-import java.text.SimpleDateFormat;
-
/**
* A class which can consume and produce dates in SQL {@code Date} format.
* <p>
* Dates are represented in SQL as {@code yyyy-mm-dd}. Note that this date
* format only deals with year, month and day values. There are no values for
* hours, minutes, seconds.
- * </p>
- * This is unlike the familiar {@code java.util.Date} object, which also includes
+ * <p>
+ * This is unlike the familiar {@code java.util.Date} object, which also includes
* values for hours, minutes, seconds, and milliseconds.
* <p>
* Time points are handled as millisecond values - milliseconds since the Epoch,
* January 1st 1970, 00:00:00.000 GMT. Time values passed to the {@code
* java.sql.Date} class are "normalized" to the time 00:00:00.000 GMT on the
* date implied by the time value.
- * </p>
- *
- * @since Android 1.0
*/
public class Date extends java.util.Date {
@@ -44,8 +39,8 @@
/**
* Constructs a {@code Date} object corresponding to the supplied year,
* month and day.
- *
- * @deprecated Please use the constructor {@link #Date(long)}.
+ *
+ * @deprecated Use the constructor {@link #Date(long)}.
* @param theYear
* the year, specified as the year minus 1900. Must be in the
* range {@code [0,8099]}.
@@ -54,9 +49,7 @@
* the range {@code [0,11]}.
* @param theDay
* the day in the month. Must be in the range {@code [1,31]}.
- * @since Android 1.0
*/
- @SuppressWarnings("deprecation")
@Deprecated
public Date(int theYear, int theMonth, int theDay) {
super(theYear, theMonth, theDay);
@@ -72,7 +65,6 @@
* milliseconds) stored in the {@code Date} object is adjusted to
* correspond to 00:00:00 GMT on the day determined by the supplied
* time value.
- * @since Android 1.0
*/
public Date(long theDate) {
super(normalizeTime(theDate));
@@ -84,9 +76,7 @@
* @return does not return anything.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public int getHours() {
@@ -99,9 +89,7 @@
* @return does not return anything.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public int getMinutes() {
@@ -114,9 +102,7 @@
* @return does not return anything.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public int getSeconds() {
@@ -130,9 +116,7 @@
* the number of hours to set.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public void setHours(int theHours) {
@@ -146,9 +130,7 @@
* the number of minutes to set.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public void setMinutes(int theMinutes) {
@@ -162,9 +144,7 @@
* the number of seconds to set.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public void setSeconds(int theSeconds) {
@@ -177,7 +157,6 @@
*
* @param theTime
* the time in milliseconds since the Epoch.
- * @since Android 1.0
*/
@Override
public void setTime(long theTime) {
@@ -193,12 +172,31 @@
*
* @return a string representation of the date in SQL format - {@code
* "yyyy-mm-dd"}.
- * @since Android 1.0
*/
@Override
public String toString() {
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$
- return dateFormat.format(this);
+ StringBuilder sb = new StringBuilder(10);
+
+ format((getYear() + 1900), 4, sb);
+ sb.append('-');
+ format((getMonth() + 1), 2, sb);
+ sb.append('-');
+ format(getDate(), 2, sb);
+
+ return sb.toString();
+ }
+
+ private static final String PADDING = "0000"; //$NON-NLS-1$
+
+ /*
+ * Private method to format the time
+ */
+ private void format(int date, int digits, StringBuilder sb) {
+ String str = String.valueOf(date);
+ if (digits - str.length() > 0) {
+ sb.append(PADDING.substring(0, digits - str.length()));
+ }
+ sb.append(str);
}
/**
@@ -212,7 +210,6 @@
* @throws IllegalArgumentException
* if the format of the supplied string does not match the SQL
* format.
- * @since Android 1.0
*/
public static Date valueOf(String dateString) {
if (dateString == null) {
diff --git a/libcore/sql/src/main/java/java/sql/Driver.java b/libcore/sql/src/main/java/java/sql/Driver.java
index c0499cb..207aec5 100644
--- a/libcore/sql/src/main/java/java/sql/Driver.java
+++ b/libcore/sql/src/main/java/java/sql/Driver.java
@@ -27,15 +27,12 @@
* {@code xxxx:yyyy}" is referred to as the <i>subprotocol</i> and is normally
* the same for all of a particular driver. " {@code SpecificData}" is a string
* which identifies the particular data source that the driver should use.
- * </p>
* <p>
* A driver needs to be registered with a {@link DriverManager}. It is
* registered and instantiated by calling {@code Class.forName("DriverURL")}
* with the URL string as argument.
- * </p>
+ *
* @see DriverManager
- *
- * @since Android 1.0
*/
public interface Driver {
@@ -51,7 +48,6 @@
* the subprotocol specified by the driver.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public boolean acceptsURL(String url) throws SQLException;
@@ -70,7 +66,6 @@
* @return the connection to the database.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Connection connect(String url, Properties info) throws SQLException;
@@ -78,7 +73,6 @@
* Gets the driver's major version number.
*
* @return the major version number of the driver - typically starts at 1.
- * @since Android 1.0
*/
public int getMajorVersion();
@@ -86,7 +80,6 @@
* Gets the driver's minor version number.
*
* @return the minor version number of the driver - typically starts at 0.
- * @since Android 1.0
*/
public int getMinorVersion();
@@ -97,8 +90,7 @@
* the client of the driver must supply in order to establish a connection
* to a database. Note that the returned array of properties may change
* depending on the supplied list of property values.
- * </p>
- *
+ *
* @param url
* the URL of the database. An application may call this method
* iteratively as the property list is built up - for example,
@@ -113,7 +105,6 @@
* connect to the database.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
throws SQLException;
@@ -125,11 +116,9 @@
* <p>
* A driver may not be fully compliant if the underlying database has
* limited functionality.
- * </p>
- *
+ *
* @return {@code true} if the driver is fully JDBC compliant, {@code false}
* otherwise.
- * @since Android 1.0
*/
public boolean jdbcCompliant();
diff --git a/libcore/sql/src/main/java/java/sql/DriverManager.java b/libcore/sql/src/main/java/java/sql/DriverManager.java
index afcf2f5..1c41a46 100644
--- a/libcore/sql/src/main/java/java/sql/DriverManager.java
+++ b/libcore/sql/src/main/java/java/sql/DriverManager.java
@@ -17,14 +17,16 @@
package java.sql;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Properties;
import java.util.Enumeration;
import java.util.Iterator;
-import java.util.Set;
import java.io.PrintStream;
import java.io.PrintWriter;
-import java.util.HashSet;
import java.util.Vector;
+import java.security.AccessController;
+import org.apache.harmony.luni.util.PriviAction;
import org.apache.harmony.sql.internal.nls.Messages;
// BEGIN android-changed
import dalvik.system.VMStack;
@@ -36,9 +38,6 @@
* The {@code DriverManager} class loads JDBC drivers during its initialization,
* from the list of drivers referenced by the system property {@code
* "jdbc.drivers"}.
- * </p>
- *
- * @since Android 1.0
*/
public class DriverManager {
@@ -57,10 +56,11 @@
* Set to hold Registered Drivers - initial capacity 10 drivers (will expand
* automatically if necessary.
*/
- private static final Set<Driver> theDriverSet = new HashSet<Driver>(10);
+ private static final List<Driver> theDrivers = new ArrayList<Driver>(10);
// Permission for setting log
- private static final SQLPermission logPermission = new SQLPermission("setLog"); //$NON-NLS-1$
+ private static final SQLPermission logPermission = new SQLPermission(
+ "setLog"); //$NON-NLS-1$
/*
* Load drivers on initialization
@@ -74,7 +74,9 @@
* it is defined.
*/
private static void loadInitialDrivers() {
- String theDriverList = System.getProperty("jdbc.drivers", null); //$NON-NLS-1$
+ String theDriverList = AccessController
+ .doPrivileged(new PriviAction<String>("jdbc.drivers", null)); //$NON-NLS-1$
+
if (theDriverList == null) {
return;
}
@@ -112,14 +114,12 @@
* <p>
* If the removal succeeds, the {@code DriverManager} will not use this
* driver in the future when asked to get a {@code Connection}.
- * </p>
- *
+ *
* @param driver
* the JDBC driver to remove.
* @throws SQLException
* if there is a problem interfering with accessing the
* database.
- * @since Android 1.0
*/
public static void deregisterDriver(Driver driver) throws SQLException {
if (driver == null) {
@@ -130,11 +130,12 @@
// END android-changed
if (!DriverManager.isClassFromClassLoader(driver, callerClassLoader)) {
- // sql.1=DriverManager: calling class not authorized to deregister JDBC driver
+ // sql.1=DriverManager: calling class not authorized to deregister
+ // JDBC driver
throw new SecurityException(Messages.getString("sql.1")); //$NON-NLS-1$
} // end if
- synchronized (theDriverSet) {
- theDriverSet.remove(driver);
+ synchronized (theDrivers) {
+ theDrivers.remove(driver);
}
}
@@ -148,7 +149,6 @@
* @throws SQLException
* if there is an error while attempting to connect to the
* database identified by the URL.
- * @since Android 1.0
*/
public static Connection getConnection(String url) throws SQLException {
return getConnection(url, new Properties());
@@ -171,7 +171,6 @@
* @throws SQLException
* if there is an error while attempting to connect to the
* database identified by the URL.
- * @since Android 1.0
*/
public static Connection getConnection(String url, Properties info)
throws SQLException {
@@ -182,13 +181,13 @@
// sql.5=The url cannot be null
throw new SQLException(Messages.getString("sql.5"), sqlState); //$NON-NLS-1$
}
- synchronized (theDriverSet) {
+ synchronized (theDrivers) {
/*
* Loop over the drivers in the DriverSet checking to see if one can
* open a connection to the supplied URL - return the first
* connection which is returned
*/
- for (Driver theDriver : theDriverSet) {
+ for (Driver theDriver : theDrivers) {
Connection theConnection = theDriver.connect(url, info);
if (theConnection != null) {
return theConnection;
@@ -214,15 +213,14 @@
* @throws SQLException
* if there is an error while attempting to connect to the
* database identified by the URL.
- * @since Android 1.0
*/
public static Connection getConnection(String url, String user,
String password) throws SQLException {
Properties theProperties = new Properties();
- if(null != user){
+ if (null != user) {
theProperties.setProperty("user", user); //$NON-NLS-1$
}
- if(null != password){
+ if (null != password) {
theProperties.setProperty("password", password); //$NON-NLS-1$
}
return getConnection(url, theProperties);
@@ -243,13 +241,13 @@
ClassLoader callerClassLoader = VMStack.getCallingClassLoader();
// END android-changed
- synchronized (theDriverSet) {
+ synchronized (theDrivers) {
/*
* Loop over the drivers in the DriverSet checking to see if one
* does understand the supplied URL - return the first driver which
* does understand the URL
*/
- Iterator<Driver> theIterator = theDriverSet.iterator();
+ Iterator<Driver> theIterator = theDrivers.iterator();
while (theIterator.hasNext()) {
Driver theDriver = theIterator.next();
if (theDriver.acceptsURL(url)
@@ -261,8 +259,8 @@
}
// If no drivers understand the URL, throw an SQLException
// sql.6=No suitable driver
- //SQLState: 08 - connection exception
- //001 - SQL-client unable to establish SQL-connection
+ // SQLState: 08 - connection exception
+ // 001 - SQL-client unable to establish SQL-connection
throw new SQLException(Messages.getString("sql.6"), "08001"); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -272,7 +270,6 @@
*
* @return An {@code Enumeration} containing all the currently loaded JDBC
* {@code Drivers}.
- * @since Android 1.0
*/
public static Enumeration<Driver> getDrivers() {
// BEGIN android-changed
@@ -282,13 +279,13 @@
* Synchronize to avoid clashes with additions and removals of drivers
* in the DriverSet
*/
- synchronized (theDriverSet) {
+ synchronized (theDrivers) {
/*
* Create the Enumeration by building a Vector from the elements of
* the DriverSet
*/
Vector<Driver> theVector = new Vector<Driver>();
- Iterator<Driver> theIterator = theDriverSet.iterator();
+ Iterator<Driver> theIterator = theDrivers.iterator();
while (theIterator.hasNext()) {
Driver theDriver = theIterator.next();
if (DriverManager.isClassFromClassLoader(theDriver,
@@ -304,7 +301,6 @@
* Returns the login timeout when connecting to a database in seconds.
*
* @return the login timeout in seconds.
- * @since Android 1.0
*/
public static int getLoginTimeout() {
return loginTimeout;
@@ -313,10 +309,9 @@
/**
* Gets the log {@code PrintStream} used by the {@code DriverManager} and
* all the JDBC Drivers.
- *
+ *
* @deprecated use {@link #getLogWriter()} instead.
* @return the {@code PrintStream} used for logging activities.
- * @since Android 1.0
*/
@Deprecated
public static PrintStream getLogStream() {
@@ -328,7 +323,6 @@
*
* @return A {@code PrintWriter} object used as the log writer. {@code null}
* if no log writer is set.
- * @since Android 1.0
*/
public static PrintWriter getLogWriter() {
return thePrintWriter;
@@ -340,7 +334,6 @@
*
* @param message
* the message to print to the JDBC log stream.
- * @since Android 1.0
*/
public static void println(String message) {
if (thePrintWriter != null) {
@@ -362,8 +355,7 @@
* <p>
* A newly loaded JDBC driver class should register itself with the
* {@code DriverManager} by calling this method.
- * </p>
- *
+ *
* @param driver
* the {@code Driver} to register with the {@code DriverManager}.
* @throws SQLException
@@ -373,8 +365,8 @@
if (driver == null) {
throw new NullPointerException();
}
- synchronized (theDriverSet) {
- theDriverSet.add(driver);
+ synchronized (theDrivers) {
+ theDrivers.add(driver);
}
}
@@ -383,7 +375,6 @@
*
* @param seconds
* seconds until timeout. 0 indicates wait forever.
- * @since Android 1.0
*/
public static void setLoginTimeout(int seconds) {
loginTimeout = seconds;
@@ -393,11 +384,10 @@
/**
* Sets the print stream to use for logging data from the {@code
* DriverManager} and the JDBC drivers.
- *
+ *
* @deprecated Use {@link #setLogWriter} instead.
* @param out
* the {@code PrintStream} to use for logging.
- * @since Android 1.0
*/
@Deprecated
public static void setLogStream(PrintStream out) {
@@ -411,7 +401,6 @@
*
* @param out
* the {@code PrintWriter} to be used.
- * @since Android 1.0
*/
public static void setLogWriter(PrintWriter out) {
checkLogSecurity();
@@ -442,13 +431,13 @@
*/
private static boolean isClassFromClassLoader(Object theObject,
ClassLoader theClassLoader) {
-
+
if ((theObject == null) || (theClassLoader == null)) {
return false;
}
-
+
Class<?> objectClass = theObject.getClass();
-
+
try {
Class<?> checkClass = Class.forName(objectClass.getName(), true,
theClassLoader);
diff --git a/libcore/sql/src/main/java/java/sql/DriverPropertyInfo.java b/libcore/sql/src/main/java/java/sql/DriverPropertyInfo.java
index 3875abb..aa18585 100644
--- a/libcore/sql/src/main/java/java/sql/DriverPropertyInfo.java
+++ b/libcore/sql/src/main/java/java/sql/DriverPropertyInfo.java
@@ -22,38 +22,28 @@
* This class is returned by the
* {@link Driver#getPropertyInfo(String, java.util.Properties)} method and
* allows for the advanced connection handling.
- *
- * @since Android 1.0
*/
public class DriverPropertyInfo {
/**
* If the value member can be chosen from a set of possible values, they are
* contained here. Otherwise choices is {@code null}.
- *
- * @since Android 1.0
*/
public String[] choices;
/**
* A description of the property. May be {@code null}.
- *
- * @since Android 1.0
*/
public String description;
/**
* The name of the property.
- *
- * @since Android 1.0
*/
public String name;
/**
- * {@code True} when the value member must be provided during {@code
- * Driver.connect}. {@code False} otherwise.
- *
- * @since Android 1.0
+ * {@code true} when the value member must be provided during {@code
+ * Driver.connect}. {@code false} otherwise.
*/
public boolean required;
@@ -61,8 +51,6 @@
* The current value associated with this property. It is depending on the
* data gathered by the {@code getPropertyInfo} method, the general Java
* environment and the driver's default values.
- *
- * @since Android 1.0
*/
public String value;
@@ -74,7 +62,6 @@
* The property name.
* @param value
* The property value.
- * @since Android 1.0
*/
public DriverPropertyInfo(String name, String value) {
this.name = name;
diff --git a/libcore/sql/src/main/java/java/sql/ParameterMetaData.java b/libcore/sql/src/main/java/java/sql/ParameterMetaData.java
index 94901ae..1e241c6 100644
--- a/libcore/sql/src/main/java/java/sql/ParameterMetaData.java
+++ b/libcore/sql/src/main/java/java/sql/ParameterMetaData.java
@@ -20,58 +20,42 @@
/**
* An interface used to get information about the types and properties of
* parameters in a {@code PreparedStatement}.
- *
- * @since Android 1.0
*/
public interface ParameterMetaData {
/**
* Indicates that the parameter mode is {@code IN}.
- *
- * @since Android 1.0
*/
public static final int parameterModeIn = 1;
/**
* Indicates that the parameter mode is {@code INOUT}.
- *
- * @since Android 1.0
*/
public static final int parameterModeInOut = 2;
/**
* Indicates that the parameter mode is {@code OUT}.
- *
- * @since Android 1.0
*/
public static final int parameterModeOut = 4;
/**
* Indicates that the parameter mode is not known.
- *
- * @since Android 1.0
*/
public static final int parameterModeUnknown = 0;
/**
* Indicates that a parameter is not permitted to be {@code NULL}.
- *
- * @since Android 1.0
*/
public static final int parameterNoNulls = 0;
/**
* Indicates that a parameter is permitted to be {@code NULL}.
- *
- * @since Android 1.0
*/
public static final int parameterNullable = 1;
/**
* Indicates that whether a parameter is allowed to be {@code null} or not
* is not known.
- *
- * @since Android 1.0
*/
public static final int parameterNullableUnknown = 2;
@@ -87,7 +71,6 @@
* between SQL types and Java objects.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public String getParameterClassName(int paramIndex) throws SQLException;
@@ -98,7 +81,6 @@
* @return the number of parameters.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getParameterCount() throws SQLException;
@@ -117,7 +99,6 @@
* @return the parameter's mode.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getParameterMode(int paramIndex) throws SQLException;
@@ -131,7 +112,6 @@
* java.sql.Types}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getParameterType(int paramIndex) throws SQLException;
@@ -146,7 +126,6 @@
* Defined Type</i> (UDT).
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public String getParameterTypeName(int paramIndex) throws SQLException;
@@ -160,7 +139,6 @@
* {@code 0} if the parameter is not a numeric type.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getPrecision(int paramIndex) throws SQLException;
@@ -175,7 +153,6 @@
* the parameter. {@code 0} if the parameter is not a numeric type.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getScale(int paramIndex) throws SQLException;
@@ -194,7 +171,6 @@
* @return the int code indicating the nullability of the parameter.
* @throws SQLException
* if a database error is encountered.
- * @since Android 1.0
*/
public int isNullable(int paramIndex) throws SQLException;
@@ -208,7 +184,6 @@
* {@code false} otherwise.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean isSigned(int paramIndex) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/PreparedStatement.java b/libcore/sql/src/main/java/java/sql/PreparedStatement.java
index ab81871..1cd9668 100644
--- a/libcore/sql/src/main/java/java/sql/PreparedStatement.java
+++ b/libcore/sql/src/main/java/java/sql/PreparedStatement.java
@@ -28,14 +28,10 @@
* <p>
* An SQL Statement is put into a {@code PreparedStatement} and is precompiled
* so that it can be executed efficiently multiple times.
- * </p>
* <p>
* Setter methods are supplied in the {@code PreparedStatement} interface for
* the setting of {@code IN} parameters for the statement. The setter method
* used for each {@code IN} parameter must match the parameter's type.
- * </p>
- *
- * @since Android 1.0
*/
public interface PreparedStatement extends Statement {
@@ -44,7 +40,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void addBatch() throws SQLException;
@@ -55,11 +50,9 @@
* {@code Statement}. Setting a parameter value replaces the previous value. This
* method clears the values for all parameters, releasing all resources used
* by those parameters.
- * </p>
- *
+ *
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void clearParameters() throws SQLException;
@@ -72,14 +65,12 @@
* {@code getResultSet} or {@code getUpdateCount} are used to retrieve
* the first result, and the second and subsequent results are
* retrieved with {@code getMoreResults}.
- * </p>
- *
+ *
* @return {@code true} if the result of the execution is a {@code
* ResultSet}, {@code false} if there is no result or if the result
* is an update count.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean execute() throws SQLException;
@@ -91,7 +82,6 @@
* @throws SQLException
* if a database error happens or if the SQL statement does not
* produce a {@code ResultSet}.
- * @since Android 1.0
*/
public ResultSet executeQuery() throws SQLException;
@@ -105,7 +95,6 @@
* @throws SQLException
* if a database error happens or if the SQL statement returns a
* {@code ResultSet}.
- * @since Android 1.0
*/
public int executeUpdate() throws SQLException;
@@ -117,14 +106,12 @@
* executing the {@code PreparedStatement}, because the {@code
* PreparedStatement} is precompiled. As a result the metadata can be
* queried ahead of time without actually executing the statement.
- * </p>
- *
+ *
* @return a {@code ResultSetMetaData} object with the information about the
* columns of the {@code ResultSet}, if the driver can return a
* {@code ResultSetMetaData}. {@code null} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public ResultSetMetaData getMetaData() throws SQLException;
@@ -136,7 +123,6 @@
* PreparedStatement}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public ParameterMetaData getParameterMetaData() throws SQLException;
@@ -152,7 +138,6 @@
* @throws SQLException
* if a database error happens.
* @see Array
- * @since Android 1.0
*/
public void setArray(int parameterIndex, Array theArray)
throws SQLException;
@@ -161,12 +146,11 @@
* Sets the value of a specified parameter to the content of a supplied
* {@code InputStream}, which has a specified number of bytes.
* <p>
- * This is a good method for setting an SQL {@code LONVARCHAR} parameter
+ * This is a good method for setting an SQL {@code LONGVARCHAR} parameter
* where the length of the data is large. Data is read from the {@code
* InputStream} until end-of-file is reached or the specified number of
* bytes is copied.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -178,7 +162,6 @@
* parameter.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setAsciiStream(int parameterIndex, InputStream theInputStream,
int length) throws SQLException;
@@ -196,7 +179,6 @@
* @throws SQLException
* if a database error happens.
* @see java.math.BigDecimal
- * @since Android 1.0
*/
public void setBigDecimal(int parameterIndex, BigDecimal theBigDecimal)
throws SQLException;
@@ -207,8 +189,7 @@
* <p>
* Use this method when a large amount of data needs to be set into a
* {@code LONGVARBINARY} parameter.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -220,7 +201,6 @@
* parameter.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setBinaryStream(int parameterIndex, InputStream theInputStream,
int length) throws SQLException;
@@ -236,7 +216,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
* @see Blob
*/
public void setBlob(int parameterIndex, Blob theBlob) throws SQLException;
@@ -253,7 +232,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setBoolean(int parameterIndex, boolean theBoolean)
throws SQLException;
@@ -269,7 +247,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setByte(int parameterIndex, byte theByte) throws SQLException;
@@ -286,7 +263,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setBytes(int parameterIndex, byte[] theBytes)
throws SQLException;
@@ -298,8 +274,7 @@
* Data is read from the {@code
* Reader} until end-of-file is reached or the specified number of
* characters are copied.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1
@@ -309,7 +284,6 @@
* the number of characters to be read.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setCharacterStream(int parameterIndex, Reader reader, int length)
throws SQLException;
@@ -325,7 +299,6 @@
* parameter at {@code parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setClob(int parameterIndex, Clob theClob) throws SQLException;
@@ -341,7 +314,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setDate(int parameterIndex, Date theDate) throws SQLException;
@@ -366,7 +338,6 @@
* if a database error happens.
* @see Date
* @see java.util.Calendar
- * @since Android 1.0
*/
public void setDate(int parameterIndex, Date theDate, Calendar cal)
throws SQLException;
@@ -383,7 +354,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setDouble(int parameterIndex, double theDouble)
throws SQLException;
@@ -399,7 +369,6 @@
* the {@code float} value to update the parameter.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setFloat(int parameterIndex, float theFloat)
throws SQLException;
@@ -415,7 +384,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setInt(int parameterIndex, int theInt) throws SQLException;
@@ -430,7 +398,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setLong(int parameterIndex, long theLong) throws SQLException;
@@ -447,7 +414,6 @@
* java.sql.Types}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setNull(int parameterIndex, int sqlType) throws SQLException;
@@ -461,8 +427,7 @@
* SQL type name when supplying a {@code NULL} UDT or REF. For a UDT, the
* type name is the type name of the parameter itself, but for a REF
* parameter the type name is the type name of the referenced type.
- * </p>
- *
+ *
* @param paramIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -475,7 +440,6 @@
* @throws SQLException
* if a database error happens.
* @see Types
- * @since Android 1.0
*/
public void setNull(int paramIndex, int sqlType, String typeName)
throws SQLException;
@@ -493,8 +457,7 @@
* object's class implements {@code Ref}, {@code Blob}, {@code Clob},
* {@code Struct}, or {@code Array}, the driver passes it to the database as
* a value of the corresponding SQL type.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -503,7 +466,6 @@
* {@code parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setObject(int parameterIndex, Object theObject)
throws SQLException;
@@ -518,8 +480,7 @@
* object's class implements {@code Ref}, {@code Blob}, {@code Clob},
* {@code Struct}, or {@code Array}, the driver will pass it to the database
* in the form of the relevant SQL type.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter index, where the first parameter has index 1.
* @param theObject
@@ -530,7 +491,6 @@
* java.sql.Types}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setObject(int parameterIndex, Object theObject,
int targetSqlType) throws SQLException;
@@ -545,8 +505,7 @@
* object's class implements {@code Ref}, {@code Blob}, {@code Clob},
* {@code Struct}, or {@code Array}, the driver will pass it to the database
* in the form of the relevant SQL type.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter index, where the first parameter has index 1.
* @param theObject
@@ -561,7 +520,6 @@
* java.sql.Types.NUMERIC} - ignored for all other types.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setObject(int parameterIndex, Object theObject,
int targetSqlType, int scale) throws SQLException;
@@ -579,7 +537,6 @@
* @throws SQLException
* if a database error happens.
* @see Ref
- * @since Android 1.0
*/
public void setRef(int parameterIndex, Ref theRef) throws SQLException;
@@ -595,7 +552,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setShort(int parameterIndex, short theShort)
throws SQLException;
@@ -611,7 +567,6 @@
* set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setString(int parameterIndex, String theString)
throws SQLException;
@@ -628,7 +583,6 @@
* {@code parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setTime(int parameterIndex, Time theTime) throws SQLException;
@@ -639,8 +593,7 @@
* The driver uses the supplied {@code Calendar} to create the SQL {@code
* TIME} value, which allows it to use a custom timezone - otherwise the
* driver uses the default timezone of the Java virtual machine.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -654,7 +607,6 @@
* if a database error happens.
* @see Time
* @see java.util.Calendar
- * @since Android 1.0
*/
public void setTime(int parameterIndex, Time theTime, Calendar cal)
throws SQLException;
@@ -671,7 +623,6 @@
* parameterIndex} is set.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setTimestamp(int parameterIndex, Timestamp theTimestamp)
throws SQLException;
@@ -683,8 +634,7 @@
* The driver uses the supplied {@code Calendar} to create the SQL {@code
* TIMESTAMP} value, which allows it to use a custom timezone - otherwise
* the driver uses the default timezone of the Java virtual machine.
- * </p>
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -698,7 +648,6 @@
* if a database error happens.
* @see Timestamp
* @see java.util.Calendar
- * @since Android 1.0
*/
public void setTimestamp(int parameterIndex, Timestamp theTimestamp,
Calendar cal) throws SQLException;
@@ -736,7 +685,6 @@
* @throws SQLException
* if a database error happens.
* @see URL
- * @since Android 1.0
*/
public void setURL(int parameterIndex, URL theURL) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/Ref.java b/libcore/sql/src/main/java/java/sql/Ref.java
index 2ceac8b..cbc5454 100644
--- a/libcore/sql/src/main/java/java/sql/Ref.java
+++ b/libcore/sql/src/main/java/java/sql/Ref.java
@@ -29,11 +29,9 @@
* the database supports the {@code Ref} type, it is not typically
* necessary to get the underlying object before using it in a method call -
* the {@code Ref} object can be used in place of the data structure.
- * </p>
+ * <p>
* A {@code Ref} object is stored into the database using the
* {@link PreparedStatement#setRef(int, Ref)} method.
- *
- * @since Android 1.0
*/
public interface Ref {
@@ -44,7 +42,6 @@
* @return the fully qualified name of the SQL structured type.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getBaseTypeName() throws SQLException;
@@ -55,7 +52,6 @@
* structured type.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Object getObject() throws SQLException;
@@ -69,7 +65,6 @@
* structured type.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Object getObject(Map<String, Class<?>> map) throws SQLException;
@@ -82,7 +77,6 @@
* that this {@code Ref} references.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public void setObject(Object value) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/ResultSet.java b/libcore/sql/src/main/java/java/sql/ResultSet.java
index f33f9de..8ecbe6c 100644
--- a/libcore/sql/src/main/java/java/sql/ResultSet.java
+++ b/libcore/sql/src/main/java/java/sql/ResultSet.java
@@ -34,7 +34,6 @@
* use the {@code next} method. The {@code next} method returns {@code true} as
* long as there are more rows in the {@code ResultSet}, otherwise it returns
* {@code false}.
- * </p>
* <p>
* The default type of {@code ResultSet} can not be updated and its cursor can
* only advance forward through the rows of data. This means that it is only
@@ -42,7 +41,6 @@
* are implemented: an <i>updatable</i> type and also types where the cursor can
* be <i>scrolled</i> forward and backward through the rows of data. How such a
* {@code ResultSet} is created is demonstrated in the following example:
- * </p>
* <ul>
* <dd>
* {@code Connection con;}</dd>
@@ -63,13 +61,11 @@
* is better to use column indexes. Ideally the columns should be read
* left-to-right and read once only, since not all databases are optimized to
* handle other techniques of reading the data.
- * </p>
* <p>
* When reading data via the appropriate getter methods, the JDBC driver maps
* the SQL data retrieved from the database to the Java type implied by the
* method invoked by the application. The JDBC specification has a table for the
* mappings from SQL types to Java types.
- * </p>
* <p>
* There are also methods for writing data into the {@code ResultSet}, such as
* {@code updateInt} and {@code updateString}. The update methods can be used
@@ -80,94 +76,70 @@
* method. For insertion of new rows, the cursor is first moved to a special row
* called the <i>Insert Row</i>, data is added using the update methods,
* followed by calling the {@code ResultSet.insertRow} method.
- * </p>
* <p>
* A {@code ResultSet} is closed if the statement which generated it closes, the
* statement is executed again, or the same statement's next {@code ResultSet}
* is retrieved (if the statement returned of multiple results).
- * </p>
- *
- * @since Android 1.0
*/
public interface ResultSet {
/**
* A constant used to indicate that a {@code ResultSet} object must be
* closed when the method {@code Connection.commit} is invoked.
- *
- * @since Android 1.0
*/
public static final int CLOSE_CURSORS_AT_COMMIT = 2;
/**
* A constant used to indicate that a {@code ResultSet} object must not be
* closed when the method {@code Connection.commit} is invoked.
- *
- * @since Android 1.0
*/
public static final int HOLD_CURSORS_OVER_COMMIT = 1;
/**
* A constant used to indicate the concurrency mode for a {@code ResultSet}
* object that cannot be updated.
- *
- * @since Android 1.0
*/
public static final int CONCUR_READ_ONLY = 1007;
/**
* A constant used to indicate the concurrency mode for a {@code ResultSet}
* object that can be updated.
- *
- * @since Android 1.0
*/
public static final int CONCUR_UPDATABLE = 1008;
/**
* A constant used to indicate processing of the rows of a {@code ResultSet}
* in the forward direction, first to last.
- *
- * @since Android 1.0
*/
public static final int FETCH_FORWARD = 1000;
/**
* A constant used to indicate processing of the rows of a {@code ResultSet}
* in the reverse direction, last to first.
- *
- * @since Android 1.0
*/
public static final int FETCH_REVERSE = 1001;
/**
* A constant used to indicate that the order of processing of the rows of a
* {@code ResultSet} is unknown.
- *
- * @since Android 1.0
*/
public static final int FETCH_UNKNOWN = 1002;
/**
* A constant used to indicate a {@code ResultSet} object whose cursor can
* only move forward.
- *
- * @since Android 1.0
*/
public static final int TYPE_FORWARD_ONLY = 1003;
/**
* A constant used to indicate a {@code ResultSet} object which is
* scrollable but is insensitive to changes made by others.
- *
- * @since Android 1.0
*/
public static final int TYPE_SCROLL_INSENSITIVE = 1004;
/**
* A constant used to indicate a {@code ResultSet} object which is
* scrollable and sensitive to changes made by others.
- *
- * @since Android 1.0
*/
public static final int TYPE_SCROLL_SENSITIVE = 1005;
@@ -181,7 +153,6 @@
* ResultSet}, {@code false} otherwise.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean absolute(int row) throws SQLException;
@@ -190,7 +161,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void afterLast() throws SQLException;
@@ -200,7 +170,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void beforeFirst() throws SQLException;
@@ -209,7 +178,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void cancelRowUpdates() throws SQLException;
@@ -218,7 +186,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void clearWarnings() throws SQLException;
@@ -232,7 +199,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void close() throws SQLException;
@@ -242,7 +208,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void deleteRow() throws SQLException;
@@ -256,7 +221,6 @@
* name.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int findColumn(String columnName) throws SQLException;
@@ -267,7 +231,6 @@
* false} if the {@code ResultSet} contains no rows.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean first() throws SQLException;
@@ -280,7 +243,6 @@
* @return a {@code java.sql.Array} with the data from the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Array getArray(int columnIndex) throws SQLException;
@@ -293,7 +255,6 @@
* @return a {@code java.sql.Array} with the data from the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Array getArray(String colName) throws SQLException;
@@ -306,7 +267,6 @@
* @return an {@code InputStream} with the data from the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public InputStream getAsciiStream(int columnIndex) throws SQLException;
@@ -319,7 +279,6 @@
* @return an {@code InputStream} with the data from the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public InputStream getAsciiStream(String columnName) throws SQLException;
@@ -332,7 +291,6 @@
* @return a {@code BigDecimal} with the value of the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public BigDecimal getBigDecimal(int columnIndex) throws SQLException;
@@ -349,7 +307,6 @@
* @return a {@code BigDecimal} with the value of the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
@Deprecated
public BigDecimal getBigDecimal(int columnIndex, int scale)
@@ -364,7 +321,6 @@
* @return a BigDecimal with value of the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public BigDecimal getBigDecimal(String columnName) throws SQLException;
@@ -381,7 +337,6 @@
* @return a BigDecimal with value of the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
@Deprecated
public BigDecimal getBigDecimal(String columnName, int scale)
@@ -395,15 +350,13 @@
* data in the {@code InputStream} should be read before getting data from
* any other column. A further call to a getter method will implicitly close
* the {@code InputStream}.
- * </p>
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return an {@code InputStream} with the data from the column. If the
* column value is SQL {@code NULL}, {@code null} is returned.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public InputStream getBinaryStream(int columnIndex) throws SQLException;
@@ -414,15 +367,13 @@
* data in the {@code InputStream} should be read before getting data from
* any other column. A further call to a getter method will implicitly close
* the {@code InputStream}.
- * </p>
- *
+ *
* @param columnName
* the name of the column to read.
* @return an {@code InputStream} with the data from the column if the
* column value is SQL {@code NULL}, {@code null} is returned.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public InputStream getBinaryStream(String columnName) throws SQLException;
@@ -435,7 +386,6 @@
* @return a {@code java.sql.Blob} with the value of the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Blob getBlob(int columnIndex) throws SQLException;
@@ -448,7 +398,6 @@
* @return a {@code java.sql.Blob} with the value of the column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Blob getBlob(String columnName) throws SQLException;
@@ -462,7 +411,6 @@
* {@code NULL}, {@code false} is returned.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean getBoolean(int columnIndex) throws SQLException;
@@ -476,7 +424,6 @@
* {@code NULL}, {@code false} is returned.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean getBoolean(String columnName) throws SQLException;
@@ -489,7 +436,6 @@
* is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public byte getByte(int columnIndex) throws SQLException;
@@ -502,7 +448,6 @@
* is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public byte getByte(String columnName) throws SQLException;
@@ -515,7 +460,6 @@
* the column contains SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public byte[] getBytes(int columnIndex) throws SQLException;
@@ -528,7 +472,6 @@
* the column contains SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public byte[] getBytes(String columnName) throws SQLException;
@@ -543,7 +486,6 @@
* @throws SQLException
* if a database error happens.
* @see java.io.Reader
- * @since Android 1.0
*/
public Reader getCharacterStream(int columnIndex) throws SQLException;
@@ -557,7 +499,6 @@
* the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Reader getCharacterStream(String columnName) throws SQLException;
@@ -571,7 +512,6 @@
* {@code null} if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Clob getClob(int columnIndex) throws SQLException;
@@ -585,7 +525,6 @@
* {@code null} if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Clob getClob(String colName) throws SQLException;
@@ -596,7 +535,6 @@
* , {@code ResultSet.CONCUR_UPDATABLE}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getConcurrency() throws SQLException;
@@ -606,7 +544,6 @@
* @return the SQL cursor name.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public String getCursorName() throws SQLException;
@@ -620,7 +557,6 @@
* if the column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Date getDate(int columnIndex) throws SQLException;
@@ -636,7 +572,6 @@
* if the column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Date getDate(int columnIndex, Calendar cal) throws SQLException;
@@ -650,7 +585,6 @@
* if the column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Date getDate(String columnName) throws SQLException;
@@ -666,7 +600,6 @@
* if the column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Date getDate(String columnName, Calendar cal) throws SQLException;
@@ -680,7 +613,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public double getDouble(int columnIndex) throws SQLException;
@@ -694,7 +626,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public double getDouble(String columnName) throws SQLException;
@@ -709,7 +640,6 @@
* </ul>
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getFetchDirection() throws SQLException;
@@ -719,7 +649,6 @@
* @return the fetch size as an int
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getFetchSize() throws SQLException;
@@ -733,7 +662,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public float getFloat(int columnIndex) throws SQLException;
@@ -747,7 +675,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public float getFloat(String columnName) throws SQLException;
@@ -761,7 +688,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getInt(int columnIndex) throws SQLException;
@@ -775,7 +701,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getInt(String columnName) throws SQLException;
@@ -789,7 +714,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public long getLong(int columnIndex) throws SQLException;
@@ -803,7 +727,6 @@
* column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public long getLong(String columnName) throws SQLException;
@@ -815,7 +738,6 @@
* {@code ResultSet}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public ResultSetMetaData getMetaData() throws SQLException;
@@ -827,15 +749,13 @@
* For SQL User Defined Types, if a column value is Structured or Distinct,
* this method behaves the same as a call to: {@code
* getObject(columnIndex,this.getStatement().getConnection().getTypeMap())}
- * </p>
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return an {@code Object} containing the value of the column. {@code
* null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Object getObject(int columnIndex) throws SQLException;
@@ -846,8 +766,7 @@
* The type of the Java object will be determined by the supplied Map to
* perform the mapping of SQL {@code Struct} or Distinct types into Java
* objects.
- * </p>
- *
+ *
* @param columnIndex
* the index of the column to read.
* @param map
@@ -857,7 +776,6 @@
* null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Object getObject(int columnIndex, Map<String, Class<?>> map)
throws SQLException;
@@ -870,15 +788,13 @@
* For SQL User Defined Types, if a column value is structured or distinct,
* this method behaves the same as a call to: {@code
* getObject(columnIndex,this.getStatement().getConnection().getTypeMap())}
- * </p>
- *
+ *
* @param columnName
* the name of the column to read.
* @return an {@code Object} containing the value of the column. {@code
* null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Object getObject(String columnName) throws SQLException;
@@ -888,8 +804,7 @@
* <p>
* The type of the Java object will be determined by the supplied Map to
* perform the mapping of SQL Struct or Distinct types into Java objects.
- * </p>
- *
+ *
* @param columnName
* the name of the column to read.
* @param map
@@ -899,7 +814,6 @@
* null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Object getObject(String columnName, Map<String, Class<?>> map)
throws SQLException;
@@ -913,7 +827,6 @@
* @return a Ref representing the value of the SQL REF in the column
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Ref getRef(int columnIndex) throws SQLException;
@@ -926,7 +839,6 @@
* @return a Ref representing the value of the SQL {@code REF} in the column
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Ref getRef(String colName) throws SQLException;
@@ -938,7 +850,6 @@
* there is no current row.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public int getRow() throws SQLException;
@@ -951,7 +862,6 @@
* the value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public short getShort(int columnIndex) throws SQLException;
@@ -964,7 +874,6 @@
* the value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public short getShort(String columnName) throws SQLException;
@@ -978,7 +887,6 @@
* null} if the {@code ResultSet} was not created by a Statement.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Statement getStatement() throws SQLException;
@@ -991,7 +899,6 @@
* the column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public String getString(int columnIndex) throws SQLException;
@@ -1004,7 +911,6 @@
* the column is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public String getString(String columnName) throws SQLException;
@@ -1018,7 +924,6 @@
* value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Time getTime(int columnIndex) throws SQLException;
@@ -1035,7 +940,6 @@
* value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Time getTime(int columnIndex, Calendar cal) throws SQLException;
@@ -1049,7 +953,6 @@
* NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Time getTime(String columnName) throws SQLException;
@@ -1066,7 +969,6 @@
* value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Time getTime(String columnName, Calendar cal) throws SQLException;
@@ -1080,7 +982,6 @@
* column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Timestamp getTimestamp(int columnIndex) throws SQLException;
@@ -1097,7 +998,6 @@
* column value is SQL NULL.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Timestamp getTimestamp(int columnIndex, Calendar cal)
throws SQLException;
@@ -1112,7 +1012,6 @@
* column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Timestamp getTimestamp(String columnName) throws SQLException;
@@ -1129,7 +1028,6 @@
* column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public Timestamp getTimestamp(String columnName, Calendar cal)
throws SQLException;
@@ -1145,7 +1043,6 @@
* </ul>
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int getType() throws SQLException;
@@ -1160,7 +1057,6 @@
* null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
@Deprecated
public InputStream getUnicodeStream(int columnIndex) throws SQLException;
@@ -1176,7 +1072,6 @@
* null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
@Deprecated
public InputStream getUnicodeStream(String columnName) throws SQLException;
@@ -1190,7 +1085,6 @@
* @return a URL. {@code null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public URL getURL(int columnIndex) throws SQLException;
@@ -1203,7 +1097,6 @@
* @return the column vaule as a URL. {@code null} if the column value is SQL {@code NULL}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public URL getURL(String columnName) throws SQLException;
@@ -1217,15 +1110,13 @@
* generated by {@code ResultSet} method calls - warnings generated by
* Statement methods are held by the Statement.
* <p>
- * </p>
* An {@code SQLException} is generated if this method is called on a closed
- * {@code ResultSet}. </p>
+ * {@code ResultSet}.
*
* @return an SQLWarning which is the first warning for this {@code
* ResultSet}. {@code null} if there are no warnings.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public SQLWarning getWarnings() throws SQLException;
@@ -1239,7 +1130,6 @@
* cursor not being on the Insert Row or if any columns in the
* row do not have a value where the column is declared as
* not-nullable.
- * @since Android 1.0
*/
public void insertRow() throws SQLException;
@@ -1251,7 +1141,6 @@
* in the {@code ResultSet}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean isAfterLast() throws SQLException;
@@ -1263,7 +1152,6 @@
* in the {@code ResultSet}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean isBeforeFirst() throws SQLException;
@@ -1275,7 +1163,6 @@
* in the {@code ResultSet}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean isFirst() throws SQLException;
@@ -1287,7 +1174,6 @@
* in the {@code ResultSet}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean isLast() throws SQLException;
@@ -1298,7 +1184,6 @@
* false} if the {@code ResultSet} contains no rows.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean last() throws SQLException;
@@ -1309,7 +1194,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void moveToCurrentRow() throws SQLException;
@@ -1321,7 +1205,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void moveToInsertRow() throws SQLException;
@@ -1330,14 +1213,12 @@
* <p>
* Any input streams associated with the current row are closed and any
* warnings are cleared.
- * </p>
- *
+ *
* @return {@code true} if the updated cursor position is pointing to a
* valid row, {@code false} otherwise (i.e. when the cursor is after
* the last row in the {@code ResultSet}).
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean next() throws SQLException;
@@ -1349,7 +1230,6 @@
* false} if the cursor is now before the first row.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean previous() throws SQLException;
@@ -1360,12 +1240,10 @@
* If any columns in the current row have been updated but the {@code
* updateRow} has not been called, then the updates are lost when this
* method is called.
- * </p>
- *
+ *
* @throws SQLException
* if a database error happens., including if the current row is
* the Insert row.
- * @since Android 1.0
*/
public void refreshRow() throws SQLException;
@@ -1381,7 +1259,6 @@
* false} otherwise
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean relative(int rows) throws SQLException;
@@ -1393,7 +1270,6 @@
* detected, {@code false} otherwise.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean rowDeleted() throws SQLException;
@@ -1406,7 +1282,6 @@
* detected, {@code false} otherwise.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean rowInserted() throws SQLException;
@@ -1418,7 +1293,6 @@
* can be detected, {@code false} otherwise.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean rowUpdated() throws SQLException;
@@ -1432,7 +1306,6 @@
* ResultSet.FETCH_REVERSE}, or {@code ResultSet.FETCH_UNKNOWN}
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public void setFetchDirection(int direction) throws SQLException;
@@ -1449,7 +1322,6 @@
* ResultSet}.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void setFetchSize(int rows) throws SQLException;
@@ -1463,7 +1335,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateArray(int columnIndex, Array x) throws SQLException;
@@ -1477,7 +1348,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateArray(String columnName, Array x) throws SQLException;
@@ -1492,7 +1362,6 @@
* the length of the data to write from the stream
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateAsciiStream(int columnIndex, InputStream x, int length)
throws SQLException;
@@ -1508,7 +1377,6 @@
* the length of the data to write from the stream
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateAsciiStream(String columnName, InputStream x, int length)
throws SQLException;
@@ -1523,7 +1391,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBigDecimal(int columnIndex, BigDecimal x)
throws SQLException;
@@ -1538,7 +1405,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBigDecimal(String columnName, BigDecimal x)
throws SQLException;
@@ -1554,7 +1420,6 @@
* the number of bytes to be read from the the stream.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBinaryStream(int columnIndex, InputStream x, int length)
throws SQLException;
@@ -1570,7 +1435,6 @@
* he number of bytes to be read from the the stream.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBinaryStream(String columnName, InputStream x, int length)
throws SQLException;
@@ -1585,7 +1449,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBlob(int columnIndex, Blob x) throws SQLException;
@@ -1599,7 +1462,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBlob(String columnName, Blob x) throws SQLException;
@@ -1613,7 +1475,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBoolean(int columnIndex, boolean x) throws SQLException;
@@ -1626,7 +1487,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBoolean(String columnName, boolean x) throws SQLException;
@@ -1639,7 +1499,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateByte(int columnIndex, byte x) throws SQLException;
@@ -1652,7 +1511,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateByte(String columnName, byte x) throws SQLException;
@@ -1666,7 +1524,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBytes(int columnIndex, byte[] x) throws SQLException;
@@ -1679,7 +1536,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateBytes(String columnName, byte[] x) throws SQLException;
@@ -1695,7 +1551,6 @@
* the length of data to write from the stream
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateCharacterStream(int columnIndex, Reader x, int length)
throws SQLException;
@@ -1712,7 +1567,6 @@
* the length of data to write from the Reader
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateCharacterStream(String columnName, Reader reader,
int length) throws SQLException;
@@ -1727,7 +1581,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateClob(int columnIndex, Clob x) throws SQLException;
@@ -1741,7 +1594,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateClob(String columnName, Clob x) throws SQLException;
@@ -1755,7 +1607,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateDate(int columnIndex, Date x) throws SQLException;
@@ -1769,7 +1620,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateDate(String columnName, Date x) throws SQLException;
@@ -1782,7 +1632,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateDouble(int columnIndex, double x) throws SQLException;
@@ -1795,7 +1644,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateDouble(String columnName, double x) throws SQLException;
@@ -1808,7 +1656,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateFloat(int columnIndex, float x) throws SQLException;
@@ -1821,7 +1668,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateFloat(String columnName, float x) throws SQLException;
@@ -1834,7 +1680,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateInt(int columnIndex, int x) throws SQLException;
@@ -1847,7 +1692,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateInt(String columnName, int x) throws SQLException;
@@ -1860,7 +1704,6 @@
* the new value for the specified column..
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateLong(int columnIndex, long x) throws SQLException;
@@ -1873,7 +1716,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateLong(String columnName, long x) throws SQLException;
@@ -1884,7 +1726,6 @@
* the index of the column to update.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateNull(int columnIndex) throws SQLException;
@@ -1895,7 +1736,6 @@
* the name of the column to update.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateNull(String columnName) throws SQLException;
@@ -1909,7 +1749,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateObject(int columnIndex, Object x) throws SQLException;
@@ -1927,7 +1766,6 @@
* after the decimal point.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateObject(int columnIndex, Object x, int scale)
throws SQLException;
@@ -1941,7 +1779,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateObject(String columnName, Object x) throws SQLException;
@@ -1958,7 +1795,6 @@
* after the decimal point.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateObject(String columnName, Object x, int scale)
throws SQLException;
@@ -1973,7 +1809,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateRef(int columnIndex, Ref x) throws SQLException;
@@ -1987,7 +1822,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateRef(String columnName, Ref x) throws SQLException;
@@ -1997,7 +1831,6 @@
*
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateRow() throws SQLException;
@@ -2010,7 +1843,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateShort(int columnIndex, short x) throws SQLException;
@@ -2023,7 +1855,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateShort(String columnName, short x) throws SQLException;
@@ -2036,7 +1867,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateString(int columnIndex, String x) throws SQLException;
@@ -2049,7 +1879,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateString(String columnName, String x) throws SQLException;
@@ -2062,7 +1891,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateTime(int columnIndex, Time x) throws SQLException;
@@ -2075,7 +1903,6 @@
* the new value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateTime(String columnName, Time x) throws SQLException;
@@ -2089,7 +1916,6 @@
* the new timestamp value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateTimestamp(int columnIndex, Timestamp x)
throws SQLException;
@@ -2103,7 +1929,6 @@
* the new timestamp value for the specified column.
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public void updateTimestamp(String columnName, Timestamp x)
throws SQLException;
@@ -2116,7 +1941,6 @@
* NULL}, {@code false} otherwise
* @throws SQLException
* if a database error happens.
- * @since Android 1.0
*/
public boolean wasNull() throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/ResultSetMetaData.java b/libcore/sql/src/main/java/java/sql/ResultSetMetaData.java
index 95c515d..097093f 100644
--- a/libcore/sql/src/main/java/java/sql/ResultSetMetaData.java
+++ b/libcore/sql/src/main/java/java/sql/ResultSetMetaData.java
@@ -19,29 +19,21 @@
/**
* Provides information about the columns returned in a {@code ResultSet}.
- *
- * @since Android 1.0
*/
public interface ResultSetMetaData {
/**
* Indicates that a column cannot contain {@code NULL} values.
- *
- * @since Android 1.0
*/
public static final int columnNoNulls = 0;
/**
* Indicates that a column can contain {@code NULL} values.
- *
- * @since Android 1.0
*/
public static final int columnNullable = 1;
/**
* Indicates that it is unknown whether a column can contain {@code NULL}s or not.
- *
- * @since Android 1.0
*/
public static final int columnNullableUnknown = 2;
@@ -53,7 +45,6 @@
* @return the catalog title.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getCatalogName(int column) throws SQLException;
@@ -67,7 +58,6 @@
* @throws SQLException
* if there is a database error.
* @see ResultSet#getObject
- * @since Android 1.0
*/
public String getColumnClassName(int column) throws SQLException;
@@ -77,7 +67,6 @@
* @return the column count.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int getColumnCount() throws SQLException;
@@ -90,7 +79,6 @@
* @return the column's max width.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int getColumnDisplaySize(int column) throws SQLException;
@@ -103,7 +91,6 @@
* @return the column's title.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getColumnLabel(int column) throws SQLException;
@@ -115,7 +102,6 @@
* @return the column title.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getColumnName(int column) throws SQLException;
@@ -128,7 +114,6 @@
* @throws SQLException
* if there is a database error.
* @see Types
- * @since Android 1.0
*/
public int getColumnType(int column) throws SQLException;
@@ -140,7 +125,6 @@
* @return the type name.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getColumnTypeName(int column) throws SQLException;
@@ -152,7 +136,6 @@
* @return the precision.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int getPrecision(int column) throws SQLException;
@@ -165,7 +148,6 @@
* @return number of decimal places.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int getScale(int column) throws SQLException;
@@ -177,7 +159,6 @@
* @return the name of the columns schema.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getSchemaName(int column) throws SQLException;
@@ -189,7 +170,6 @@
* @return the table title.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String getTableName(int column) throws SQLException;
@@ -203,7 +183,6 @@
* otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isAutoIncrement(int column) throws SQLException;
@@ -216,7 +195,6 @@
* @return {@code true} if case matters, {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isCaseSensitive(int column) throws SQLException;
@@ -228,7 +206,6 @@
* @return {@code true} if it is a monetary value, {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isCurrency(int column) throws SQLException;
@@ -241,7 +218,6 @@
* @return {@code true} if the write is guaranteed, {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isDefinitelyWritable(int column) throws SQLException;
@@ -253,7 +229,6 @@
* @return {@code true} if it is nullable, {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int isNullable(int column) throws SQLException;
@@ -266,7 +241,6 @@
* @return {@code true} if the column is read-only, {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isReadOnly(int column) throws SQLException;
@@ -279,7 +253,6 @@
* otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isSearchable(int column) throws SQLException;
@@ -292,7 +265,6 @@
* @return {@code true} if they are signed, {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isSigned(int column) throws SQLException;
@@ -305,7 +277,6 @@
* @return {@code true} if it is possible to write, {@code false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean isWritable(int column) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/SQLData.java b/libcore/sql/src/main/java/java/sql/SQLData.java
index cae9d15..f7dba05 100644
--- a/libcore/sql/src/main/java/java/sql/SQLData.java
+++ b/libcore/sql/src/main/java/java/sql/SQLData.java
@@ -31,7 +31,7 @@
* and can store changes back into the database using the
* {@link PreparedStatement#setObject} method which performs the reverse mapping
* into the SQL {@code UDT}.
- * </p>
+ * <p>
* Normally the implementation of a custom mapping is generated by
* a tool requiring the name of the SQL {@code UDT}, the name
* of the class which it is going to be mapped to, and the field names to which
@@ -44,9 +44,6 @@
* Ordinarily an application would not call {@code SQLData} methods directly.
* Similarly {@code SQLInput} and {@code SQLOutput} methods are not usually
* called directly.
- * </p>
- *
- * @since Android 1.0
*/
public interface SQLData {
@@ -59,7 +56,6 @@
* {@code readSQL} when the object was created.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public String getSQLTypeName() throws SQLException;
@@ -78,12 +74,10 @@
* distinct, then read its only data entry. For structured types, read every
* entry.</li>
* </ul>
- * </p>
* <p>
* The supplied input stream is typically initialized by the calling JDBC
* driver with the type map before {@code readSQL} is called.
- * </p>
- *
+ *
* @param stream
* the {@code SQLInput} stream from which the type map data is
* read for the custom mapping.
@@ -92,7 +86,6 @@
* @throws SQLException
* if a database error occurs.
* @see SQLInput
- * @since Android 1.0
*/
public void readSQL(SQLInput stream, String typeName) throws SQLException;
@@ -109,7 +102,6 @@
* Write a single data element for a distinct type. For a structured type,
* write a value for each attribute of the the SQL type.</li>
* </ul>
- * </p>
*
* @param stream
* the {@code SQLOutput} stream to use to write out the data for
@@ -117,7 +109,6 @@
* @throws SQLException
* if a database error occurs.
* @see SQLOutput
- * @since Android 1.0
*/
public void writeSQL(SQLOutput stream) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/SQLException.java b/libcore/sql/src/main/java/java/sql/SQLException.java
index 2cea139..5022eb0 100644
--- a/libcore/sql/src/main/java/java/sql/SQLException.java
+++ b/libcore/sql/src/main/java/java/sql/SQLException.java
@@ -38,11 +38,8 @@
* <li>A chain to a next {@code Exception}, if relevant, which can give access
* to additional error information.</li>
* </ul>
- * </p>
*
* @see DatabaseMetaData
- *
- * @since Android 1.0
*/
public class SQLException extends Exception implements Serializable {
@@ -84,7 +81,6 @@
* the string to use as the reason string.
* @param theSQLState
* the string to use as the {@code SQLState} string.
- * @since Android 1.0
*/
public SQLException(String theReason, String theSQLState) {
this(theReason, theSQLState, 0);
@@ -102,7 +98,6 @@
* the string to use as the {@code SQLState} string.
* @param theErrorCode
* the integer value for the error code.
- * @since Android 1.0
*/
public SQLException(String theReason, String theSQLState, int theErrorCode) {
super(theReason);
@@ -115,7 +110,6 @@
*
* @return The integer error code for this {@code SQLException}. The meaning
* of the code is specific to the vendor of the database.
- * @since Android 1.0
*/
public int getErrorCode() {
return vendorCode;
@@ -156,7 +150,6 @@
* @param ex
* the new {@code SQLException} to be added to the end of the
* chain.
- * @since Android 1.0
*/
public void setNextException(SQLException ex) {
if (next != null) {
diff --git a/libcore/sql/src/main/java/java/sql/SQLInput.java b/libcore/sql/src/main/java/java/sql/SQLInput.java
index b72c839..cd77a91 100644
--- a/libcore/sql/src/main/java/java/sql/SQLInput.java
+++ b/libcore/sql/src/main/java/java/sql/SQLInput.java
@@ -32,7 +32,7 @@
* application programmers do not normally use the {@code SQLInput} methods
* directly. Reader methods such as {@code readLong} and {@code readBytes}
* provide means to read values from an {@code SQLInput} stream.
- * </p><p>
+ * <p>
* When the {@code getObject} method is called with an object which implements
* the {@code SQLData} interface, the JDBC driver determines the SQL type of the
* UDT being mapped by calling the {@code SQLData.getSQLType} method. The driver
@@ -40,11 +40,8 @@
* the attributes of the UDT. The {@code SQLInput} stream is passed to the
* {@code SQLData.readSQL} method which then calls the {@code SQLInput} reader
* methods to read the attributes.
- * </p>
- *
+ *
* @see SQLData
- *
- * @since Android 1.0
*/
public interface SQLInput {
@@ -55,7 +52,6 @@
*
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public String readString() throws SQLException;
@@ -67,7 +63,6 @@
* value is SQL {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean readBoolean() throws SQLException;
@@ -78,7 +73,6 @@
* {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public byte readByte() throws SQLException;
@@ -89,7 +83,6 @@
* {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public short readShort() throws SQLException;
@@ -100,7 +93,6 @@
* {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public int readInt() throws SQLException;
@@ -111,7 +103,6 @@
* {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public long readLong() throws SQLException;
@@ -122,7 +113,6 @@
* {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public float readFloat() throws SQLException;
@@ -133,7 +123,6 @@
* {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public double readDouble() throws SQLException;
@@ -146,7 +135,6 @@
* @throws SQLException
* if there is a database error.
* @see java.math.BigDecimal
- * @since Android 1.0
*/
public BigDecimal readBigDecimal() throws SQLException;
@@ -157,7 +145,6 @@
* SQL {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public byte[] readBytes() throws SQLException;
@@ -170,7 +157,6 @@
* @throws SQLException
* if there is a database error.
* @see Date
- * @since Android 1.0
*/
public Date readDate() throws SQLException;
@@ -183,7 +169,6 @@
* @throws SQLException
* if there is a database error.
* @see Time
- * @since Android 1.0
*/
public Time readTime() throws SQLException;
@@ -196,7 +181,6 @@
* @throws SQLException
* if there is a database error.
* @see Timestamp
- * @since Android 1.0
*/
public Timestamp readTimestamp() throws SQLException;
@@ -209,7 +193,6 @@
* @throws SQLException
* if there is a database error.
* @see java.io.Reader
- * @since Android 1.0
*/
public Reader readCharacterStream() throws SQLException;
@@ -222,7 +205,6 @@
* @throws SQLException
* if there is a database error.
* @see java.io.InputStream
- * @since Android 1.0
*/
public InputStream readAsciiStream() throws SQLException;
@@ -235,7 +217,6 @@
* @throws SQLException
* if there is a database error.
* @see java.io.InputStream
- * @since Android 1.0
*/
public InputStream readBinaryStream() throws SQLException;
@@ -247,20 +228,17 @@
* for this JDBC driver, including any customized mappings, if present. A
* type map is given to the {@code SQLInput} by the JDBC driver before the
* {@code SQLInput} is given to the application.
- * </p>
* <p>
* If the attribute is an SQL structured or distinct type, its SQL type is
* determined. If the stream's type map contains an element for that SQL
* type, the driver creates an object for the relevant type and invokes the
* method {@code SQLData.readSQL} on it, which reads supplementary data from
* the stream using whichever protocol is defined for that method.
- * </p>
*
* @return the next attribute as an Object. {@code null} if the value is SQL
* {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Object readObject() throws SQLException;
@@ -273,7 +251,6 @@
* @throws SQLException
* if there is a database error.
* @see Ref
- * @since Android 1.0
*/
public Ref readRef() throws SQLException;
@@ -285,7 +262,6 @@
* the value is SQL {@code NULL}.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public Blob readBlob() throws SQLException;
@@ -298,7 +274,6 @@
* @throws SQLException
* if there is a database error.
* @see Clob
- * @since Android 1.0
*/
public Clob readClob() throws SQLException;
@@ -311,7 +286,6 @@
* @throws SQLException
* if there is a database error.
* @see Array
- * @since Android 1.0
*/
public Array readArray() throws SQLException;
@@ -322,7 +296,6 @@
* false} otherwise.
* @throws SQLException
* if there is a database error.
- * @since Android 1.0
*/
public boolean wasNull() throws SQLException;
@@ -335,7 +308,6 @@
* @throws SQLException
* if there is a database error.
* @see java.net.URL
- * @since Android 1.0
*/
public URL readURL() throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/SQLOutput.java b/libcore/sql/src/main/java/java/sql/SQLOutput.java
index 9fded5e..6710d4f 100644
--- a/libcore/sql/src/main/java/java/sql/SQLOutput.java
+++ b/libcore/sql/src/main/java/java/sql/SQLOutput.java
@@ -35,11 +35,8 @@
* the {@code SQLData.writeSQL} method, which in turn uses the appropriate
* {@code SQLOutput} writer methods to write the data from the {@code SQLData}
* object into the stream according to the defined mapping.
- * </p>
- *
+ *
* @see SQLData
- *
- * @since Android 1.0
*/
public interface SQLOutput {
@@ -50,7 +47,6 @@
* the {@code String} to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeString(String theString) throws SQLException;
@@ -61,7 +57,6 @@
* the {@code boolean} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeBoolean(boolean theFlag) throws SQLException;
@@ -72,7 +67,6 @@
* the {@code byte} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeByte(byte theByte) throws SQLException;
@@ -83,7 +77,6 @@
* the {@code short} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeShort(short theShort) throws SQLException;
@@ -94,7 +87,6 @@
* the {@code int} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeInt(int theInt) throws SQLException;
@@ -105,7 +97,6 @@
* the {@code long} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeLong(long theLong) throws SQLException;
@@ -116,7 +107,6 @@
* the {@code float} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeFloat(float theFloat) throws SQLException;
@@ -127,7 +117,6 @@
* the {@code double} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeDouble(double theDouble) throws SQLException;
@@ -138,7 +127,6 @@
* the {@code BigDecimal} value to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeBigDecimal(BigDecimal theBigDecimal) throws SQLException;
@@ -149,7 +137,6 @@
* the array of bytes to write.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeBytes(byte[] theBytes) throws SQLException;
@@ -161,7 +148,6 @@
* @throws SQLException
* if a database error occurs.
* @see Date
- * @since Android 1.0
*/
public void writeDate(Date theDate) throws SQLException;
@@ -173,7 +159,6 @@
* @throws SQLException
* if a database error occurs.
* @see Time
- * @since Android 1.0
*/
public void writeTime(Time theTime) throws SQLException;
@@ -185,7 +170,6 @@
* @throws SQLException
* if a database error occurs.
* @see Timestamp
- * @since Android 1.0
*/
public void writeTimestamp(Timestamp theTimestamp) throws SQLException;
@@ -197,7 +181,6 @@
* java.io.Reader} object.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeCharacterStream(Reader theStream) throws SQLException;
@@ -209,7 +192,6 @@
* java.io.InputStream} object
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeAsciiStream(InputStream theStream) throws SQLException;
@@ -221,7 +203,6 @@
* object
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public void writeBinaryStream(InputStream theStream) throws SQLException;
@@ -229,21 +210,18 @@
* Write an {@code SQLData} object into the output stream.
* <p>
* If the {@code SQLData} object is null, writes {@code NULL} to the stream.
- * </p>
* <p>
* Otherwise, calls the {@code SQLData.writeSQL} method of the object, which
* writes the object's attributes to the stream by calling the appropriate
* SQLOutput writer methods for each attribute, in order. The order of the
* attributes is the order they are listed in the SQL definition of the User
* Defined Type.
- * </p>
*
* @param theObject
* the {@code SQLData} object to write.
* @throws SQLException
* if a database error occurs.
* @see SQLData
- * @since Android 1.0
*/
public void writeObject(SQLData theObject) throws SQLException;
@@ -255,7 +233,6 @@
* @throws SQLException
* if a database error occurs.
* @see Ref
- * @since Android 1.0
*/
public void writeRef(Ref theRef) throws SQLException;
@@ -267,7 +244,6 @@
* @throws SQLException
* if a database error occurs.
* @see Blob
- * @since Android 1.0
*/
public void writeBlob(Blob theBlob) throws SQLException;
@@ -279,7 +255,6 @@
* @throws SQLException
* if a database error occurs.
* @see Clob
- * @since Android 1.0
*/
public void writeClob(Clob theClob) throws SQLException;
@@ -291,7 +266,6 @@
* @throws SQLException
* if a database error occurs.
* @see Struct
- * @since Android 1.0
*/
public void writeStruct(Struct theStruct) throws SQLException;
@@ -303,7 +277,6 @@
* @throws SQLException
* if a database error occurs.
* @see Array
- * @since Android 1.0
*/
public void writeArray(Array theArray) throws SQLException;
@@ -315,7 +288,6 @@
* @throws SQLException
* if a database error occurs.
* @see java.net.URL
- * @since Android 1.0
*/
public void writeURL(URL theURL) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/SQLPermission.java b/libcore/sql/src/main/java/java/sql/SQLPermission.java
index a9f82d1..85dff72 100644
--- a/libcore/sql/src/main/java/java/sql/SQLPermission.java
+++ b/libcore/sql/src/main/java/java/sql/SQLPermission.java
@@ -31,11 +31,8 @@
* the {@code DriverManager.setLogStream} method. This is a potentially
* dangerous operation since the logging stream can contain sensitive
* information such as usernames and passwords.
- * </p>
*
* @see DriverManager
- *
- * @since Android 1.0
*/
public final class SQLPermission extends BasicPermission implements Guard,
Serializable {
diff --git a/libcore/sql/src/main/java/java/sql/SQLWarning.java b/libcore/sql/src/main/java/java/sql/SQLWarning.java
index de94da5..3ef67f5 100644
--- a/libcore/sql/src/main/java/java/sql/SQLWarning.java
+++ b/libcore/sql/src/main/java/java/sql/SQLWarning.java
@@ -23,8 +23,6 @@
/**
* An exception class that holds information about Database access warnings.
- *
- * @since Android 1.0
*/
public class SQLWarning extends SQLException implements Serializable {
@@ -34,8 +32,6 @@
* Creates an {@code SQLWarning} object. The reason string is set to {@code
* null}, the {@code SQLState} string is set to {@code null} and the error
* code is set to 0.
- *
- * @since Android 1.0
*/
public SQLWarning() {
super();
@@ -48,7 +44,6 @@
*
* @param theReason
* the reason why this warning is issued.
- * @since Android 1.0
*/
public SQLWarning(String theReason) {
super(theReason);
@@ -80,7 +75,6 @@
* the X/Open standard specifc error code.
* @param theErrorCode
* a vendor specific error code.
- * @since Android 1.0
*/
public SQLWarning(String theReason, String theSQLState, int theErrorCode) {
super(theReason, theSQLState, theErrorCode);
@@ -92,7 +86,6 @@
* @return the {@code SQLWarning} chained to this {@code SQLWarning}.
* {@code null} if no {@code SQLWarning} is chained to this {@code
* SQLWarning}.
- * @since Android 1.0
*/
public SQLWarning getNextWarning() {
SQLException next = super.getNextException();
@@ -110,7 +103,6 @@
*
* @param w
* the {@code SQLWarning} linked to this {@code SQLWarning}.
- * @since Android 1.0
*/
public void setNextWarning(SQLWarning w) {
super.setNextException(w);
diff --git a/libcore/sql/src/main/java/java/sql/Savepoint.java b/libcore/sql/src/main/java/java/sql/Savepoint.java
index 42b4a17..0c65515 100644
--- a/libcore/sql/src/main/java/java/sql/Savepoint.java
+++ b/libcore/sql/src/main/java/java/sql/Savepoint.java
@@ -22,8 +22,6 @@
* by a rollback via the {@link Connection#rollback} command. Rolling back to a
* particular savepoint means that all changes that occurred after that
* savepoint are undone.
- *
- * @since Android 1.0
*/
public interface Savepoint {
@@ -33,7 +31,6 @@
* @return the ID for this savepoint.
* @throws SQLException
* if an error occurrs accessing the database.
- * @since Android 1.0
*/
public int getSavepointId() throws SQLException;
@@ -43,7 +40,6 @@
* @return the name of this savepoint.
* @throws SQLException
* if an error occurrs accessing the database.
- * @since Android 1.0
*/
public String getSavepointName() throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/Statement.java b/libcore/sql/src/main/java/java/sql/Statement.java
index 4985a9e..6f2a1ed 100644
--- a/libcore/sql/src/main/java/java/sql/Statement.java
+++ b/libcore/sql/src/main/java/java/sql/Statement.java
@@ -27,70 +27,52 @@
* <p>
* To have multiple {@code ResultSet} objects opened concurrently, multiple
* {@code Statement} objects must be created and then executed.
- * </p>
* <p>
* To obtain such an executable statement one needs to invoke {@code
* Connection#createStatement}.
- * </p>
- *
+ *
* @see ResultSet
* @see Connection#createStatement
- *
- * @since Android 1.0
*/
public interface Statement {
/**
* Passing this constant to {@link #getMoreResults} implies that all {@code
* ResultSet} objects previously kept open should be closed.
- *
- * @since Android 1.0
*/
public static final int CLOSE_ALL_RESULTS = 3;
/**
* Passing this constant to {@link #getMoreResults} implies that the current
* {@code ResultSet} object should be closed.
- *
- * @since Android 1.0
*/
public static final int CLOSE_CURRENT_RESULT = 1;
/**
* Indicates that an error was encountered during execution of a batch
* statement.
- *
- * @since Android 1.0
*/
public static final int EXECUTE_FAILED = -3;
/**
* Passing this constant to <i>getMoreResults</i> implies that the current
* {@code ResultSet} object should not be closed.
- *
- * @since Android 1.0
*/
public static final int KEEP_CURRENT_RESULT = 2;
/**
* Indicates that generated keys should not be accessible for retrieval.
- *
- * @since Android 1.0
*/
public static final int NO_GENERATED_KEYS = 2;
/**
* Indicates that generated keys should be accessible for retrieval.
- *
- * @since Android 1.0
*/
public static final int RETURN_GENERATED_KEYS = 1;
/**
* Indicates that a batch statement was executed with a successful result,
* but a count of the number of rows it affected is unavailable.
- *
- * @since Android 1.0
*/
public static final int SUCCESS_NO_INFO = -2;
@@ -100,15 +82,13 @@
* <p>
* The list of commands is executed by invoking the {@code executeBatch}
* method.
- * </p>
- *
+ *
* @param sql
* the SQL command as a String. Typically an {@code INSERT} or
* {@code UPDATE} statement.
* @throws SQLException
* if an error occurs accessing the database or the database
* does not support batch updates.
- * @since Android 1.0
*/
public void addBatch(String sql) throws SQLException;
@@ -120,7 +100,6 @@
*
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void cancel() throws SQLException;
@@ -130,7 +109,6 @@
* @throws SQLException
* if an error occurs accessing the database or the database
* does not support batch updates.
- * @since Android 1.0
*/
public void clearBatch() throws SQLException;
@@ -139,7 +117,6 @@
*
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void clearWarnings() throws SQLException;
@@ -148,13 +125,11 @@
* <p>
* Using this method to release these resources as soon as possible is
* strongly recommended.
- * </p>
* <p>
* One should not rely on the resources being automatically released when
* finalized during garbage collection. Doing so can result in unpredictable
* behavior for the application.
- * </p>
- *
+ *
* @throws SQLException
* if an error occurs accessing the database.
*/
@@ -166,8 +141,7 @@
* <p>
* Use the {@code getResultSet} or {@code getUpdateCount} methods to get the
* first result and {@code getMoreResults} to get any subsequent results.
- * </p>
- *
+ *
* @param sql
* the SQL statement to execute
* @return {@code true} if the first result is a {@code ResultSet}, {@code
@@ -175,7 +149,6 @@
* result.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public boolean execute(String sql) throws SQLException;
@@ -187,8 +160,7 @@
* <p>
* Use the {@code getResultSet} or {@code getUpdateCount} methods to get the
* first result and {@code getMoreResults} to get any subsequent results.
- * </p>
- *
+ *
* @param sql
* the SQL statement to execute.
* @param autoGeneratedKeys
@@ -201,7 +173,6 @@
* or if there is no result.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public boolean execute(String sql, int autoGeneratedKeys)
throws SQLException;
@@ -214,8 +185,7 @@
* <p>
* Use the {@code getResultSet} or {@code getUpdateCount} methods to get the
* first result and {@code getMoreResults} to get any subsequent results.
- * </p>
- *
+ *
* @param sql
* the SQL statement to execute.
* @param columnIndexes
@@ -227,7 +197,6 @@
* result.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public boolean execute(String sql, int[] columnIndexes) throws SQLException;
@@ -239,8 +208,7 @@
* <p>
* Use the {@code getResultSet} or {@code getUpdateCount} methods to get the
* first result and {@code getMoreResults} to get any subsequent results.
- * </p>
- *
+ *
* @param sql
* the SQL statement to execute.
* @param columnNames
@@ -252,7 +220,6 @@
* result
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public boolean execute(String sql, String[] columnNames)
throws SQLException;
@@ -300,7 +267,6 @@
* @throws SQLException
* if an error occurs accessing the database or if the statement
* produces anything other than a single {@code ResultSet}.
- * @since Android 1.0
*/
public ResultSet executeQuery(String sql) throws SQLException;
@@ -317,7 +283,6 @@
* @throws SQLException
* if an error occurs accessing the database or if the statement
* produces a {@code ResultSet}.
- * @since Android 1.0
*/
public int executeUpdate(String sql) throws SQLException;
@@ -339,7 +304,6 @@
* @throws SQLException
* if an error occurs accessing the database or if the statement
* produces a {@code ResultSet}.
- * @since Android 1.0
*/
public int executeUpdate(String sql, int autoGeneratedKeys)
throws SQLException;
@@ -360,7 +324,6 @@
* @throws SQLException
* if an error occurs accessing the database or if the statement
* produces a {@code ResultSet}.
- * @since Android 1.0
*/
public int executeUpdate(String sql, int[] columnIndexes)
throws SQLException;
@@ -381,7 +344,6 @@
* @throws SQLException
* if an error occurs accessing the database or if the statement
* produces a {@code ResultSet}.
- * @since Android 1.0
*/
public int executeUpdate(String sql, String[] columnNames)
throws SQLException;
@@ -393,7 +355,6 @@
* transmitted to the database.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public Connection getConnection() throws SQLException;
@@ -408,7 +369,6 @@
* </ul>
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getFetchDirection() throws SQLException;
@@ -420,7 +380,6 @@
* statement.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getFetchSize() throws SQLException;
@@ -431,7 +390,6 @@
* no keys are generated by this statement.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public ResultSet getGeneratedKeys() throws SQLException;
@@ -447,7 +405,6 @@
* limit.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getMaxFieldSize() throws SQLException;
@@ -460,7 +417,6 @@
* limit.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getMaxRows() throws SQLException;
@@ -476,7 +432,6 @@
* return -1.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public boolean getMoreResults() throws SQLException;
@@ -499,7 +454,6 @@
* will return -1.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public boolean getMoreResults(int current) throws SQLException;
@@ -512,7 +466,6 @@
* there is no current timeout.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getQueryTimeout() throws SQLException;
@@ -523,7 +476,6 @@
* result is an update count or if there are no more results.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public ResultSet getResultSet() throws SQLException;
@@ -535,7 +487,6 @@
* ResultSet.CONCUR_UPDATABLE}.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getResultSetConcurrency() throws SQLException;
@@ -547,7 +498,6 @@
* ResultSet.CLOSE_CURSORS_AT_COMMIT}
* @throws SQLException
* if there is an error while accessing the database.
- * @since Android 1.0
*/
public int getResultSetHoldability() throws SQLException;
@@ -563,7 +513,6 @@
* which is scrollable but is sensitive to changes made by others.
* @throws SQLException
* if there is an error accessing the database.
- * @since Android 1.0
*/
public int getResultSetType() throws SQLException;
@@ -575,7 +524,6 @@
* result is a {@code ResultSet} or if there are no more results.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getUpdateCount() throws SQLException;
@@ -588,12 +536,10 @@
* Warnings associated with reads from the {@code ResultSet} returned from
* executing the statement will be attached to the {@code ResultSet}, not the
* statement object.
- * </p>
- *
+ *
* @return an SQLWarning, null if there are no warnings
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public SQLWarning getWarnings() throws SQLException;
@@ -602,19 +548,16 @@
* execute methods.
* <p>
* Cursor names must be unique within one Connection.
- * </p>
* <p>
* With the cursor name set, it can then be used in SQL positioned
* update or delete statements to determine the current row in a {@code
* ResultSet} generated from this statement. The positioned update or delete
* must be done with a different statement than this one.
- * </p>
- *
+ *
* @param name
* the Cursor name as a string,
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setCursorName(String name) throws SQLException;
@@ -625,14 +568,12 @@
* on an SQL statement before sending it for execution. This does not apply
* to {@link PreparedStatement}s since they are processed when created,
* before this method can be called.
- * </p>
- *
+ *
* @param enable
* {@code true} to set escape processing mode <i>on</i>, {@code
* false} to turn it <i>off</i>.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setEscapeProcessing(boolean enable) throws SQLException;
@@ -666,7 +607,6 @@
* @throws SQLException
* if an error occurs accessing the database, or if the rows
* parameter is out of range.
- * @since Android 1.0
*/
public void setFetchSize(int rows) throws SQLException;
@@ -682,7 +622,6 @@
* @throws SQLException
* if an error occurs accessing the database or the {@code max}
* value is < {@code 0}.
- * @since Android 1.0
*/
public void setMaxFieldSize(int max) throws SQLException;
@@ -696,7 +635,6 @@
* @throws SQLException
* if an error occurs accessing the database or if max < {@code
* 0}.
- * @since Android 1.0
*/
public void setMaxRows(int max) throws SQLException;
@@ -710,7 +648,6 @@
* @throws SQLException
* if an error occurs accessing the database or if seconds <
* {@code 0}.
- * @since Android 1.0
*/
public void setQueryTimeout(int seconds) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/java/sql/Struct.java b/libcore/sql/src/main/java/java/sql/Struct.java
index 1167cdf..4d94d49 100644
--- a/libcore/sql/src/main/java/java/sql/Struct.java
+++ b/libcore/sql/src/main/java/java/sql/Struct.java
@@ -23,8 +23,6 @@
* An interface which provides facilities for manipulating an SQL structured type
* as a Java object. The {@code Struct} object has a value for each attribute of the SQL structured
* type.
- *
- * @since Android 1.0
*/
public interface Struct {
@@ -35,7 +33,6 @@
* @return the fully qualified name of SQL structured type.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public String getSQLTypeName() throws SQLException;
@@ -49,7 +46,6 @@
* @return an {@code Object} array containing the ordered attributes.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Object[] getAttributes() throws SQLException;
@@ -66,7 +62,6 @@
* @return an Object array containing the ordered attributes,.
* @throws SQLException
* if a database error occurs.
- * @since Android 1.0
*/
public Object[] getAttributes(Map<String, Class<?>> theMap)
throws SQLException;
diff --git a/libcore/sql/src/main/java/java/sql/Time.java b/libcore/sql/src/main/java/java/sql/Time.java
index 7fb28e1..d522ef8 100644
--- a/libcore/sql/src/main/java/java/sql/Time.java
+++ b/libcore/sql/src/main/java/java/sql/Time.java
@@ -17,14 +17,11 @@
package java.sql;
-import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Java representation of an SQL {@code TIME} value. Provides utilities to
* format and parse the time's representation as a String in JDBC escape format.
- *
- * @since Android 1.0
*/
public class Time extends Date {
@@ -33,24 +30,22 @@
/**
* Constructs a {@code Time} object using the supplied values for <i>Hour</i>,
* <i>Minute</i> and <i>Second</i>. The <i>Year</i>, <i>Month</i> and
- * <i>Day</i> elements of the {@code Time} object are set to the date
+ * <i>Day</i> elements of the {@code Time} object are set to the date
* of the Epoch (January 1, 1970).
* <p>
* Any attempt to access the <i>Year</i>, <i>Month</i> or <i>Day</i>
* elements of a {@code Time} object will result in an {@code
* IllegalArgumentException}.
- * </p><p>
+ * <p>
* The result is undefined if any argument is out of bounds.
- * </p>
- *
- * @deprecated Please use the constructor {@link #Time(long)}.
+ *
+ * @deprecated Use the constructor {@link #Time(long)}.
* @param theHour
* a value in the range {@code [0,23]}.
* @param theMinute
* a value in the range {@code [0,59]}.
* @param theSecond
* a value in the range {@code [0,59]}.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -65,7 +60,6 @@
* @param theTime
* a {@code Time} specified in milliseconds since the
* <i>Epoch</i> (January 1st 1970, 00:00:00.000).
- * @since Android 1.0
*/
public Time(long theTime) {
super(theTime);
@@ -77,7 +71,6 @@
* @return does not return anything.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -92,7 +85,6 @@
* @return does not return anything.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -107,7 +99,6 @@
* @return does not return anything.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -122,7 +113,6 @@
* @return does not return anything.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -136,7 +126,6 @@
* {@code Time} object does not have a {@code Date} component.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -150,7 +139,6 @@
* {@code Time} object does not have a <i>Month</i> component.
* @throws IllegalArgumentException
* if this method is called.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -180,7 +168,6 @@
* A time value expressed as milliseconds since the <i>Epoch</i>.
* Negative values are milliseconds before the Epoch. The Epoch
* is January 1 1970, 00:00:00.000.
- * @since Android 1.0
*/
@Override
public void setTime(long time) {
@@ -193,12 +180,31 @@
*
* @return A String representing the {@code Time} value in JDBC escape
* format: {@code HH:mm:ss}
- * @since Android 1.0
*/
@Override
public String toString() {
- SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); //$NON-NLS-1$
- return dateFormat.format(this);
+ StringBuilder sb = new StringBuilder(8);
+
+ format(getHours(), 2, sb);
+ sb.append(':');
+ format(getMinutes(), 2, sb);
+ sb.append(':');
+ format(getSeconds(), 2, sb);
+
+ return sb.toString();
+ }
+
+ private static final String PADDING = "00"; //$NON-NLS-1$
+
+ /*
+ * Private method to format the time
+ */
+ private void format(int date, int digits, StringBuilder sb) {
+ String str = String.valueOf(date);
+ if (digits - str.length() > 0) {
+ sb.append(PADDING.substring(0, digits - str.length()));
+ }
+ sb.append(str);
}
/**
@@ -206,8 +212,7 @@
* JDBC escape format: {@code hh:mm:ss}.
* <p>
* An exception occurs if the input string does not comply with this format.
- * </p>
- *
+ *
* @param timeString
* A String representing the time value in JDBC escape format:
* {@code hh:mm:ss}.
@@ -215,7 +220,6 @@
* time.
* @throws IllegalArgumentException
* if the supplied time string is not in JDBC escape format.
- * @since Android 1.0
*/
public static Time valueOf(String timeString) {
if (timeString == null) {
@@ -223,18 +227,21 @@
}
int firstIndex = timeString.indexOf(':');
int secondIndex = timeString.indexOf(':', firstIndex + 1);
- // secondIndex == -1 means none or only one separator '-' has been found.
+ // secondIndex == -1 means none or only one separator '-' has been
+ // found.
// The string is separated into three parts by two separator characters,
// if the first or the third part is null string, we should throw
// IllegalArgumentException to follow RI
- if (secondIndex == -1|| firstIndex == 0 || secondIndex + 1 == timeString.length()) {
+ if (secondIndex == -1 || firstIndex == 0
+ || secondIndex + 1 == timeString.length()) {
throw new IllegalArgumentException();
}
// parse each part of the string
int hour = Integer.parseInt(timeString.substring(0, firstIndex));
- int minute = Integer.parseInt(timeString.substring(firstIndex + 1, secondIndex));
- int second = Integer.parseInt(timeString.substring(secondIndex + 1, timeString
- .length()));
+ int minute = Integer.parseInt(timeString.substring(firstIndex + 1,
+ secondIndex));
+ int second = Integer.parseInt(timeString.substring(secondIndex + 1,
+ timeString.length()));
return new Time(hour, minute, second);
}
}
diff --git a/libcore/sql/src/main/java/java/sql/Timestamp.java b/libcore/sql/src/main/java/java/sql/Timestamp.java
index b526fb3..f16d93a 100644
--- a/libcore/sql/src/main/java/java/sql/Timestamp.java
+++ b/libcore/sql/src/main/java/java/sql/Timestamp.java
@@ -17,10 +17,10 @@
package java.sql;
-import java.text.DecimalFormat;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.regex.Pattern;
import org.apache.harmony.sql.internal.nls.Messages;
@@ -32,18 +32,16 @@
* The {@code Timestamp} class consists of a regular date/time value, where only
* the integral seconds value is stored, plus a nanoseconds value where the
* fractional seconds are stored.
- * </p><p>
+ * <p>
* The addition of the nanosecond value field to the {@code Timestamp} object
* makes it significantly different from the {@code java.util.Date} object which
* it extends. Users should be aware that {@code Timestamp} objects are not
* interchangable with {@code java.util.Date} objects when used outside the
* confines of the {@code java.sql} package.
- * </p>
- *
+ *
* @see Date
* @see Time
* @see java.util.Date
- * @since Android 1.0
*/
public class Timestamp extends Date {
@@ -52,12 +50,15 @@
// The nanoseconds time value of the Timestamp
private int nanos;
+ // The regex pattern of yyyy-mm-dd hh:mm:ss
+ private static final String TIME_FORMAT_REGEX = "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.*"; //$NON-NLS-1$
+
/**
* Returns a {@code Timestamp} corresponding to the time specified by the
* supplied values for <i>Year</i>, <i>Month</i>, <i>Date</i>, <i>Hour</i>,
* <i>Minutes</i>, <i>Seconds</i> and <i>Nanoseconds</i>.
- *
- * @deprecated Please use the constructor {@link #Timestamp(long)}.
+ *
+ * @deprecated Use the constructor {@link #Timestamp(long)}.
* @param theYear
* specified as the year minus 1900.
* @param theMonth
@@ -75,7 +76,6 @@
* as an integer in the range [0,999'999'999]
* @throws IllegalArgumentException
* if any of the parameters is out of range.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Deprecated
@@ -96,7 +96,6 @@
* @param theTime
* a time value in the format of milliseconds since the Epoch
* (January 1 1970 00:00:00.000 GMT).
- * @since Android 1.0
*/
public Timestamp(long theTime) {
super(theTime);
@@ -104,7 +103,7 @@
* Now set the time for this Timestamp object - which deals with the
* nanosecond value as well as the base time
*/
- this.setTime(theTime);
+ setTimeImpl(theTime);
}
/**
@@ -115,7 +114,6 @@
* the timestamp to compare with this timestamp object.
* @return {@code true} if this {@code Timestamp} object is later than the
* supplied timestamp, {@code false} otherwise.
- * @since Android 1.0
*/
public boolean after(Timestamp theTimestamp) {
long thisTime = this.getTime();
@@ -148,7 +146,6 @@
* the timestamp to compare with this {@code Timestamp} object.
* @return {@code true} if this {@code Timestamp} object is earlier than the
* supplied timestamp, {@code false} otherwise.
- * @since Android 1.0
*/
public boolean before(Timestamp theTimestamp) {
long thisTime = this.getTime();
@@ -195,7 +192,6 @@
* </dd>
* @throws ClassCastException
* if the supplied object is not a {@code Timestamp} object.
- * @since Android 1.0
*/
@Override
public int compareTo(Date theObject) throws ClassCastException {
@@ -218,7 +214,6 @@
* <li> {@code > 0}, if this {@code Timestamp} object is after the
* supplied {@code Timestamp}</li>
* </ul>
- * @since Android 1.0
*/
public int compareTo(Timestamp theTimestamp) {
int result = super.compareTo(theTimestamp);
@@ -245,7 +240,6 @@
* supplied {@code Timestamp} object<br>{@code false} if the object
* is not a {@code Timestamp} object or if the object is a {@code
* Timestamp} but represents a different instant in time.
- * @since Android 1.0
*/
@Override
public boolean equals(Object theObject) {
@@ -263,7 +257,6 @@
* passed as an {@code Object}.
* @return {@code true} if this {@code Timestamp} object is equal to the
* supplied {@code Timestamp} object, {@code false} otherwise.
- * @since Android 1.0
*/
public boolean equals(Timestamp theTimestamp) {
if (theTimestamp == null) {
@@ -278,7 +271,6 @@
*
* @return The timestamp's nanosecond value, an integer between 0 and
* 999,999,999.
- * @since Android 1.0
*/
public int getNanos() {
return nanos;
@@ -288,10 +280,9 @@
* Returns the time represented by this {@code Timestamp} object, as a long
* value containing the number of milliseconds since the Epoch (January 1
* 1970, 00:00:00.000 GMT).
- *
+ *
* @return the number of milliseconds that have passed since January 1 1970,
* 00:00:00.000 GMT.
- * @since Android 1.0
*/
@Override
public long getTime() {
@@ -302,13 +293,12 @@
/**
* Sets the nanosecond value for this {@code Timestamp}.
- *
+ *
* @param n
* number of nanoseconds.
* @throws IllegalArgumentException
* if number of nanoseconds smaller than 0 or greater than
* 999,999,999.
- * @since Android 1.0
*/
public void setNanos(int n) throws IllegalArgumentException {
if ((n < 0) || (n > 999999999)) {
@@ -322,14 +312,17 @@
* Sets the time represented by this {@code Timestamp} object to the
* supplied time, defined as the number of milliseconds since the Epoch
* (January 1 1970, 00:00:00.000 GMT).
- *
+ *
* @param theTime
* number of milliseconds since the Epoch (January 1 1970,
* 00:00:00.000 GMT).
- * @since Android 1.0
*/
@Override
public void setTime(long theTime) {
+ setTimeImpl(theTime);
+ }
+
+ private void setTimeImpl(long theTime) {
/*
* Deal with the nanoseconds value. The supplied time is in milliseconds -
* so we must extract the milliseconds value and multiply by 1000000 to
@@ -356,67 +349,47 @@
*
* @return A string representing the instant defined by the {@code
* Timestamp}, in JDBC Timestamp escape format.
- * @since Android 1.0
*/
@SuppressWarnings("deprecation")
@Override
public String toString() {
- /*
- * Use a DecimalFormat to lay out the nanosecond value as a simple
- * string of 9 integers, with leading Zeros
- */
- DecimalFormat decimalFormat = new DecimalFormat("0"); //$NON-NLS-1$
- decimalFormat.setMinimumIntegerDigits(9);
- decimalFormat.setMaximumIntegerDigits(9);
- String theNanos = decimalFormat.format(nanos);
- theNanos = stripTrailingZeros(theNanos);
-
- String year = format((getYear() + 1900), 4);
- String month = format((getMonth() + 1), 2);
- String date = format(getDate(), 2);
- String hours = format(getHours(), 2);
- String minutes = format(getMinutes(), 2);
- String seconds = format(getSeconds(), 2);
+ StringBuilder sb = new StringBuilder(29);
- return year + '-' + month + '-' + date + ' ' + hours + ':' + minutes
- + ':' + seconds + '.' + theNanos;
- }
-
- /*
- * Private method to format the time
- */
- private String format(int date, int digits) {
- StringBuilder dateStringBuffer = new StringBuilder(String.valueOf(date));
- while (dateStringBuffer.length() < digits) {
- dateStringBuffer = dateStringBuffer.insert(0,'0');
- }
- return dateStringBuffer.toString();
- }
-
- /*
- * Private method to strip trailing '0' characters from a string. @param
- * inputString the starting string @return a string with the trailing zeros
- * stripped - will leave a single 0 at the beginning of the string
- */
- private String stripTrailingZeros(String inputString) {
- String finalString;
-
- int i;
- for (i = inputString.length(); i > 0; i--) {
- if (inputString.charAt(i - 1) != '0') {
- break;
- }
- /*
- * If the string has a 0 as its first character, return a string
- * with a single '0'
- */
- if (i == 1) {
- return "0"; //$NON-NLS-1$
+ format((getYear() + 1900), 4, sb);
+ sb.append('-');
+ format((getMonth() + 1), 2, sb);
+ sb.append('-');
+ format(getDate(), 2, sb);
+ sb.append(' ');
+ format(getHours(), 2, sb);
+ sb.append(':');
+ format(getMinutes(), 2, sb);
+ sb.append(':');
+ format(getSeconds(), 2, sb);
+ sb.append('.');
+ if (nanos == 0) {
+ sb.append('0');
+ } else {
+ format(nanos, 9, sb);
+ while (sb.charAt(sb.length() - 1) == '0') {
+ sb.setLength(sb.length() - 1);
}
}
- finalString = inputString.substring(0, i);
- return finalString;
+ return sb.toString();
+ }
+
+ private static final String PADDING = "000000000"; //$NON-NLS-1$
+
+ /*
+ * Private method to format the time
+ */
+ private void format(int date, int digits, StringBuilder sb) {
+ String str = String.valueOf(date);
+ if (digits - str.length() > 0) {
+ sb.append(PADDING.substring(0, digits - str.length()));
+ }
+ sb.append(str);
}
/**
@@ -431,7 +404,6 @@
* supplied {@code String}.
* @throws IllegalArgumentException
* if the provided string is {@code null}.
- * @since Android 1.0
*/
public static Timestamp valueOf(String s) throws IllegalArgumentException {
if (s == null) {
@@ -439,6 +411,12 @@
throw new IllegalArgumentException(Messages.getString("sql.3")); //$NON-NLS-1$
}
+ // omit trailing whitespaces
+ s = s.trim();
+ if (!Pattern.matches(TIME_FORMAT_REGEX, s)) {
+ throw new IllegalArgumentException(Messages.getString("sql.2")); //$NON-NLS-1$
+ }
+
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //$NON-NLS-1$
ParsePosition pp = new ParsePosition(0);
@@ -495,7 +473,8 @@
// Require the next character to be a "."
if (s.charAt(position) != '.') {
// sql.4=Bad input string format: expected '.' not {0}
- throw new NumberFormatException(Messages.getString("sql.4", s.charAt(position))); //$NON-NLS-1$
+ throw new NumberFormatException(Messages.getString(
+ "sql.4", s.charAt(position))); //$NON-NLS-1$
}
// Get the length of the number string - need to account for the '.'
int nanoLength = s.length() - position - 1;
diff --git a/libcore/sql/src/main/java/java/sql/Types.java b/libcore/sql/src/main/java/java/sql/Types.java
index 8ce0421..fed8671 100644
--- a/libcore/sql/src/main/java/java/sql/Types.java
+++ b/libcore/sql/src/main/java/java/sql/Types.java
@@ -21,8 +21,6 @@
* A class which defines constants used to identify generic SQL types, also
* called JDBC types. The type constant values are equivalent to those defined
* by X/OPEN.
- *
- * @since Android 1.0
*/
public class Types {
@@ -35,141 +33,101 @@
/**
* The type code that identifies the SQL type {@code ARRAY}.
- *
- * @since Android 1.0
*/
public static final int ARRAY = 2003;
/**
* The type code that identifies the SQL type {@code BIGINT}.
- *
- * @since Android 1.0
*/
public static final int BIGINT = -5;
/**
* The type code that identifies the SQL type {@code BINARY}.
- *
- * @since Android 1.0
*/
public static final int BINARY = -2;
/**
* The type code that identifies the SQL type {@code BIT}.
- *
- * @since Android 1.0
*/
public static final int BIT = -7;
/**
* The type code that identifies the SQL type {@code BLOB}.
- *
- * @since Android 1.0
*/
public static final int BLOB = 2004;
/**
* The type code that identifies the SQL type {@code BOOLEAN}.
- *
- * @since Android 1.0
*/
public static final int BOOLEAN = 16;
/**
* The type code that identifies the SQL type {@code CHAR}.
- *
- * @since Android 1.0
*/
public static final int CHAR = 1;
/**
* The type code that identifies the SQL type {@code CLOB}.
- *
- * @since Android 1.0
*/
public static final int CLOB = 2005;
/**
* The type code that identifies the SQL type {@code DATALINK}.
- *
- * @since Android 1.0
*/
public static final int DATALINK = 70;
/**
* The type code that identifies the SQL type {@code DATE}.
- *
- * @since Android 1.0
*/
public static final int DATE = 91;
/**
* The type code that identifies the SQL type {@code DECIMAL}.
- *
- * @since Android 1.0
*/
public static final int DECIMAL = 3;
/**
* The type code that identifies the SQL type {@code DISTINCT}.
- *
- * @since Android 1.0
*/
public static final int DISTINCT = 2001;
/**
* The type code that identifies the SQL type {@code DOUBLE}.
- *
- * @since Android 1.0
*/
public static final int DOUBLE = 8;
/**
* The type code that identifies the SQL type {@code FLOAT}.
- *
- * @since Android 1.0
*/
public static final int FLOAT = 6;
/**
* The type code that identifies the SQL type {@code INTEGER}.
- *
- * @since Android 1.0
*/
public static final int INTEGER = 4;
/**
* The type code that identifies the SQL type {@code JAVA_OBJECT}.
- *
- * @since Android 1.0
*/
public static final int JAVA_OBJECT = 2000;
/**
* The type code that identifies the SQL type {@code LONGVARBINARY}.
- *
- * @since Android 1.0
*/
public static final int LONGVARBINARY = -4;
/**
* The type code that identifies the SQL type {@code LONGVARCHAR}.
- *
- * @since Android 1.0
*/
public static final int LONGVARCHAR = -1;
/**
* The type code that identifies the SQL type {@code NULL}.
- *
- * @since Android 1.0
*/
public static final int NULL = 0;
/**
* The type code that identifies the SQL type {@code NUMERIC}.
- *
- * @since Android 1.0
*/
public static final int NUMERIC = 2;
@@ -177,71 +135,51 @@
* The type code that identifies that the SQL type is database specific and
* is mapped to a Java object, accessed via the methods
* {@code getObject} and {@code setObject}.
- *
- * @since Android 1.0
*/
public static final int OTHER = 1111;
/**
* The type code that identifies the SQL type {@code REAL}.
- *
- * @since Android 1.0
*/
public static final int REAL = 7;
/**
* The type code that identifies the SQL type {@code REF}.
- *
- * @since Android 1.0
*/
public static final int REF = 2006;
/**
* The type code that identifies the SQL type {@code SMALLINT}.
- *
- * @since Android 1.0
*/
public static final int SMALLINT = 5;
/**
* The type code that identifies the SQL type {@code STRUCT}.
- *
- * @since Android 1.0
*/
public static final int STRUCT = 2002;
/**
* The type code that identifies the SQL type {@code TIME}.
- *
- * @since Android 1.0
*/
public static final int TIME = 92;
/**
* The type code that identifies the SQL type {@code TIMESTAMP}.
- *
- * @since Android 1.0
*/
public static final int TIMESTAMP = 93;
/**
* The type code that identifies the SQL type {@code TINYINT}.
- *
- * @since Android 1.0
*/
public static final int TINYINT = -6;
/**
* The type code that identifies the SQL type {@code VARBINARY}.
- *
- * @since Android 1.0
*/
public static final int VARBINARY = -3;
/**
* The type code that identifies the SQL type {@code VARCHAR}.
- *
- * @since Android 1.0
*/
public static final int VARCHAR = 12;
}
diff --git a/libcore/sql/src/main/java/javax/sql/ConnectionEvent.java b/libcore/sql/src/main/java/javax/sql/ConnectionEvent.java
index e07e7c1..cce8a78 100644
--- a/libcore/sql/src/main/java/javax/sql/ConnectionEvent.java
+++ b/libcore/sql/src/main/java/javax/sql/ConnectionEvent.java
@@ -25,23 +25,20 @@
* Sent when specific events happen on a {@link PooledConnection} object. These
* events are a facility to report when an application closes the pooled
* connection or when an error occurs in the pooled connection.
- *
- * @since Android 1.0
*/
public class ConnectionEvent extends EventObject implements Serializable {
private static final long serialVersionUID = -4843217645290030002L;
- private SQLException theSQLException;
+ private SQLException ex;
/**
* Creates a connection event initialized with the supplied {@code
* PooledConnection} reporting that the application has closed the
* connection.
- *
+ *
* @param theConnection
* the connection for which this event is created.
- * @since Android 1.0
*/
public ConnectionEvent(PooledConnection theConnection) {
super(theConnection);
@@ -51,29 +48,27 @@
* Creates a {@code ConnectionEvent} initialized with the supplied {@code
* PooledConnection} and with the supplied {@code SQLException} indicating
* that an error has occurred within the {@code PooledConnection}.
- *
+ *
* @param theConnection
* the connection for which this event is created.
* @param theException
* information about the state of error that has occurred on the
* application side.
- * @since Android 1.0
*/
public ConnectionEvent(PooledConnection theConnection,
SQLException theException) {
super(theConnection);
- theSQLException = theException;
+ ex = theException;
}
/**
* Gets the {@code SQLException} which holds information about the error
* which occurred in the {@code PooledConnection}.
- *
+ *
* @return a {@code SQLException} containing information about the error.
* May be {@code null} if no error has occurred.
- * @since Android 1.0
*/
public SQLException getSQLException() {
- return theSQLException;
+ return ex;
}
}
diff --git a/libcore/sql/src/main/java/javax/sql/ConnectionEventListener.java b/libcore/sql/src/main/java/javax/sql/ConnectionEventListener.java
index 1333814..eec0d5b 100644
--- a/libcore/sql/src/main/java/javax/sql/ConnectionEventListener.java
+++ b/libcore/sql/src/main/java/javax/sql/ConnectionEventListener.java
@@ -27,13 +27,9 @@
* to a {@code ConnectionEventListener} either when the application closes a
* connection it has been using or when a significant error occurs while the
* connection is being used.
- * </p>
* <p>
* The connection pool manager can return closed connections to the pool for
* later reuse. Connections experiencing an error should be discarded.
- * </p>
- *
- * @since Android 1.0
*/
public interface ConnectionEventListener extends EventListener {
@@ -44,7 +40,6 @@
* @param theEvent
* a {@code ConnectionEvent} containing details about the source
* of the event.
- * @since Android 1.0
*/
public void connectionClosed(ConnectionEvent theEvent);
@@ -57,7 +52,6 @@
* @param theEvent
* a {@code ConnectionEvent} containing details about the source
* of the event and the {@code SQLException} that has occurred.
- * @since Android 1.0
*/
public void connectionErrorOccurred(ConnectionEvent theEvent);
}
diff --git a/libcore/sql/src/main/java/javax/sql/ConnectionPoolDataSource.java b/libcore/sql/src/main/java/javax/sql/ConnectionPoolDataSource.java
index d73128b..379fde0 100644
--- a/libcore/sql/src/main/java/javax/sql/ConnectionPoolDataSource.java
+++ b/libcore/sql/src/main/java/javax/sql/ConnectionPoolDataSource.java
@@ -27,9 +27,6 @@
* A class which implements the {@code ConnectionPoolDataSource} interface is
* typically registered with a JNDI naming service directory and is retrieved
* from there by name.
- * </p>
- *
- * @since Android 1.0
*/
public interface ConnectionPoolDataSource {
@@ -44,7 +41,6 @@
* @return the login timeout value in seconds.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public int getLoginTimeout() throws SQLException;
@@ -58,14 +54,12 @@
* created is {@code null}. Note that the log writer for an {@code
* ConnectionPoolDataSource} is not the same as the log writer used by a
* {@code DriverManager}.
- * </p>
- *
+ *
* @return a {@code PrintWriter} which is the log writer for this {@code
* ConnectionPoolDataSource}. Can be {@code null}, in which case log
* writing is disabled for this {@code ConnectionPoolDataSource}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public PrintWriter getLogWriter() throws SQLException;
@@ -77,7 +71,6 @@
* database.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public PooledConnection getPooledConnection() throws SQLException;
@@ -94,7 +87,6 @@
* to the database.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public PooledConnection getPooledConnection(String theUser,
String thePassword) throws SQLException;
@@ -111,7 +103,6 @@
* the new login timeout value in seconds.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setLoginTimeout(int theTimeout) throws SQLException;
@@ -125,13 +116,11 @@
* is {@code null}. Note that the log writer for a {@code
* ConnectionPoolDataSource} is not the same as the log writer used by a
* {@code DriverManager}.
- * </p>
*
* @param theWriter
* is the log writer for this {@code ConnectionPoolDataSource}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setLogWriter(PrintWriter theWriter) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/javax/sql/DataSource.java b/libcore/sql/src/main/java/javax/sql/DataSource.java
index 98be761..7f73947 100644
--- a/libcore/sql/src/main/java/javax/sql/DataSource.java
+++ b/libcore/sql/src/main/java/javax/sql/DataSource.java
@@ -29,12 +29,10 @@
* A class which implements the {@code DataSource} interface is typically
* registered with a JNDI naming service directory and is retrieved from there
* by name.
- * </p>
* <p>
* The {@code DataSource} interface is typically implemented by the writer of a
* JDBC driver. There are three variants of the {@code DataSource} interface,
* which produce connections with different characteristics:
- * </p>
* <ol>
* <li><i>Standard {@code DataSource}</i>: produces standard {@code Connection}
* objects with no special features.</li>
@@ -51,9 +49,6 @@
* Note that a JDBC driver which is accessed via the {@code DataSource}
* interface is loaded via a JNDI lookup process. A driver loaded in this way
* does not register itself with the {@code DriverManager}.
- * </p>
- *
- * @since Android 1.0
*/
public interface DataSource {
@@ -65,7 +60,6 @@
* database.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Connection getConnection() throws SQLException;
@@ -82,7 +76,6 @@
* database.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Connection getConnection(String theUsername, String thePassword)
throws SQLException;
@@ -97,7 +90,6 @@
* @return the login timeout value in seconds.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public int getLoginTimeout() throws SQLException;
@@ -110,14 +102,12 @@
* log writer when an {@code DataSource} is created is {@code null}. Note
* that the log writer for a {@code DataSource} is not the same as the log
* writer used by a {@code DriverManager}.
- * </p>
- *
+ *
* @return a {@code PrintWriter} which is the log writer for this {@code
* DataSource}. Can be {@code null}, in which case log writing is
* disabled for this {@code DataSource}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public PrintWriter getLogWriter() throws SQLException;
@@ -132,7 +122,6 @@
* the new login timeout value in seconds.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setLoginTimeout(int theTimeout) throws SQLException;
@@ -145,14 +134,12 @@
* log writer when a {@code DataSource} is created is {@code null}. Note
* that the log writer for a {@code DataSource} is not the same as the log
* writer used by a {@code DriverManager}.
- * </p>
*
* @param theWriter
* a {@code PrintWriter} to use as the log writer for this
* {@code DataSource}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setLogWriter(PrintWriter theWriter) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/javax/sql/PooledConnection.java b/libcore/sql/src/main/java/javax/sql/PooledConnection.java
index b4c5616..b268e0c 100644
--- a/libcore/sql/src/main/java/javax/sql/PooledConnection.java
+++ b/libcore/sql/src/main/java/javax/sql/PooledConnection.java
@@ -30,13 +30,11 @@
* process both to establish a connection to a database and to destroy the
* connection. Reusing connections through a pool is a way of improving system
* performance and reducing overhead.
- * </p>
* <p>
* It is not intended that an application uses the {@code PooledConnection}
* interface directly. The {@code PooledConnection} interface is intended for
* use by a component called a connection pool manager, typically part of the
* infrastructure that supports use of the database by applications.
- * </p>
* <p>
* Applications obtain connections to the database by calling the
* {@link DataSource#getConnection} method. Behind the scenes, the connection
@@ -44,7 +42,6 @@
* pool and passes back a connection object that wraps or references the {@code
* PooledConnection} object. A new {@code PooledConnection} object will only be
* created if the pool is empty.
- * </p>
* <p>
* When the application is finished using a {@code PooledConnection}, the
* application calls the {@link Connection#close} method. The connection pool
@@ -54,7 +51,6 @@
* the underlying {@code PooledConnection} object from the connection and
* returns it to the pool for reuse - the {@code PooledConnection} is thus
* recycled rather than being destroyed.
- * </p>
* <p>
* The connection to the database represented by the {@code PooledConnection} is
* kept open until the {@code PooledConnection} object itself is deactivated by
@@ -62,9 +58,6 @@
* This is typically done if there are too many inactive connections in the
* pool, if the {@code PooledConnection} encounters a problem that makes it
* unusable or if the whole system is being shut down.
- * </p>
- *
- * @since Android 1.0
*/
public interface PooledConnection {
@@ -77,7 +70,6 @@
* @param theListener
* an object which implements the {@code ConnectionEventListener}
* interface.
- * @since Android 1.0
*/
public void addConnectionEventListener(ConnectionEventListener theListener);
@@ -89,7 +81,6 @@
*
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void close() throws SQLException;
@@ -102,7 +93,6 @@
* @return a {@code Connection} object.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Connection getConnection() throws SQLException;
@@ -116,7 +106,6 @@
* interface. This object should have previously been registered
* with the {@code PooledConnection} using the {@code
* addConnectionEventListener} method.
- * @since Android 1.0
*/
public void removeConnectionEventListener(
ConnectionEventListener theListener);
diff --git a/libcore/sql/src/main/java/javax/sql/RowSet.java b/libcore/sql/src/main/java/javax/sql/RowSet.java
index 4edc3d3..77321a2 100644
--- a/libcore/sql/src/main/java/javax/sql/RowSet.java
+++ b/libcore/sql/src/main/java/javax/sql/RowSet.java
@@ -43,14 +43,12 @@
* distinct data values which constitute the row set. The {@code RowSet} class
* supports JavaBean events so that other components in an application can be
* informed when changes happen such as changes in data values.
- * </p>
* <p>
* {@code RowSet} is a facility implemented on top of the remainder of the JDBC
* API. It may be <i>connected</i>, maintaining a connection to the database
* throughout its lifecycle. The changes made on a <i>disconnected</i> {@code
* RowSet} on the other hand can be persisted only establishing a new connection
* with the database each time.
- * </p>
* <p>
* Disconnected {@code RowSets} make use of {@code RowSetReaders} to populate
* the {@code RowSet} with data, possibly from a non-relational database source.
@@ -58,11 +56,9 @@
* data store. There is considerable freedom in the way that {@code
* RowSetReaders} and {@code RowSetWriters} may be implemented to retrieve and
* store data.
- * </p>
- *
+ *
* @see RowSetReader
* @see RowSetWriter
- * @since Android 1.0
*/
public interface RowSet extends ResultSet {
@@ -74,7 +70,6 @@
* @param theListener
* an object which implements the {@code rowSetListener}
* interface.
- * @since Android 1.0
*/
public void addRowSetListener(RowSetListener theListener);
@@ -85,11 +80,9 @@
* a parameter is set or its value is actively reset. {@code
* clearParameters} provides a facility to clear the values for all
* parameters with one method call.
- * </p>
- *
+ *
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void clearParameters() throws SQLException;
@@ -104,20 +97,17 @@
* transaction isolation, type map; plus some or all of the properties:
* command, read only, maximum field size, maximum rows, escape processing,
* and query timeout.
- * </p>
* <p>
* The {@code RowSet} may use a {@code RowSetReader} to access the database
* it will then invoke the {@link RowSetReader#readData} method on the
* reader to fetch the data. When the new data is fetched all the listeners
* are notified to take appropriate measures.
- * </p>
- *
+ *
* @throws SQLException
* if a problem occurs accessing the database or if the
* properties needed to access the database have not been set.
* @see RowSetMetaData
* @see RowSetReader
- * @since Android 1.0
*/
public void execute() throws SQLException;
@@ -127,7 +117,6 @@
* @return a string containing the {@code RowSet}'s command property. A
* command is a SQL statement which is executed to fetch required
* data into the {@code RowSet}.
- * @since Android 1.0
*/
public String getCommand();
@@ -138,7 +127,6 @@
* can then be used to create a connection to the database.
*
* @return the name of the database.
- * @since Android 1.0
*/
public String getDataSourceName();
@@ -152,7 +140,6 @@
* false} otherwise.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public boolean getEscapeProcessing() throws SQLException;
@@ -166,7 +153,6 @@
* @return the current maximum size in bytes. 0 implies no size limit.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public int getMaxFieldSize() throws SQLException;
@@ -177,7 +163,6 @@
* @return the previous maximum number of rows. 0 implies no row limit.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public int getMaxRows() throws SQLException;
@@ -187,7 +172,6 @@
* Therefore it should be set prior to invoking the {@link #execute} method.
*
* @return the value of the password property.
- * @since Android 1.0
*/
public String getPassword();
@@ -199,7 +183,6 @@
* @return the timeout value in seconds.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public int getQueryTimeout() throws SQLException;
@@ -217,7 +200,6 @@
* <li>{@code Connection.TRANSACTION_SERIALIZABLE}</li>
* </ul>
* @see java.sql.Connection
- * @since Android 1.0
*/
public int getTransactionIsolation();
@@ -228,7 +210,6 @@
* @return the custom mappings of SQL types to Java classes.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public Map<String, Class<?>> getTypeMap() throws SQLException;
@@ -241,7 +222,6 @@
* @return a String holding the value of the URL property.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public String getUrl() throws SQLException;
@@ -252,7 +232,6 @@
*
* @return a {@code String} holding the value of the {@code username}
* property.
- * @since Android 1.0
*/
public String getUsername();
@@ -261,7 +240,6 @@
*
* @return {@code true} if this {@code RowSet} is read-only, {@code false}
* if it is updatable.
- * @since Android 1.0
*/
public boolean isReadOnly();
@@ -272,7 +250,6 @@
* @param theListener
* the {@link RowSetListener} to remove from the set of listeners
* for this {@code RowSet}.
- * @since Android 1.0
*/
public void removeRowSetListener(RowSetListener theListener);
@@ -287,7 +264,6 @@
* the {@code Array} data value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setArray(int parameterIndex, Array theArray)
throws SQLException;
@@ -306,7 +282,6 @@
* the length of the data in bytes.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setAsciiStream(int parameterIndex, InputStream theInputStream,
int length) throws SQLException;
@@ -323,7 +298,6 @@
* the big decimal value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setBigDecimal(int parameterIndex, BigDecimal theBigDecimal)
throws SQLException;
@@ -342,7 +316,6 @@
* the length of the data in bytes.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setBinaryStream(int parameterIndex, InputStream theInputStream,
int length) throws SQLException;
@@ -358,7 +331,6 @@
* the {@code Blob} value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setBlob(int parameterIndex, Blob theBlob) throws SQLException;
@@ -373,7 +345,6 @@
* the {@code boolean} value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setBoolean(int parameterIndex, boolean theBoolean)
throws SQLException;
@@ -389,7 +360,6 @@
* the {@code byte} value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setByte(int parameterIndex, byte theByte) throws SQLException;
@@ -404,7 +374,6 @@
* the {@code Array} of {@code bytes} to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setBytes(int parameterIndex, byte[] theByteArray)
throws SQLException;
@@ -424,7 +393,6 @@
* the length of the data in the {@code Reader} in characters.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setCharacterStream(int parameterIndex, Reader theReader,
int length) throws SQLException;
@@ -440,7 +408,6 @@
* the {@code Clob} value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setClob(int parameterIndex, Clob theClob) throws SQLException;
@@ -453,7 +420,6 @@
* the SQL query. Can be {@code null}.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setCommand(String cmd) throws SQLException;
@@ -470,7 +436,6 @@
* @throws SQLException
* if an error occurs accessing the database.
* @see java.sql.ResultSet
- * @since Android 1.0
*/
public void setConcurrency(int concurrency) throws SQLException;
@@ -480,13 +445,11 @@
* The database name can be used to find a {@link DataSource} which has been
* registered with a naming service - the {@link DataSource} can then be
* used to create a connection to the database.
- * </p>
- *
+ *
* @param name
* the database name.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setDataSourceName(String name) throws SQLException;
@@ -501,7 +464,6 @@
* the date value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setDate(int parameterIndex, Date theDate) throws SQLException;
@@ -521,7 +483,6 @@
* {@code DATE} value.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setDate(int parameterIndex, Date theDate, Calendar theCalendar)
throws SQLException;
@@ -537,7 +498,6 @@
* the {@code double} value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setDouble(int parameterIndex, double theDouble)
throws SQLException;
@@ -553,7 +513,6 @@
* turn it off.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setEscapeProcessing(boolean enable) throws SQLException;
@@ -568,7 +527,6 @@
* the {@code float} value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setFloat(int parameterIndex, float theFloat)
throws SQLException;
@@ -584,7 +542,6 @@
* the {@code integer} value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setInt(int parameterIndex, int theInteger) throws SQLException;
@@ -599,7 +556,6 @@
* the {@code long} value value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setLong(int parameterIndex, long theLong) throws SQLException;
@@ -615,7 +571,6 @@
* implies no size limit.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setMaxFieldSize(int max) throws SQLException;
@@ -628,7 +583,6 @@
* RowSet}. 0 means no limit.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setMaxRows(int max) throws SQLException;
@@ -644,7 +598,6 @@
* java.sql.Types}.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setNull(int parameterIndex, int sqlType) throws SQLException;
@@ -665,7 +618,6 @@
* type. Ignored if the sqlType is not a UDT or REF type.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setNull(int parameterIndex, int sqlType, String typeName)
throws SQLException;
@@ -677,8 +629,7 @@
* The JDBC specification provides a standard mapping for Java objects to
* SQL data types. Database specific types can be mapped by JDBC driver
* specific Java types.
- * </p>
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -687,7 +638,6 @@
* parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setObject(int parameterIndex, Object theObject)
throws SQLException;
@@ -706,7 +656,6 @@
* java.sql.Types}.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setObject(int parameterIndex, Object theObject,
int targetSqlType) throws SQLException;
@@ -729,7 +678,6 @@
* types. Ignored for all other types.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setObject(int parameterIndex, Object theObject,
int targetSqlType, int scale) throws SQLException;
@@ -743,7 +691,6 @@
* a {@code String} holding the password.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setPassword(String password) throws SQLException;
@@ -755,7 +702,6 @@
* the number of seconds for the timeout.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setQueryTimeout(int seconds) throws SQLException;
@@ -767,7 +713,6 @@
* {@code false} to allow updates.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setReadOnly(boolean readOnly) throws SQLException;
@@ -784,7 +729,6 @@
* @throws SQLException
* if an error occurs accessing the database.
* @see java.sql.Ref
- * @since Android 1.0
*/
public void setRef(int parameterIndex, Ref theRef) throws SQLException;
@@ -799,7 +743,6 @@
* the value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setShort(int parameterIndex, short theShort)
throws SQLException;
@@ -817,7 +760,6 @@
* the value to which the parameter is set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setString(int parameterIndex, String theString)
throws SQLException;
@@ -836,7 +778,6 @@
* if an error occurs accessing the database.
* @see java.util.Calendar
* @see java.sql.Time
- * @since Android 1.0
*/
public void setTime(int parameterIndex, Time theTime) throws SQLException;
@@ -856,7 +797,6 @@
* if an error occurs accessing the database.
* @see java.util.Calendar
* @see java.sql.Time
- * @since Android 1.0
*/
public void setTime(int parameterIndex, Time theTime, Calendar theCalendar)
throws SQLException;
@@ -875,7 +815,6 @@
* if an error occurs accessing the database.
* @see java.util.Calendar
* @see java.sql.Timestamp
- * @since Android 1.0
*/
public void setTimestamp(int parameterIndex, Timestamp theTimestamp)
throws SQLException;
@@ -896,7 +835,6 @@
* if an error occurs accessing the database.
* @see java.util.Calendar
* @see java.sql.Timestamp
- * @since Android 1.0
*/
public void setTimestamp(int parameterIndex, Timestamp theTimestamp,
Calendar theCalendar) throws SQLException;
@@ -909,8 +847,7 @@
* <p>
* Keep in mind that setting a transaction isolation level has no effect
* unless your driver and DBMS support it.
- * </p>
- *
+ *
* @param level
* the transaction isolation level. One of:
* <ul>
@@ -922,7 +859,6 @@
* @throws SQLException
* if an error occurs accessing the database.
* @see java.sql.Connection
- * @since Android 1.0
*/
public void setTransactionIsolation(int level) throws SQLException;
@@ -939,7 +875,6 @@
* </ul>
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setType(int type) throws SQLException;
@@ -953,7 +888,6 @@
* mapped.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setTypeMap(Map<String, Class<?>> theTypeMap)
throws SQLException;
@@ -967,7 +901,6 @@
* the URL for the database. Can be {@code null}.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setUrl(String theURL) throws SQLException;
@@ -979,7 +912,6 @@
* the new user name for this row set.
* @throws SQLException
* if an error occurs accessing the database.
- * @since Android 1.0
*/
public void setUsername(String theUsername) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/javax/sql/RowSetEvent.java b/libcore/sql/src/main/java/javax/sql/RowSetEvent.java
index 9d4c98c..d18e9ce 100644
--- a/libcore/sql/src/main/java/javax/sql/RowSetEvent.java
+++ b/libcore/sql/src/main/java/javax/sql/RowSetEvent.java
@@ -33,9 +33,6 @@
* The event contains a reference to the {@code RowSet} object which generated
* the message so that the listeners can extract whatever information they need
* from that reference.
- * </p>
- *
- * @since Android 1.0
*/
public class RowSetEvent extends EventObject implements Serializable {
@@ -50,7 +47,6 @@
*
* @param theSource
* the {@code RowSet} which generated the event.
- * @since Android 1.0
*/
public RowSetEvent(RowSet theSource) {
super(theSource);
diff --git a/libcore/sql/src/main/java/javax/sql/RowSetInternal.java b/libcore/sql/src/main/java/javax/sql/RowSetInternal.java
index baa261d..78de4b0 100644
--- a/libcore/sql/src/main/java/javax/sql/RowSetInternal.java
+++ b/libcore/sql/src/main/java/javax/sql/RowSetInternal.java
@@ -22,9 +22,9 @@
import java.sql.ResultSet;
/**
- * An interface provided by a {@code RowSet} object to let either a {@code RowSetReader} or a
- * {@code RowSetWriter} access its internal state, thereby providing facilities to read and update the state of
- * the {@code RowSet}.
+ * An interface provided by a {@code RowSet} object to let either a {@code
+ * RowSetReader} or a {@code RowSetWriter} access its internal state, thereby
+ * providing facilities to read and update the state of the {@code RowSet}.
*/
public interface RowSetInternal {
@@ -34,7 +34,6 @@
* @return the connection or {@code null}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Connection getConnection() throws SQLException;
@@ -44,13 +43,11 @@
* <p>
* The {@code ResultSet}'s cursor is positioned before the first row of
* data.
- * </p>
*
* @return the {@code ResultSet} that contained the original data value of
* the {@code RowSet}.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public ResultSet getOriginal() throws SQLException;
@@ -63,7 +60,6 @@
* if there is a problem accessing the database, or if the
* cursor is not on a valid row (before the first row, after the
* last one or pointing to the insert row).
- * @since Android 1.0
*/
public ResultSet getOriginalRow() throws SQLException;
@@ -74,7 +70,6 @@
* @return the values of parameters that have been set.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public Object[] getParams() throws SQLException;
@@ -87,7 +82,6 @@
* holds the metadata about the {@code RowSet}'s columns.
* @throws SQLException
* if there is a problem accessing the database.
- * @since Android 1.0
*/
public void setMetaData(RowSetMetaData theMetaData) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/javax/sql/RowSetListener.java b/libcore/sql/src/main/java/javax/sql/RowSetListener.java
index 06a7253..ede0197 100644
--- a/libcore/sql/src/main/java/javax/sql/RowSetListener.java
+++ b/libcore/sql/src/main/java/javax/sql/RowSetListener.java
@@ -25,8 +25,6 @@
* implement the {@code RowSetListener} interface and then register itself with
* the {@code RowSet} of interest using the
* {@link RowSet#addRowSetListener(RowSetListener)} method.
- *
- * @since Android 1.0
*/
public interface RowSetListener extends EventListener {
@@ -39,7 +37,6 @@
* {@code RowSet} involved. This information can be used to
* retrieve information about the change, such as the updated
* data values.
- * @since Android 1.0
*/
public void cursorMoved(RowSetEvent theEvent);
@@ -52,7 +49,6 @@
* {@code RowSet} involved. This information can be used to
* retrieve information about the change, such as the new cursor
* position.
- * @since Android 1.0
*/
public void rowChanged(RowSetEvent theEvent);
@@ -66,7 +62,6 @@
* {@code RowSet} involved. This information can be used to
* retrieve information about the change, such as the updated
* rows of data.
- * @since Android 1.0
*/
public void rowSetChanged(RowSetEvent theEvent);
}
diff --git a/libcore/sql/src/main/java/javax/sql/RowSetMetaData.java b/libcore/sql/src/main/java/javax/sql/RowSetMetaData.java
index 3051876..ad07199 100644
--- a/libcore/sql/src/main/java/javax/sql/RowSetMetaData.java
+++ b/libcore/sql/src/main/java/javax/sql/RowSetMetaData.java
@@ -26,14 +26,11 @@
* <p>
* {@code RowSetMetaData} extends {@link java.sql.ResultSetMetaData}, adding new
* operations for carrying out value sets.
- * </p>
* <p>
* Application code would not normally call this interface directly. It would be
* called internally when {@code RowSet.execute} is called.
- * </p>
- *
+ *
* @see RowSetInternal#setMetaData(RowSetMetaData)
- * @since Android 1.0
*/
public interface RowSetMetaData extends ResultSetMetaData {
@@ -50,7 +47,6 @@
* turn it off (default).
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setAutoIncrement(int columnIndex, boolean autoIncrement)
throws SQLException;
@@ -67,7 +63,6 @@
* to make it case insensitive (default).
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setCaseSensitive(int columnIndex, boolean caseSensitive)
throws SQLException;
@@ -82,7 +77,6 @@
* the new catalog's name.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setCatalogName(int columnIndex, String catalogName)
throws SQLException;
@@ -94,7 +88,6 @@
* the number of columns contained in the {@code RowSet}.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setColumnCount(int columnCount) throws SQLException;
@@ -109,7 +102,6 @@
* the normal maximum column width in characters.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setColumnDisplaySize(int columnIndex, int displaySize)
throws SQLException;
@@ -125,7 +117,6 @@
* the alias name for the column.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setColumnLabel(int columnIndex, String theLabel)
throws SQLException;
@@ -140,7 +131,6 @@
* the column's label.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setColumnName(int columnIndex, String theColumnName)
throws SQLException;
@@ -155,7 +145,6 @@
* the SQL Type, as defined by {@code java.sql.Types}.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setColumnType(int columnIndex, int theSQLType)
throws SQLException;
@@ -171,7 +160,6 @@
* the SQL type name for the column.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setColumnTypeName(int columnIndex, String theTypeName)
throws SQLException;
@@ -189,7 +177,6 @@
* value (default).
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setCurrency(int columnIndex, boolean isCurrency)
throws SQLException;
@@ -210,10 +197,8 @@
* <p>
* The default value is {@code
* ResultSetMetaData.columnNullableUnknown}.
- * </p>
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setNullable(int columnIndex, int nullability)
throws SQLException;
@@ -229,7 +214,6 @@
* the number of decimal digits.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setPrecision(int columnIndex, int thePrecision)
throws SQLException;
@@ -245,7 +229,6 @@
* the number of digits after the decimal point.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setScale(int columnIndex, int theScale) throws SQLException;
@@ -259,7 +242,6 @@
* a {@code String} containing the schema name.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setSchemaName(int columnIndex, String theSchemaName)
throws SQLException;
@@ -276,7 +258,6 @@
* clause search, {@code false} otherwise.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setSearchable(int columnIndex, boolean isSearchable)
throws SQLException;
@@ -292,7 +273,6 @@
* false} otherwise.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setSigned(int columnIndex, boolean isSigned)
throws SQLException;
@@ -307,7 +287,6 @@
* the table name for the column.
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public void setTableName(int columnIndex, String theTableName)
throws SQLException;
diff --git a/libcore/sql/src/main/java/javax/sql/RowSetReader.java b/libcore/sql/src/main/java/javax/sql/RowSetReader.java
index d4a902f..0ff5c90 100644
--- a/libcore/sql/src/main/java/javax/sql/RowSetReader.java
+++ b/libcore/sql/src/main/java/javax/sql/RowSetReader.java
@@ -27,7 +27,6 @@
* RowSet} for this to work.
*
* @see RowSet
- * @since Android 1.0
*/
public interface RowSetReader {
@@ -44,7 +43,6 @@
* events are sent to listeners - any listeners are informed by the calling
* {@code RowSet}'s {@code execute} method once the reader returns from the
* {@code readData} method.
- * </p>
*
* @param theCaller
* must be the calling {@code RowSet} object, which must have
@@ -53,7 +51,6 @@
* if a problem occurs accessing the database or if the reader
* calls the {@link RowSet#execute()} method.
* @see RowSetInternal
- * @since Android 1.0
*/
public void readData(RowSetInternal theCaller) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/javax/sql/RowSetWriter.java b/libcore/sql/src/main/java/javax/sql/RowSetWriter.java
index 34473b2..8e56d50 100644
--- a/libcore/sql/src/main/java/javax/sql/RowSetWriter.java
+++ b/libcore/sql/src/main/java/javax/sql/RowSetWriter.java
@@ -28,16 +28,13 @@
* The writer must establish a connection to the {@code RowSet}'s database
* before writing the data. The {@code RowSet} calling this interface must
* implement the {@code RowSetInternal} interface.
- * </p>
* <p>
* The writer may encounter a situation where the updated data needs to be
* written back to the database, but has already been updated there in the mean
* time. How a conflict of this kind is handled is determined by the
* implementation of this writer.
- * </p>
- *
+ *
* @see RowSetInternal
- * @since Android 1.0
*/
public interface RowSetWriter {
@@ -56,7 +53,6 @@
* otherwise (which typically implies some form of conflict).
* @throws SQLException
* if a problem occurs accessing the database.
- * @since Android 1.0
*/
public boolean writeData(RowSetInternal theRowSet) throws SQLException;
}
diff --git a/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java b/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java
index b3dbd32..234bdc9 100644
--- a/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java
+++ b/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java
@@ -27,7 +27,6 @@
package org.apache.harmony.sql.internal.nls;
-
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Locale;
diff --git a/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties b/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties
index 3e6ff1d..6927cf2 100644
--- a/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties
+++ b/libcore/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties
@@ -40,3 +40,22 @@
sql.23=Buffer is not sufficient to hold the value
sql.24=Invalid length for truncate
sql.25=Unsupported operation. SerialClob is not instantiated with a fully implemented Clob object.
+sql.26=Invalid column count. Cannot be less or equal to zero
+sql.27=Invalid column index :{0}
+sql.28=Invalid SQL type for column
+sql.29=Invalid nullable constant set. Must be either columnNoNulls, columnNullable or columnNullableUnknown
+sql.30=Invalid column display size. Cannot be less than zero
+sql.31=Invalid precision value. Cannot be less than zero
+sql.32=Invalid scale size. Cannot be less than zero
+sql.33=Cannot instantiate a SQLOutputImpl instance with null parameters
+sql.34=Cannot instantiate a SQLInputImpl instance with null parameters
+sql.35=SQLInputImpl exception: Invalid read position
+sql.36=No more attributes
+sql.37=Operation not supported
+sql.38=Object is invalid
+sql.39=Cannot instantiate a SerialArray object with a null Array object
+sql.40=ClassNotFoundException: {0}
+sql.41=Invalid JNDI context supplied
+sql.42=Illegal Argument
+sql.43=The object is not serializable
+sql.44=No logger has been set
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DateTest.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DateTest.java
index 3b833c4..39f5074 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DateTest.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DateTest.java
@@ -293,17 +293,27 @@
args = {}
)
public void testToString() {
- // This test is set up for GMT time zone, so need to set the time zone
- // to GMT first
- TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
-
- for (int i = 0; i < TIME_ARRAY.length; i++) {
- Date theDate = new Date(TIME_ARRAY[i]);
- assertEquals(SQL_DATEARRAY[i], theDate.toString());
+ // Loop through the timezones testing the String conversion for each
+ for (int i = 0; i < TIMEZONES.length; i++) {
+ testToString(TIMEZONES[i], TIME_ARRAY, SQL_TZ_DATEARRAYS[i]);
} // end for
} // end method testToString()
+ private void testToString(String timeZone, long[] theDates, String[] theDateStrings) {
+ // Set the timezone
+ TimeZone.setDefault(TimeZone.getTimeZone(timeZone));
+
+ for (int i = 0; i < theDates.length; i++) {
+ // Create the Date object
+ Date theDate = new Date(theDates[i]);
+ // Convert to a date string ... and compare
+ String JDBCString = theDate.toString();
+ assertEquals(theDateStrings[i], JDBCString);
+ } // end for
+
+ } // end testToString( String, long[], String[] )
+
/*
* Test of the void setTime(int) method This does depend on the Time Zone
* settings and sets up the time zone to one of a group of specific time
@@ -372,7 +382,7 @@
theDate = Date.valueOf(element);
fail("Should throw IllegalArgumentException.");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
} // end try
} // end for
@@ -388,70 +398,77 @@
args = {java.lang.String.class}
)
public void test_valueOf_IllegalArgumentException() {
- try{
+ try {
Date.valueOf("1996-10-07-01");
fail("should throw NumberFormatException");
} catch (NumberFormatException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("-10-07-01");
fail("should throw IllegalArgumentException");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("--01");
fail("should throw IllegalArgumentException");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("1991--");
fail("should throw IllegalArgumentException");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("-01-");
fail("should throw IllegalArgumentException");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("-10-w2-01");
fail("should throw IllegalArgumentException");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("07-w2-");
fail("should throw IllegalArgumentException");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("1997-w2-w2");
fail("should throw NumberFormatException");
} catch (NumberFormatException e) {
- //expected
+ // expected
}
- try{
+ try {
Date.valueOf("1996--01");
fail("should throw NumberFormatException");
} catch (NumberFormatException e) {
- //expected
+ // expected
}
}
+ // Reset defualt timezone
+ static TimeZone defaultTimeZone = TimeZone.getDefault();
+
+ protected void tearDown(){
+ TimeZone.setDefault(defaultTimeZone);
+ }
+
} // end class DateTest
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverManagerTest.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverManagerTest.java
index 7e08db9..68ac6c5 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverManagerTest.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DriverManagerTest.java
@@ -24,6 +24,7 @@
import dalvik.annotation.TestTargetNew;
import java.io.ByteArrayOutputStream;
+import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.lang.reflect.Method;
@@ -31,10 +32,12 @@
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
+import java.sql.DriverPropertyInfo;
import java.sql.SQLException;
import java.sql.SQLPermission;
import java.util.Enumeration;
import java.util.Properties;
+import tests.support.Support_Exec;
import junit.framework.TestCase;
@TestTargetClass(DriverManager.class)
@@ -684,6 +687,76 @@
} // end class TestSecurityManager
+ /**
+ * @tests {@link java.sql.DriverManager#registerDriver(Driver)}
+ *
+ * Registers a driver for multiple times and deregisters it only once.
+ *
+ * Regression for HARMONY-4205
+ */
+ public void test_registerDriver_MultiTimes() throws SQLException {
+ int register_count = 10;
+ int deregister_count = 1;
+
+ Driver dummy = new DummyDriver();
+ DriverManager.registerDriver(new BadDummyDriver());
+ for (int i = 0; i < register_count; i++) {
+ DriverManager.registerDriver(dummy);
+ }
+ DriverManager.registerDriver(new BadDummyDriver());
+ for (int i = 0; i < deregister_count; i++) {
+ DriverManager.deregisterDriver(dummy);
+ }
+ Driver d = DriverManager.getDriver("jdbc:dummy_protocol:dummy_subname");
+ assertNotNull(d);
+ }
+
+ /**
+ * Regression for HARMONY-4303
+ */
+ public void test_initClass() throws Exception {
+ String[] arg = new String[1];
+ arg[0] = "org/apache/harmony/sql/tests/java/sql/TestMainForDriver";
+ String result = Support_Exec.execJava(arg, null, true);
+ assertEquals("", result);
+ }
+
+ private static class BadDummyDriver extends DummyDriver {
+ public boolean acceptsURL(String url) {
+ return false;
+ }
+ }
+
+ private static class DummyDriver implements Driver {
+
+ String goodurl = "jdbc:dummy_protocol:dummy_subname";
+
+ public boolean acceptsURL(String url) {
+ return url.equals(goodurl);
+ }
+
+ public Connection connect(String url, Properties info) {
+ return null;
+ }
+
+ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) {
+ return null;
+ }
+
+ public int getMajorVersion() {
+ return 0;
+ }
+
+ public int getMinorVersion() {
+ return 0;
+ }
+
+ public boolean jdbcCompliant() {
+ return true;
+ }
+
+ }
+
} // end class DriverManagerTest
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Connection1.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Connection1.java
index 8b1fd60..d782444 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Connection1.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Connection1.java
@@ -46,8 +46,9 @@
return null;
}
- public Statement createStatement(int resultSetType, int resultSetConcurrency,
- int resultSetHoldability) throws SQLException {
+ public Statement createStatement(int resultSetType,
+ int resultSetConcurrency, int resultSetHoldability)
+ throws SQLException {
return null;
}
@@ -97,12 +98,13 @@
}
public CallableStatement prepareCall(String sql, int resultSetType,
- int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+ int resultSetConcurrency, int resultSetHoldability)
+ throws SQLException {
return null;
}
- public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
- throws SQLException {
+ public CallableStatement prepareCall(String sql, int resultSetType,
+ int resultSetConcurrency) throws SQLException {
return null;
}
@@ -111,7 +113,8 @@
}
public PreparedStatement prepareStatement(String sql, int resultSetType,
- int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+ int resultSetConcurrency, int resultSetHoldability)
+ throws SQLException {
return null;
}
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver1.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver1.java
index ae09f94..8638d2b 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver1.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver1.java
@@ -104,7 +104,8 @@
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
throws SQLException {
- DriverPropertyInfo[] theInfos = { new DriverPropertyInfo(userProperty, "*"),
+ DriverPropertyInfo[] theInfos = {
+ new DriverPropertyInfo(userProperty, "*"),
new DriverPropertyInfo(passwordProperty, "*"), };
return theInfos;
}
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver3.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver3.java
index f02bdc3..f78bb31 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver3.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver3.java
@@ -17,7 +17,6 @@
package org.apache.harmony.sql.tests.java.sql;
-
/**
* TODO Type description
*
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver4.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver4.java
index 655436d..3e7000c 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver4.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestHelper_Driver4.java
@@ -92,10 +92,13 @@
String user = (String) info.get(userProperty);
String password = (String) info.get(passwordProperty);
if (user == null || password == null) {
- throw new SQLException("Userid and/or password not supplied");
+ throw new SQLException(
+ "Userid and/or password not supplied");
}
- if (!user.equals(validuser) || !password.equals(validpassword)) {
- throw new SQLException("Userid and/or password not valid");
+ if (!user.equals(validuser)
+ || !password.equals(validpassword)) {
+ throw new SQLException(
+ "Userid and/or password not valid");
} // end if
} // end if
// It all checks out - so return a connection
@@ -117,7 +120,8 @@
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
throws SQLException {
- DriverPropertyInfo[] theInfos = { new DriverPropertyInfo(userProperty, "*"),
+ DriverPropertyInfo[] theInfos = {
+ new DriverPropertyInfo(userProperty, "*"),
new DriverPropertyInfo(passwordProperty, "*"), };
return theInfos;
}
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestMainForDriver.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestMainForDriver.java
new file mode 100644
index 0000000..0fe7f67
--- /dev/null
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TestMainForDriver.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.sql.tests.java.sql;
+
+/*
+ * Load DriverManager class and initialize the class with SecurityManager
+ * Regression for HARMONY-4303
+ */
+public class TestMainForDriver {
+ public static void main(String[] args) throws Throwable {
+ // Install SecurityManager
+ System.setSecurityManager(new SecurityManager());
+ // Load java.sql.DriverManager and it will invoke its <clinit> method
+ try {
+ Class.forName("java.sql.DriverManager");
+ } catch (ExceptionInInitializerError e) {
+ // ExceptionInInitializerError is caused by AccessControlException
+ throw e.getException();
+ }
+ }
+}
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimestampTest.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimestampTest.java
index bc1a9d5..c1c09a0 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimestampTest.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimestampTest.java
@@ -37,6 +37,22 @@
public class TimestampTest extends TestCase {
+ static class MockTimestamp extends Timestamp{
+ private String holiday;
+
+ public MockTimestamp(long theTime) {
+ super(theTime);
+ holiday = "Christmas";
+ }
+
+ // Constructor should not call this public API,
+ // since it may be overrided to use variables uninitialized.
+ public void setTime(long theTime){
+ super.setTime(theTime);
+ holiday.hashCode();
+ }
+ }
+
static long TIME_TEST1 = 38720231; // 10:45:20.231 GMT
static long TIME_TEST2 = 80279000; // 22:17:59.000 GMT
@@ -126,6 +142,9 @@
// The Timestamp should have been created
assertNotNull(theTimestamp);
+
+ Timestamp mockTimestamp = new MockTimestamp(TIME_TEST1);
+ assertNotNull(mockTimestamp);
} // end method testTimestamplong
/*
@@ -277,6 +296,7 @@
)
@SuppressWarnings("deprecation")
public void testGetDate() {
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
for (int i = 0; i < TIME_ARRAY.length; i++) {
Timestamp theTimestamp = new Timestamp(TIME_ARRAY[i]);
assertEquals(DATE_ARRAY[i], theTimestamp.getDate());
@@ -295,6 +315,7 @@
)
@SuppressWarnings("deprecation")
public void testGetHours() {
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
for (int i = 0; i < TIME_ARRAY.length; i++) {
Timestamp theTimestamp = new Timestamp(TIME_ARRAY[i]);
assertEquals(HOURS_ARRAY[i], theTimestamp.getHours());
@@ -350,6 +371,7 @@
args = {java.lang.String.class}
)
public void testValueOfString() {
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
for (int i = 0; i < TIME_ARRAY.length; i++) {
Timestamp theTimestamp = new Timestamp(TIME_ARRAY[i]);
Timestamp theTimestamp2 = Timestamp.valueOf(STRING_GMT_ARRAY[i]);
@@ -370,7 +392,7 @@
Timestamp.valueOf(element);
fail("Should throw IllegalArgumentException.");
} catch (IllegalArgumentException e) {
- //expected
+ // expected
} // end try
} // end for
@@ -387,6 +409,7 @@
args = {java.lang.String.class}
)
public void testValueOfString1() {
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
Timestamp theReturn;
@@ -439,8 +462,37 @@
}
}
+ // Regression test for HARMONY-5506
+ String date = "1970-01-01 22:17:59.0 ";
+ Timestamp t = Timestamp.valueOf(date);
+ assertEquals(80279000,t.getTime());
+
} // end method testValueOfString
+ public void testValueOf_IAE() {
+ try {
+ java.sql.Timestamp.valueOf("2008-12-22 15:00:01.");
+ fail("should throw IllegalArgumentException");
+ } catch (IllegalArgumentException e) {
+ // Expected
+ }
+
+ try {
+ // bug of RI 5, passed on RI 6
+ java.sql.Timestamp.valueOf("178548938-12-22 15:00:01.000000001");
+ fail("should throw IllegalArgumentException");
+ } catch (IllegalArgumentException e) {
+ // Expected
+ }
+
+ try {
+ java.sql.Timestamp.valueOf("2008-12-22 15:00:01.0000000011");
+ fail("should throw IllegalArgumentException");
+ } catch (IllegalArgumentException e) {
+ // Expected
+ }
+ }
+
/*
* Method test for toString
*/
@@ -451,14 +503,36 @@
args = {}
)
public void testToString() {
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+
for (int i = 0; i < TIME_ARRAY.length; i++) {
Timestamp theTimestamp = new Timestamp(TIME_ARRAY[i]);
assertEquals("Wrong conversion for test " + i, STRING_GMT_ARRAY[i],
theTimestamp.toString());
} // end for
+ Timestamp t1 = new Timestamp(Long.MIN_VALUE);
+ assertEquals("292278994-08-17 07:12:55.192", t1.toString()); //$NON-NLS-1$
+
+ Timestamp t2 = new Timestamp(Long.MIN_VALUE + 1);
+ assertEquals("292278994-08-17 07:12:55.193", t2.toString()); //$NON-NLS-1$
+
+ Timestamp t3 = new Timestamp(Long.MIN_VALUE + 807);
+ assertEquals("292278994-08-17 07:12:55.999", t3.toString()); //$NON-NLS-1$
+
+ Timestamp t4 = new Timestamp(Long.MIN_VALUE + 808);
+ assertEquals("292269055-12-02 16:47:05.0", t4.toString()); //$NON-NLS-1$
} // end method testtoString
+ private void testToString(String timeZone, long[] theTimeStamps, String[] theTimeStampStrings) {
+ TimeZone.setDefault(TimeZone.getTimeZone(timeZone));
+ for (int i = 0; i < TIME_ARRAY.length; i++) {
+ Timestamp theTimestamp = new Timestamp(theTimeStamps[i]);
+ assertEquals(theTimeStampStrings[i], theTimestamp.toString());
+ } // end for
+
+ }
+
/*
* Method test for getNanos
*/
@@ -487,6 +561,8 @@
args = {int.class}
)
public void testSetNanosint() {
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+
int[] NANOS_INVALID = { -137891990, 1635665198, -1 };
for (int i = 0; i < TIME_ARRAY.length; i++) {
Timestamp theTimestamp = new Timestamp(TIME_ARRAY[i]);
@@ -787,5 +863,11 @@
Timestamp t4 = new Timestamp(Long.MIN_VALUE + 808);
assertEquals("292269055-12-02 16:47:05.0", t4.toString()); //$NON-NLS-1$
}
-
+
+ // Reset defualt timezone
+ TimeZone defaultTimeZone = TimeZone.getDefault();
+
+ protected void tearDown() {
+ TimeZone.setDefault(defaultTimeZone);
+ }
} // end class TimestampTest
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/ConnectionEventTest.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/ConnectionEventTest.java
index 376b173..12d4364 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/ConnectionEventTest.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/ConnectionEventTest.java
@@ -25,10 +25,14 @@
import junit.framework.TestCase;
import java.sql.SQLException;
+import java.io.Serializable;
import javax.sql.ConnectionEvent;
import javax.sql.PooledConnection;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
+
@TestTargetClass(ConnectionEvent.class)
public class ConnectionEventTest extends TestCase {
@@ -112,5 +116,63 @@
assertNotSame(ce3.getSQLException(), ce2.getSQLException());
}
-}
+ @TestTargetNew(
+ level = TestLevel.SUFFICIENT,
+ notes = "",
+ method = "!SerializationSelf",
+ args = {}
+ )
+ public void testSerializationSelf() throws Exception {
+ Impl_PooledConnection ipc = new Impl_PooledConnection();
+ SQLException e = new SQLException();
+ ConnectionEvent ce = new ConnectionEvent(ipc, e);
+ SerializationTest.verifySelf(ce, CONNECTIONEVENT_COMPARATOR);
+ }
+
+ @TestTargetNew(
+ level = TestLevel.SUFFICIENT,
+ notes = "",
+ method = "!Serialization",
+ args = {}
+ )
+ public void testSerializationCompatibility() throws Exception {
+ Impl_PooledConnection ipc = new Impl_PooledConnection();
+ SQLException nextSQLException = new SQLException("nextReason",
+ "nextSQLState", 33);
+
+ int vendorCode = 10;
+ SQLException sqlException = new SQLException("reason", "SQLState",
+ vendorCode);
+
+ sqlException.setNextException(nextSQLException);
+
+ ConnectionEvent ce = new ConnectionEvent(ipc, sqlException);
+
+ SerializationTest.verifyGolden(this, ce, CONNECTIONEVENT_COMPARATOR);
+ }
+
+ private static final SerializableAssert CONNECTIONEVENT_COMPARATOR = new SerializableAssert() {
+
+ public void assertDeserialized(Serializable initial,
+ Serializable deserialized) {
+ ConnectionEvent ceInitial = (ConnectionEvent) initial;
+ ConnectionEvent ceDeser = (ConnectionEvent) deserialized;
+
+ SQLException initThr = ceInitial.getSQLException();
+ SQLException dserThr = ceDeser.getSQLException();
+
+ // verify SQLState
+ assertEquals(initThr.getSQLState(), dserThr.getSQLState());
+
+ // verify vendorCode
+ assertEquals(initThr.getErrorCode(), dserThr.getErrorCode());
+
+ // verify next
+ if (initThr.getNextException() == null) {
+ assertNull(dserThr.getNextException());
+ }
+ }
+
+ };
+}
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_PooledConnection.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_PooledConnection.java
index d135ced..0eca2d2 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_PooledConnection.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_PooledConnection.java
@@ -33,6 +33,7 @@
return null;
}
- public void removeConnectionEventListener(ConnectionEventListener theListener) {
+ public void removeConnectionEventListener(
+ ConnectionEventListener theListener) {
}
}
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_RowSet.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_RowSet.java
index ace6b9a..946c40d 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_RowSet.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/Impl_RowSet.java
@@ -99,34 +99,38 @@
public void removeRowSetListener(RowSetListener theListener) {
}
- public void setArray(int parameterIndex, Array theArray) throws SQLException {
- }
-
- public void setAsciiStream(int parameterIndex, InputStream theInputStream, int length)
+ public void setArray(int parameterIndex, Array theArray)
throws SQLException {
}
- public void setBigDecimal(int parameterIndex, BigDecimal theBigDecimal) throws SQLException {
+ public void setAsciiStream(int parameterIndex, InputStream theInputStream,
+ int length) throws SQLException {
}
- public void setBinaryStream(int parameterIndex, InputStream theInputStream, int length)
+ public void setBigDecimal(int parameterIndex, BigDecimal theBigDecimal)
throws SQLException {
}
+ public void setBinaryStream(int parameterIndex, InputStream theInputStream,
+ int length) throws SQLException {
+ }
+
public void setBlob(int parameterIndex, Blob theBlob) throws SQLException {
}
- public void setBoolean(int parameterIndex, boolean theBoolean) throws SQLException {
+ public void setBoolean(int parameterIndex, boolean theBoolean)
+ throws SQLException {
}
public void setByte(int parameterIndex, byte theByte) throws SQLException {
}
- public void setBytes(int parameterIndex, byte[] theByteArray) throws SQLException {
+ public void setBytes(int parameterIndex, byte[] theByteArray)
+ throws SQLException {
}
- public void setCharacterStream(int parameterIndex, Reader theReader, int length)
- throws SQLException {
+ public void setCharacterStream(int parameterIndex, Reader theReader,
+ int length) throws SQLException {
}
public void setClob(int parameterIndex, Clob theClob) throws SQLException {
@@ -148,13 +152,15 @@
public void setDate(int parameterIndex, Date theDate) throws SQLException {
}
- public void setDouble(int parameterIndex, double theDouble) throws SQLException {
+ public void setDouble(int parameterIndex, double theDouble)
+ throws SQLException {
}
public void setEscapeProcessing(boolean enable) throws SQLException {
}
- public void setFloat(int parameterIndex, float theFloat) throws SQLException {
+ public void setFloat(int parameterIndex, float theFloat)
+ throws SQLException {
}
public void setInt(int parameterIndex, int theInteger) throws SQLException {
@@ -169,21 +175,23 @@
public void setMaxRows(int max) throws SQLException {
}
- public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {
+ public void setNull(int parameterIndex, int sqlType, String typeName)
+ throws SQLException {
}
public void setNull(int parameterIndex, int sqlType) throws SQLException {
}
- public void setObject(int parameterIndex, Object theObject, int targetSqlType, int scale)
- throws SQLException {
+ public void setObject(int parameterIndex, Object theObject,
+ int targetSqlType, int scale) throws SQLException {
}
- public void setObject(int parameterIndex, Object theObject, int targetSqlType)
- throws SQLException {
+ public void setObject(int parameterIndex, Object theObject,
+ int targetSqlType) throws SQLException {
}
- public void setObject(int parameterIndex, Object theObject) throws SQLException {
+ public void setObject(int parameterIndex, Object theObject)
+ throws SQLException {
}
public void setPassword(String password) throws SQLException {
@@ -198,10 +206,12 @@
public void setRef(int parameterIndex, Ref theRef) throws SQLException {
}
- public void setShort(int parameterIndex, short theShort) throws SQLException {
+ public void setShort(int parameterIndex, short theShort)
+ throws SQLException {
}
- public void setString(int parameterIndex, String theString) throws SQLException {
+ public void setString(int parameterIndex, String theString)
+ throws SQLException {
}
public void setTime(int parameterIndex, Time theTime, Calendar theCalendar)
@@ -211,11 +221,12 @@
public void setTime(int parameterIndex, Time theTime) throws SQLException {
}
- public void setTimestamp(int parameterIndex, Timestamp theTimestamp, Calendar theCalendar)
- throws SQLException {
+ public void setTimestamp(int parameterIndex, Timestamp theTimestamp,
+ Calendar theCalendar) throws SQLException {
}
- public void setTimestamp(int parameterIndex, Timestamp theTimestamp) throws SQLException {
+ public void setTimestamp(int parameterIndex, Timestamp theTimestamp)
+ throws SQLException {
}
public void setTransactionIsolation(int level) throws SQLException {
@@ -224,7 +235,8 @@
public void setType(int type) throws SQLException {
}
- public void setTypeMap(Map<String, Class<?>> theTypeMap) throws SQLException {
+ public void setTypeMap(Map<String, Class<?>> theTypeMap)
+ throws SQLException {
}
public void setUrl(String theURL) throws SQLException {
@@ -279,7 +291,8 @@
return null;
}
- public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
+ public BigDecimal getBigDecimal(int columnIndex, int scale)
+ throws SQLException {
return null;
}
@@ -287,7 +300,8 @@
return null;
}
- public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {
+ public BigDecimal getBigDecimal(String columnName, int scale)
+ throws SQLException {
return null;
}
@@ -419,7 +433,8 @@
return null;
}
- public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
+ public Object getObject(int columnIndex, Map<String, Class<?>> map)
+ throws SQLException {
return null;
}
@@ -427,7 +442,8 @@
return null;
}
- public Object getObject(String columnName, Map<String, Class<?>> map) throws SQLException {
+ public Object getObject(String columnName, Map<String, Class<?>> map)
+ throws SQLException {
return null;
}
@@ -483,7 +499,8 @@
return null;
}
- public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
+ public Timestamp getTimestamp(int columnIndex, Calendar cal)
+ throws SQLException {
return null;
}
@@ -491,7 +508,8 @@
return null;
}
- public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {
+ public Timestamp getTimestamp(String columnName, Calendar cal)
+ throws SQLException {
return null;
}
@@ -599,10 +617,12 @@
throws SQLException {
}
- public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
+ public void updateBigDecimal(int columnIndex, BigDecimal x)
+ throws SQLException {
}
- public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {
+ public void updateBigDecimal(String columnName, BigDecimal x)
+ throws SQLException {
}
public void updateBinaryStream(int columnIndex, InputStream x, int length)
@@ -641,8 +661,8 @@
throws SQLException {
}
- public void updateCharacterStream(String columnName, Reader reader, int length)
- throws SQLException {
+ public void updateCharacterStream(String columnName, Reader reader,
+ int length) throws SQLException {
}
public void updateClob(int columnIndex, Clob x) throws SQLException {
@@ -687,13 +707,15 @@
public void updateNull(String columnName) throws SQLException {
}
- public void updateObject(int columnIndex, Object x, int scale) throws SQLException {
+ public void updateObject(int columnIndex, Object x, int scale)
+ throws SQLException {
}
public void updateObject(int columnIndex, Object x) throws SQLException {
}
- public void updateObject(String columnName, Object x, int scale) throws SQLException {
+ public void updateObject(String columnName, Object x, int scale)
+ throws SQLException {
}
public void updateObject(String columnName, Object x) throws SQLException {
@@ -726,10 +748,12 @@
public void updateTime(String columnName, Time x) throws SQLException {
}
- public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {
+ public void updateTimestamp(int columnIndex, Timestamp x)
+ throws SQLException {
}
- public void updateTimestamp(String columnName, Timestamp x) throws SQLException {
+ public void updateTimestamp(String columnName, Timestamp x)
+ throws SQLException {
}
public boolean wasNull() throws SQLException {
diff --git a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/RowSetEventTest.java b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/RowSetEventTest.java
index bf30fbc..9f048f7 100644
--- a/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/RowSetEventTest.java
+++ b/libcore/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/RowSetEventTest.java
@@ -45,7 +45,7 @@
fail("illegal argument exception expected");
} catch (IllegalArgumentException e) {
}
-
+
Impl_RowSet irs = new Impl_RowSet();
RowSetEvent rse = new RowSetEvent(irs);
assertSame(irs, rse.getSource());