Commit f2390fad by Bryce McKinlay Committed by Bryce McKinlay

Reformat JDBC classes and add new JDK 1.4 classes and methods.

	* java/sql/ParameterMetaData.java, java/sql/SQLPermission.java,
	java/sql/Savepoint.java: New files.
	* java/sql/Array.java, java/sql/BatchUpdateException.java,
	java/sql/Blob.java, java/sql/CallableStatement.java,
	java/sql/Clob.java, java/sql/Connection.java,
	java/sql/DataTruncation.java, java/sql/DatabaseMetaData.java,
	java/sql/Date.java, java/sql/Driver.java,
	java/sql/DriverManager.java,
	java/sql/DriverPropertyInfo.java, java/sql/PreparedStatement.java,
	java/sql/Ref.java, java/sql/ResultSet.java,
	java/sql/ResultSetMetaData.java, java/sql/SQLData.java
	java/sql/SQLException.java, java/sql/SQLInput.java,
	java/sql/SQLOutput.java, java/sql/SQLWarning.java
	java/sql/Statement.java, java/sql/Struct.java, java/sql/Time.java,
	java/sql/Timestamp.java, java/sql/Types.java: Updated to JDBC 3.0
	(JDK 1.4) specification.
	* javax/sql/ConnectionEvent.java,
	javax/sql/ConnectionEventListener.java,
	javax/sql/ConnectionPoolDataSource.java,
	javax/sql/DataSource.java, javax/sql/PooledConnection.java,
	javax/sql/RowSetEvent.java, javax/sql/RowSetInternal.java,
	javax/sql/RowSet.java, javax/sql/RowSetListener.java,
	javax/sql/RowSetMetaData.java, javax/sql/RowSetReader.java,
	javax/sql/RowSetWriter.java, javax/sql/XAConnection.java,
	javax/sql/XADataSource.java: New files.
	* Makefile.am: Add new files.
	* Makefile.in: Rebuilt.

From-SVN: r54871
parent 00b94a44
2002-06-21 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Reformat JDBC classes and add new JDK 1.4 classes and methods.
* java/sql/ParameterMetaData.java, java/sql/SQLPermission.java,
java/sql/Savepoint.java: New files.
* java/sql/Array.java, java/sql/BatchUpdateException.java,
java/sql/Blob.java, java/sql/CallableStatement.java,
java/sql/Clob.java, java/sql/Connection.java,
java/sql/DataTruncation.java, java/sql/DatabaseMetaData.java,
java/sql/Date.java, java/sql/Driver.java, java/sql/DriverManager.java,
java/sql/DriverPropertyInfo.java, java/sql/PreparedStatement.java,
java/sql/Ref.java, java/sql/ResultSet.java,
java/sql/ResultSetMetaData.java, java/sql/SQLData.java
java/sql/SQLException.java, java/sql/SQLInput.java,
java/sql/SQLOutput.java, java/sql/SQLWarning.java
java/sql/Statement.java, java/sql/Struct.java, java/sql/Time.java,
java/sql/Timestamp.java, java/sql/Types.java: Updated to JDBC 3.0
(JDK 1.4) specification.
* javax/sql/ConnectionEvent.java,
javax/sql/ConnectionEventListener.java,
javax/sql/ConnectionPoolDataSource.java,
javax/sql/DataSource.java, javax/sql/PooledConnection.java,
javax/sql/RowSetEvent.java, javax/sql/RowSetInternal.java,
javax/sql/RowSet.java, javax/sql/RowSetListener.java,
javax/sql/RowSetMetaData.java, javax/sql/RowSetReader.java,
javax/sql/RowSetWriter.java, javax/sql/XAConnection.java,
javax/sql/XADataSource.java: New files.
* Makefile.am: Add new files.
* Makefile.in: Rebuilt.
2002-06-20 Tom Tromey <tromey@redhat.com>
For PR libgcj/7073:
......
......@@ -997,6 +997,20 @@ javax/naming/ldap/UnsolicitedNotification.java \
javax/naming/ldap/UnsolicitedNotificationEvent.java \
javax/naming/ldap/UnsolicitedNotificationListener.java \
javax/naming/OperationNotSupportedException.java \
javax/sql/ConnectionEvent.java \
javax/sql/ConnectionEventListener.java \
javax/sql/ConnectionPoolDataSource.java \
javax/sql/DataSource.java \
javax/sql/PooledConnection.java \
javax/sql/RowSetEvent.java \
javax/sql/RowSetInternal.java \
javax/sql/RowSet.java \
javax/sql/RowSetListener.java \
javax/sql/RowSetMetaData.java \
javax/sql/RowSetReader.java \
javax/sql/RowSetWriter.java \
javax/sql/XAConnection.java \
javax/sql/XADataSource.java \
javax/transaction/xa/XAException.java \
javax/transaction/xa/XAResource.java \
javax/transaction/xa/Xid.java \
......@@ -1604,14 +1618,17 @@ java/sql/Date.java \
java/sql/Driver.java \
java/sql/DriverManager.java \
java/sql/DriverPropertyInfo.java \
java/sql/ParameterMetaData.java \
java/sql/PreparedStatement.java \
java/sql/Ref.java \
java/sql/ResultSet.java \
java/sql/ResultSetMetaData.java \
java/sql/Savepoint.java \
java/sql/SQLData.java \
java/sql/SQLException.java \
java/sql/SQLInput.java \
java/sql/SQLOutput.java \
java/sql/SQLPermission.java \
java/sql/SQLWarning.java \
java/sql/Statement.java \
java/sql/Struct.java \
......
......@@ -768,6 +768,20 @@ javax/naming/ldap/UnsolicitedNotification.java \
javax/naming/ldap/UnsolicitedNotificationEvent.java \
javax/naming/ldap/UnsolicitedNotificationListener.java \
javax/naming/OperationNotSupportedException.java \
javax/sql/ConnectionEvent.java \
javax/sql/ConnectionEventListener.java \
javax/sql/ConnectionPoolDataSource.java \
javax/sql/DataSource.java \
javax/sql/PooledConnection.java \
javax/sql/RowSetEvent.java \
javax/sql/RowSetInternal.java \
javax/sql/RowSet.java \
javax/sql/RowSetListener.java \
javax/sql/RowSetMetaData.java \
javax/sql/RowSetReader.java \
javax/sql/RowSetWriter.java \
javax/sql/XAConnection.java \
javax/sql/XADataSource.java \
javax/transaction/xa/XAException.java \
javax/transaction/xa/XAResource.java \
javax/transaction/xa/Xid.java \
......@@ -1366,14 +1380,17 @@ java/sql/Date.java \
java/sql/Driver.java \
java/sql/DriverManager.java \
java/sql/DriverPropertyInfo.java \
java/sql/ParameterMetaData.java \
java/sql/PreparedStatement.java \
java/sql/Ref.java \
java/sql/ResultSet.java \
java/sql/ResultSetMetaData.java \
java/sql/Savepoint.java \
java/sql/SQLData.java \
java/sql/SQLException.java \
java/sql/SQLInput.java \
java/sql/SQLOutput.java \
java/sql/SQLPermission.java \
java/sql/SQLWarning.java \
java/sql/Statement.java \
java/sql/Struct.java \
......@@ -2506,13 +2523,15 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/sql/Connection.P .deps/java/sql/DataTruncation.P \
.deps/java/sql/DatabaseMetaData.P .deps/java/sql/Date.P \
.deps/java/sql/Driver.P .deps/java/sql/DriverManager.P \
.deps/java/sql/DriverPropertyInfo.P .deps/java/sql/PreparedStatement.P \
.deps/java/sql/Ref.P .deps/java/sql/ResultSet.P \
.deps/java/sql/ResultSetMetaData.P .deps/java/sql/SQLData.P \
.deps/java/sql/SQLException.P .deps/java/sql/SQLInput.P \
.deps/java/sql/SQLOutput.P .deps/java/sql/SQLWarning.P \
.deps/java/sql/Statement.P .deps/java/sql/Struct.P \
.deps/java/sql/Time.P .deps/java/sql/Timestamp.P .deps/java/sql/Types.P \
.deps/java/sql/DriverPropertyInfo.P .deps/java/sql/ParameterMetaData.P \
.deps/java/sql/PreparedStatement.P .deps/java/sql/Ref.P \
.deps/java/sql/ResultSet.P .deps/java/sql/ResultSetMetaData.P \
.deps/java/sql/SQLData.P .deps/java/sql/SQLException.P \
.deps/java/sql/SQLInput.P .deps/java/sql/SQLOutput.P \
.deps/java/sql/SQLPermission.P .deps/java/sql/SQLWarning.P \
.deps/java/sql/Savepoint.P .deps/java/sql/Statement.P \
.deps/java/sql/Struct.P .deps/java/sql/Time.P \
.deps/java/sql/Timestamp.P .deps/java/sql/Types.P \
.deps/java/text/Annotation.P \
.deps/java/text/AttributedCharacterIterator.P \
.deps/java/text/AttributedString.P \
......@@ -2659,6 +2678,14 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/javax/naming/spi/ObjectFactoryBuilder.P \
.deps/javax/naming/spi/ResolveResult.P \
.deps/javax/naming/spi/Resolver.P .deps/javax/naming/spi/StateFactory.P \
.deps/javax/sql/ConnectionEvent.P \
.deps/javax/sql/ConnectionEventListener.P \
.deps/javax/sql/ConnectionPoolDataSource.P .deps/javax/sql/DataSource.P \
.deps/javax/sql/PooledConnection.P .deps/javax/sql/RowSet.P \
.deps/javax/sql/RowSetEvent.P .deps/javax/sql/RowSetInternal.P \
.deps/javax/sql/RowSetListener.P .deps/javax/sql/RowSetMetaData.P \
.deps/javax/sql/RowSetReader.P .deps/javax/sql/RowSetWriter.P \
.deps/javax/sql/XAConnection.P .deps/javax/sql/XADataSource.P \
.deps/javax/transaction/HeuristicCommitException.P \
.deps/javax/transaction/HeuristicMixedException.P \
.deps/javax/transaction/HeuristicRollbackException.P \
......
/* BatchUpdateException.java -- Exception for batch oriented SQL errors
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -35,146 +35,107 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
/**
* This class extends <code>SQLException</code> to count the successful
* updates in each statement in a batch that was successfully updated prior
* to the error.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class BatchUpdateException extends SQLException
{
/*************************************************************************/
/*
* Instance Variables
*/
/**
* This is the array of update counts for the commands which completed
* successfully prior to the error.
* @serialized
*/
private int[] updateCounts;
/*************************************************************************/
/*
* Constructors
*/
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with no descriptive error message. The SQL state and update count will
* be initialized to <code>null</code> and the vendor specific error code will
* initialized to 0.
*/
public
BatchUpdateException()
{
super();
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with the specified update count information and no descriptive error
* message. This SQL state will be initialized to <code>null</code> and
* the vendor specific error code will be initialized to 0.
*
* @param updateCounts The update count array.
*/
public
BatchUpdateException(int[] updateCounts)
{
super();
this.updateCounts = updateCounts;
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with the specified descriptive error message and update count information.
* The SQL state will be initialized to <code>null</code> and the vendor
* specific error code will be initialized to 0.
*
* @param message The descriptive error message.
* @param updateCounts The update count information for this error.
*/
public
BatchUpdateException(String message, int[] updateCounts)
{
super(message);
this.updateCounts = updateCounts;
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with the specified descriptive error message, SQL state, and update count
* information. The vendor specific error code will be initialized to 0.
*
* @param message The descriptive error message.
* @param SQLState The SQL state information for this error.
* @param updateCounts The update count information for this error.
*/
public
BatchUpdateException(String message, String SQLState, int[] updateCounts)
{
super(message, SQLState);
this.updateCounts = updateCounts;
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with the specified descriptive error message, SQL state, vendor
* specific error code and update count information.
*
* @param message The descriptive error message.
* @param SQLState The SQL state information for this error.
* @param vendorCode The vendor specific error code for this error.
* @param updateCounts The update count information for this error.
*/
public
BatchUpdateException(String message, String SQLState, int vendorCode,
int[] updateCounts)
{
super(message, SQLState, vendorCode);
this.updateCounts = updateCounts;
}
/*************************************************************************/
/*
* Instance Methods
* This class extends <code>SQLException</code> to count the successful
* updates in each statement in a batch that was successfully updated prior
* to the error.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
/**
* This method returns the update count information for this error. If
* not <code>null</code> this is an array of <code>int</code>'s that are
* the update accounts for each command that was successfully executed.
* The array elements are in the order that the commands were executed.
*
* @return The update count information, which may be <code>null</code>.
*/
public int[]
getUpdateCounts()
public class BatchUpdateException extends SQLException
{
return(updateCounts);
static final long serialVersionUID = 5977529877145521757L;
/**
* This is the array of update counts for the commands which completed
* successfully prior to the error.
*/
private int[] updateCounts;
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with the specified descriptive error message, SQL state, and update count
* information. The vendor specific error code will be initialized to 0.
*
* @param message The descriptive error message.
* @param SQLState The SQL state information for this error.
* @param vendorCode
* @param updateCounts The update count information for this error.
*/
public BatchUpdateException(String message, String SQLState, int vendorCode,
int[] updateCounts)
{
super(message, SQLState, vendorCode);
this.updateCounts = updateCounts;
}
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with the specified descriptive error message, SQL state, and update count
* information. The vendor specific error code will be initialized to 0.
*
* @param message The descriptive error message.
* @param SQLState The SQL state information for this error.
* @param updateCounts The update count information for this error.
*/
public BatchUpdateException(String message, String SQLState,
int[] updateCounts)
{
super(message, SQLState);
this.updateCounts = updateCounts;
}
/**
* This method initializes a new instance of <code>BatchUpdateException</code>
* with the specified descriptive error message and update count information.
* The SQL state will be initialized to <code>null</code> and the vendor
* specific error code will be initialized to 0.
*
* @param message The descriptive error message.
* @param updateCounts The update count information for this error.
*/
public BatchUpdateException(String message, int[] updateCounts)
{
super(message);
this.updateCounts = updateCounts;
}
/**
* Initializes a new instance of <code>BatchUpdateException</code>
* with the specified update count information and no descriptive error
* message. This SQL state will be initialized to <code>null</code> and
* the vendor specific error code will be initialized to 0.
*
* @param updateCounts The update count array.
*/
public BatchUpdateException(int[] updateCounts)
{
this.updateCounts = updateCounts;
}
/**
* Initializes a new instance of <code>BatchUpdateException</code>
* with no descriptive error message. The SQL state and update count will
* be initialized to <code>null</code> and the vendor specific error code will
* initialized to 0.
*/
public BatchUpdateException()
{
super();
}
/**
* This method returns the update count information for this error. If
* not <code>null</code> this is an array of <code>int</code>'s that are
* the update accounts for each command that was successfully executed.
* The array elements are in the order that the commands were executed.
*
* @return The update count information, which may be <code>null</code>.
*/
public int[] getUpdateCounts()
{
return updateCounts;
}
}
} // class BatchUpdateException
/* Blob.java -- Access a SQL Binary Large OBject.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -35,97 +35,97 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
import java.io.InputStream;
import java.io.OutputStream;
/**
* This interface specified methods for accessing a SQL BLOB (Binary
* Large OBject) type.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Blob
* This interface specified methods for accessing a SQL BLOB (Binary
* Large OBject) type.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
* @since 1.2
*/
public interface Blob
{
/*************************************************************************/
/**
* This method returns the number of bytes in the BLOB.
*
* @return The number of bytes in the BLOB.
*
* @exception SQLException If an error occurs.
*/
public abstract long
length() throws SQLException;
/*************************************************************************/
/**
* This method returns up to the requested bytes of this BLOB as a
* <code>byte</code> array.
*
* @param offset The index into the BLOB to start returning bytes from.
* @param length The requested number of bytes to return.
*
* @return The requested bytes from the BLOB.
*
* @exception SQLException If an error occurs.
*/
public abstract byte[]
getBytes(long offset, int length) throws SQLException;
/*************************************************************************/
/**
* This method returns a stream that will read the bytes of the BLOB.
*
* @return A stream that will read the bytes of the BLOB.
*
* @exception SQLException If an error occurs.
*/
public abstract InputStream
getBinaryStream() throws SQLException;
/*************************************************************************/
/**
* This method returns the index into the BLOB at which the first instance
* of the specified bytes occur. The searching starts at the specified
* index into the BLOB.
*
* @param pattern The byte pattern to search for.
* @param offset The index into the BLOB to starting searching for the pattern.
*
* @return The offset at which the pattern is first found, or -1 if the
* pattern is not found.
*
* @exception SQLException If an error occurs.
*/
public abstract long
position(byte[] pattern, long offset) throws SQLException;
/*************************************************************************/
/**
* This method returns the index into the BLOB at which the first instance
* of the specified pattern occurs. The searching starts at the specified
* index into this BLOB. The bytes in the specified <code>Blob</code> are
* used as the search pattern.
*
* @param pattern The <code>Blob</code> containing the byte pattern to
* search for.
* @param offset The index into the BLOB to starting searching for the pattern.
*
* @return The offset at which the pattern is first found, or -1 if the
* pattern is not found.
*
* @exception SQLException If an error occurs.
*/
public abstract long
position(Blob pattern, long offset) throws SQLException;
} // interface Blob
/**
* This method returns the number of bytes in the BLOB.
*
* @return The number of bytes in the BLOB.
* @exception SQLException If an error occurs.
*/
public long length() throws SQLException;
/**
* This method returns up to the requested bytes of this BLOB as a
* <code>byte</code> array.
*
* @param pos The index into the BLOB to start returning bytes from.
* @param length The requested number of bytes to return.
* @return The requested bytes from the BLOB.
* @exception SQLException If an error occurs.
*/
public byte[] getBytes(long pos, int length) throws SQLException;
/**
* This method returns a stream that will read the bytes of the BLOB.
*
* @return A stream that will read the bytes of the BLOB.
* @exception SQLException If an error occurs.
*/
public InputStream getBinaryStream() throws SQLException;
/**
* This method returns the index into the BLOB at which the first instance
* of the specified bytes occur. The searching starts at the specified
* index into the BLOB.
*
* @param pattern The byte pattern to search for.
* @param offset The index into the BLOB to starting searching for the pattern.
* @return The offset at which the pattern is first found, or -1 if the
* pattern is not found.
* @exception SQLException If an error occurs.
*/
public long position(byte[] pattern, long start) throws SQLException;
/**
* This method returns the index into the BLOB at which the first instance
* of the specified pattern occurs. The searching starts at the specified
* index into this BLOB. The bytes in the specified <code>Blob</code> are
* used as the search pattern.
*
* @param pattern The <code>Blob</code> containing the byte pattern to
* search for.
* @param offset The index into the BLOB to starting searching for the pattern.
* @return The offset at which the pattern is first found, or -1 if the
* pattern is not found.
* @exception SQLException If an error occurs.
*/
public long position(Blob pattern, long start) throws SQLException;
/**
* @exception SQLException If an error occurs.
* @since 1.4
*/
public int setBytes(long pos, byte[] bytes) throws SQLException;
/**
* @exception SQLException If an error occurs.
* @since 1.4
*/
public int setBytes(long pos, byte[] bytes, int offset, int len)
throws SQLException;
/**
* @exception SQLException If an error occurs.
* @since 1.4
*/
public OutputStream setBinaryStream(long pos) throws SQLException;
/**
* @exception SQLException If an error occurs.
* @since 1.4
*/
public void truncate(long len) throws SQLException;
}
/* Clob.java -- Access Character Large OBjects
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -35,113 +35,118 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
/**
* This interface contains methods for accessing a SQL CLOB (Character
* Large OBject) type.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Clob
* This interface contains methods for accessing a SQL CLOB (Character
* Large OBject) type.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Clob
{
/**
/**
* This method returns the number of characters in the CLOB.
*
* @return The number of characters in the CLOB.
*
* @exception SQLException If an error occurs.
*/
public abstract long
length() throws SQLException;
/*************************************************************************/
/**
* This method returns the specified portion of the CLOB as a
* <code>String</code>.
*
* @param offset The index into the CLOB (index values start at 1) to
* start returning characters from.
* @param length The requested number of characters to return.
*
* @return The requested CLOB section, as a <code>String</code>.
*
* @exception SQLException If an error occurs.
*/
public abstract String
getSubString(long offset, int length) throws SQLException;
/*************************************************************************/
/**
* This method returns a byte stream that reads the contents of the
* CLOB as a series of ASCII bytes.
*
* @return A stream to read the CLOB's contents.
*
* @exception SQLException If an error occurs.
*/
public abstract InputStream
getAsciiStream() throws SQLException;
/*************************************************************************/
/**
* This method returns a character stream that reads the contents of the
* CLOB.
*
* @return A character stream to read the CLOB's contents.
*
* @exception SQLException If an error occurs.
* @since 1.2
*/
public abstract Reader
getCharacterStream() throws SQLException;
/*************************************************************************/
/**
* This method returns the index into the CLOB of the first occurrence of
* the specified character pattern (supplied by the caller as a
* <code>String</code>). The search begins at the specified index.
*
* @param pattern The character pattern to search for, passed as a
* <code>String</code>.
* @param offset. The index into the CLOB to start search (indexes start
* at 1).
*
* @return The index at which the pattern was found (indexes start at 1),
* or -1 if the pattern was not found.
*
* @exception SQLException If an error occurs.
*/
public abstract long
position(String pattern, long offset) throws SQLException;
/*************************************************************************/
/**
* This method returns the index into the CLOB of the first occurrence of
* the specified character pattern (supplied by the caller as a
* <code>Clob</code>). The search begins at the specified index.
*
* @param pattern The character pattern to search for, passed as a
* <code>Clob</code>.
* @param offset. The index into the CLOB to start search (indexes start
* at 1).
*
* @return The index at which the pattern was found (indexes start at 1),
* or -1 if the pattern was not found.
*
* @exception SQLException If an error occurs.
*/
public abstract long
position(Clob pattern, long offset) throws SQLException;
} // interface Clob
public long length() throws SQLException;
/**
* This method returns the specified portion of the CLOB as a
* <code>String</code>.
*
* @param offset The index into the CLOB (index values start at 1) to
* start returning characters from.
* @param length The requested number of characters to return.
* @return The requested CLOB section, as a <code>String</code>.
* @exception SQLException If an error occurs.
* @since 1.2
*/
public String getSubString(long pos, int length) throws SQLException;
/**
* This method returns a character stream that reads the contents of the
* CLOB.
*
* @return A character stream to read the CLOB's contents.
* @exception SQLException If an error occurs.
* @since 1.2
*/
public Reader getCharacterStream() throws SQLException;
/**
* This method returns a byte stream that reads the contents of the
* CLOB as a series of ASCII bytes.
*
* @return A stream to read the CLOB's contents.
* @exception SQLException If an error occurs.
* @since 1.2
*/
public InputStream getAsciiStream() throws SQLException;
/**
* This method returns the index into the CLOB of the first occurrence of
* the specified character pattern (supplied by the caller as a
* <code>String</code>). The search begins at the specified index.
*
* @param searchstr The character pattern to search for, passed as a
* <code>String</code>.
* @param start. The index into the CLOB to start search (indexes start
* at 1).
* @return The index at which the pattern was found (indexes start at 1),
* or -1 if the pattern was not found.
* @exception SQLException If an error occurs.
* @since 1.2
*/
public long position(String searchstr, long start) throws SQLException;
/**
* This method returns the index into the CLOB of the first occurrence of
* the specified character pattern (supplied by the caller as a
* <code>Clob</code>). The search begins at the specified index.
*
* @param searchstr The character pattern to search for, passed as a
* <code>Clob</code>.
* @param start. The index into the CLOB to start search (indexes start
* at 1).
* @return The index at which the pattern was found (indexes start at 1),
* or -1 if the pattern was not found.
* @exception SQLException If an error occurs.
* @since 1.2
*/
public long position(Clob searchstr, long start) throws SQLException;
/**
* @since 1.4
*/
public int setString(long pos, String str) throws SQLException;
/**
* @since 1.4
*/
public int setString(long pos, String str, int offset, int len)
throws SQLException;
/**
* @since 1.4
*/
public OutputStream setAsciiStream(long pos) throws SQLException;
/**
* @since 1.4
*/
public Writer setCharacterStream(long pos) throws SQLException;
/**
* @since 1.4
*/
public void truncate(long len) throws SQLException;
}
/* DataTruncation.java -- Warning when data has been truncated.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -35,7 +35,6 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
/**
......@@ -44,164 +43,115 @@ package java.sql;
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class DataTruncation extends SQLWarning
{
/*************************************************************************/
/*
* Instance Variables
*/
/**
* The original size of the data.
* @serialized
*/
private int dataSize;
/**
* The index of the parameter or column whose value was truncated.
* @serialized
*/
private int index;
/**
* Indicates whether or not a parameter value was truncated.
* @serialized
*/
private boolean parameter;
/**
* Indicates whether or not a data column value was truncated.
* @serialized
*/
private boolean read;
/**
* This is the size of the data after truncation.
* @serialized
*/
private int transferSize;
/*************************************************************************/
/**
* Static Variables
*/
/**
* This is the serialization UID for this class
*/
private static final long serialVersionUID = 6464298989504059473L;
/*************************************************************************/
/*
* Constructors
*/
/**
* This method initializes a new instance of <code>DataTruncation</code>
* with the specified values. The descriptive error message for this
* exception will be "Data truncation", the SQL state will be "01004"
* and the vendor specific error code will be set to 0.
*
* @param index The index of the parameter or column that was truncated.
* @param parameter <code>true</code> if a parameter was truncated,
* <code>false</code> otherwise.
* @param read <code>true</code> if a data column was truncated,
* <code>false</code> otherwise.
* @param dataSize The original size of the data.
* @param transferSize The size of the data after truncation.
*/
public
DataTruncation(int index, boolean parameter, boolean read, int dataSize,
int transferSize)
public class DataTruncation extends SQLWarning
{
super("Data truncation", "01004");
this.index = index;
this.parameter = parameter;
this.read = read;
this.dataSize = dataSize;
this.transferSize = transferSize;
static final long serialVersionUID = 6464298989504059473L;
/**
* The original size of the data.
*/
private int dataSize;
/**
* The index of the parameter or column whose value was truncated.
*/
private int index;
/**
* Indicates whether or not a parameter value was truncated.
*/
private boolean parameter;
/**
* Indicates whether or not a data column value was truncated.
*/
private boolean read;
/**
* This is the size of the data after truncation.
*/
private int transferSize;
/**
* This method initializes a new instance of <code>DataTruncation</code>
* with the specified values. The descriptive error message for this
* exception will be "Data truncation", the SQL state will be "01004"
* and the vendor specific error code will be set to 0.
*
* @param index The index of the parameter or column that was truncated.
* @param parameter <code>true</code> if a parameter was truncated,
* <code>false</code> otherwise.
* @param read <code>true</code> if a data column was truncated,
* <code>false</code> otherwise.
* @param dataSize The original size of the data.
* @param transferSize The size of the data after truncation.
*/
public DataTruncation(int index, boolean parameter, boolean read, int
dataSize, int transferSize)
{
super("Data truncation", "01004");
this.index = index;
this.parameter = parameter;
this.read = read;
this.dataSize = dataSize;
this.transferSize = transferSize;
}
/**
* This method returns the index of the column or parameter that was
* truncated.
*
* @return The index of the column or parameter that was truncated.
*/
public int getIndex()
{
return index;
}
/**
* This method determines whether or not it was a parameter that was
* truncated.
*
* @return <code>true</code> if a parameter was truncated, <code>false</code>
* otherwise.
*/
public boolean getParameter()
{
return parameter;
}
/**
* This method determines whether or not it was a column that was
* truncated.
*
* @return <code>true</code> if a column was truncated, <code>false</code>
* otherwise.
*/
public boolean getRead()
{
return read;
}
/**
* This method returns the original size of the parameter or column that
* was truncated.
*
* @return The original size of the parameter or column that was truncated.
*/
public int getDataSize()
{
return dataSize;
}
/**
* This method returns the size of the parameter or column after it was
* truncated.
*
* @return The size of the parameter or column after it was truncated.
*/
public int getTransferSize()
{
return transferSize;
}
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* This method returns the index of the column or parameter that was
* truncated.
*
* @return The index of the column or parameter that was truncated.
*/
public int
getIndex()
{
return(index);
}
/*************************************************************************/
/**
* This method determines whether or not it was a parameter that was
* truncated.
*
* @return <code>true</code> if a parameter was truncated, <code>false</code>
* otherwise.
*/
public boolean
getParameter()
{
return(parameter);
}
/*************************************************************************/
/**
* This method determines whether or not it was a column that was
* truncated.
*
* @return <code>true</code> if a column was truncated, <code>false</code>
* otherwise.
*/
public boolean
getRead()
{
return(read);
}
/*************************************************************************/
/**
* This method returns the original size of the parameter or column that
* was truncated.
*
* @return The original size of the parameter or column that was truncated.
*/
public int
getDataSize()
{
return(dataSize);
}
/*************************************************************************/
/**
* This method returns the size of the parameter or column after it was
* truncated.
*
* @return The size of the parameter or column after it was truncated.
*/
public int
getTransferSize()
{
return(transferSize);
}
} // class DataTruncation
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -35,7 +35,6 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
import java.text.SimpleDateFormat;
......@@ -46,104 +45,69 @@ import java.text.SimpleDateFormat;
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class Date extends java.util.Date
{
/*
* Class Variables
*/
/**
* Used for parsing and formatting this date.
*/
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/**
* This is the serialization UID for this class.
*/
private static final long serialVersionUID = 1511598038487230103L;
/*************************************************************************/
/*
* Class Methods
*/
/**
* This method returns a new instance of this class by parsing a
* date in JDBC format into a Java date.
*
* @param str The string to parse.
*
* @return The resulting <code>java.sql.Date</code> value.
*/
public static Date
valueOf(String str)
{
try
{
java.util.Date d = (java.util.Date)sdf.parseObject(str);
return(new Date(d.getTime()));
}
catch(Exception e)
{
return(null);
}
}
/*************************************************************************/
/*
* Constructors
*/
/**
* This method initializes a new instance of this class with the
* specified year, month, and day.
*
* @param year The year of this date minue 1900.
* @param month The month of this date (0-11).
* @param day The day of this date (1-31).
*
* @deprecated
*/
public
Date(int year, int month, int day)
{
super(year, month, day);
}
/*************************************************************************/
/**
* This method initializes a new instance of this class with the
* specified time value representing the number of seconds since
* Jan 1, 1970 at 12:00 midnight GMT.
*
* @param time The time value to intialize this date to.
*/
public
Date(long date)
public class Date extends java.util.Date
{
super(date);
static final long serialVersionUID = 1511598038487230103L;
/**
* Used for parsing and formatting this date.
*/
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/**
* This method initializes a new instance of this class with the
* specified year, month, and day.
*
* @param year The year of this date minue 1900.
* @param month The month of this date (0-11).
* @param day The day of this date (1-31).
*
* @deprecated
*/
public Date(int year, int month, int day)
{
super(year, month, day);
}
/**
* This method initializes a new instance of this class with the
* specified time value representing the number of seconds since
* Jan 1, 1970 at 12:00 midnight GMT.
*
* @param time The time value to intialize this date to.
*/
public Date(long date)
{
super(date);
}
/**
* This method returns a new instance of this class by parsing a
* date in JDBC format into a Java date.
*
* @param str The string to parse.
* @return The resulting <code>java.sql.Date</code> value.
*/
public static Date valueOf(String str)
{
try
{
java.util.Date d = (java.util.Date) sdf.parseObject(str);
return(new Date(d.getTime()));
}
catch(Exception e)
{
return(null);
}
}
/**
* This method returns this date in JDBC format.
*
* @return This date as a string.
*/
public String toString()
{
return(sdf.format(this));
}
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* This method returns this date in JDBC format.
*
* @return This date as a string.
*/
public String
toString()
{
return(sdf.format(this));
}
} // class Date
......@@ -35,7 +35,6 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
import java.util.Properties;
......@@ -54,95 +53,71 @@ import java.util.Properties;
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Driver
public interface Driver
{
/**
* This method returns the major version number of the driver.
*
* @return The major version number of the driver.
*/
public abstract int
getMajorVersion();
/*************************************************************************/
/**
* This method returns the minor version number of the driver.
*
* @return The minor version number of the driver.
*/
public abstract int
getMinorVersion();
/*************************************************************************/
/**
* This method tests whether or not the driver is JDBC compliant. This
* method should only return <code>true</code> if the driver has been
* certified as JDBC compliant.
*
* @return <code>true</code> if the driver has been certified JDBC compliant,
* <code>false</code> otherwise.
*/
public abstract boolean
jdbcCompliant();
/*************************************************************************/
/**
* This method returns an array of possible properties that could be
* used to connect to the specified database.
*
* @param url The URL string of the database to connect to.
* @param properties The list of properties the caller is planning to use
* to connect to the database.
*
* @return A list of possible additional properties for a connection to this
* database. This list may be empty.
*
* @exception SQLException If an error occurs.
*/
public abstract DriverPropertyInfo[]
getPropertyInfo(String url, Properties properties) throws SQLException;
/*************************************************************************/
/**
* This method tests whether or not the driver believes it can connect to
* the specified database. The driver should only test whether it
* understands and accepts the URL. It should not necessarily attempt to
* probe the database for a connection.
*
* @param The database URL string.
*
* @return <code>true</code> if the drivers can connect to the database,
* <code>false</code> otherwise.
*
* @exception SQLException If an error occurs.
*/
public abstract boolean
acceptsURL(String url) throws SQLException;
/*************************************************************************/
/**
* This method connects to the specified database using the connection
* properties supplied. If the driver does not understand the database
* URL, it should return <code>null</code> instead of throwing an
* exception since the <code>DriverManager</code> will probe a driver
* in this manner.
*
* @param url The URL string for this connection.
* @param properties The list of database connection properties.
*
* @return A <code>Connection</code> object for the newly established
* connection, or <code>null</code> if the URL is not understood.
*
* @exception SQLException If an error occurs.
*/
public abstract Connection
connect(String url, Properties properties) throws SQLException;
} // interface Driver
/**
* This method connects to the specified database using the connection
* properties supplied. If the driver does not understand the database
* URL, it should return <code>null</code> instead of throwing an
* exception since the <code>DriverManager</code> will probe a driver
* in this manner.
*
* @param url The URL string for this connection.
* @param properties The list of database connection properties.
* @return A <code>Connection</code> object for the newly established
* connection, or <code>null</code> if the URL is not understood.
* @exception SQLException If an error occurs.
*/
public Connection connect(String url, Properties info) throws SQLException;
/**
* This method tests whether or not the driver believes it can connect to
* the specified database. The driver should only test whether it
* understands and accepts the URL. It should not necessarily attempt to
* probe the database for a connection.
*
* @param The database URL string.
* @return <code>true</code> if the drivers can connect to the database,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
*/
public boolean acceptsURL(String url) throws SQLException;
/**
* This method returns an array of possible properties that could be
* used to connect to the specified database.
*
* @param url The URL string of the database to connect to.
* @param properties The list of properties the caller is planning to use
* to connect to the database.
* @return A list of possible additional properties for a connection to this
* database. This list may be empty.
* @exception SQLException If an error occurs.
*/
public DriverPropertyInfo[] getPropertyInfo(String url, Properties properties)
throws SQLException;
/**
* This method returns the major version number of the driver.
*
* @return The major version number of the driver.
*/
public int getMajorVersion();
/**
* This method returns the minor version number of the driver.
*
* @return The minor version number of the driver.
*/
public int getMinorVersion();
/**
* This method tests whether or not the driver is JDBC compliant. This
* method should only return <code>true</code> if the driver has been
* certified as JDBC compliant.
*
* @return <code>true</code> if the driver has been certified JDBC compliant,
* <code>false</code> otherwise.
*/
public boolean jdbcCompliant();
}
......@@ -39,64 +39,50 @@ exception statement from your version. */
package java.sql;
/**
* This class holds a driver property that can be used for querying or
* setting driver configuration parameters.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class DriverPropertyInfo
{
/*
* Instance Variables
* This class holds a driver property that can be used for querying or
* setting driver configuration parameters.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
/**
* The name of the property.
*/
public String name;
/**
* This is the value of the property.
*/
public String value;
/**
* A description of the property, possibly <code>null</code>.
*/
public String description;
/**
* A flag indicating whether or not a value for this property is required
* in order to connect to the database.
*/
public boolean required;
/**
* If values are restricted to certain choices, this is the list of valid
* ones. Otherwise it is <code>null</code>.
*/
public String[] choices;
/*************************************************************************/
/*
* Constructors
*/
/**
* This method initializes a new instance of <code>DriverPropertyInfo</code>
* with the specified name and value. All other fields are defaulted.
*
* @param name The name of the property.
* @param value The value to assign to the property.
*/
public
DriverPropertyInfo(String name, String value)
public class DriverPropertyInfo
{
this.name = name;
this.value = value;
/**
* The name of the property.
*/
public String name;
/**
* A description of the property, possibly <code>null</code>.
*/
public String description;
/**
* A flag indicating whether or not a value for this property is required
* in order to connect to the database.
*/
public boolean required;
/**
* This is the value of the property.
*/
public String value;
/**
* If values are restricted to certain choices, this is the list of valid
* ones. Otherwise it is <code>null</code>.
*/
public String[] choices;
/**
* This method initializes a new instance of <code>DriverPropertyInfo</code>
* with the specified name and value. All other fields are defaulted.
*
* @param name The name of the property.
* @param value The value to assign to the property.
*/
public DriverPropertyInfo(String name, String value)
{
this.name = name;
this.value = value;
}
}
} // DriverPropertyInfo
/* ParameterMetaData.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
/**
* @since 1.4
*/
public interface ParameterMetaData
{
public static final int parameterNoNulls = 0;
public static final int parameterNullable = 1;
public static final int parameterNullableUnknown = 2;
public static final int parameterModeUnknown = 0;
public static final int parameterModeIn = 1;
public static final int parameterModeInOut = 2;
public static final int parameterModeOut = 4;
/**
* @since 1.4
*/
public int getParameterCount() throws SQLException;
/**
* @since 1.4
*/
public int isNullable(int param) throws SQLException;
/**
* @since 1.4
*/
public boolean isSigned(int param) throws SQLException;
/**
* @since 1.4
*/
public int getPrecision(int param) throws SQLException;
/**
* @since 1.4
*/
public int getScale(int param) throws SQLException;
/**
* @since 1.4
*/
public int getParameterType(int param) throws SQLException;
/**
* @since 1.4
*/
public String getParameterTypeName(int param) throws SQLException;
/**
* @since 1.4
*/
public String getParameterClassName(int param) throws SQLException;
/**
* @since 1.4
*/
public int getParameterMode(int param) throws SQLException;
}
......@@ -35,28 +35,41 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
import java.util.Map;
/**
* This interface provides a mechanism for obtaining information about
* a SQL structured type
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Ref
* This interface provides a mechanism for obtaining information about
* a SQL structured type
*
* @author Aaron M. Renn (arenn@urbanophile.com)
* @since 1.2
*/
public interface Ref
{
/**
* This method returns the fully qualified name of the SQL structured
* type of the referenced item.
*
* @return The fully qualified name of the SQL structured type.
* @exception SQLException If an error occurs.
* @since 1.2
*/
public String getBaseTypeName() throws SQLException;
/**
* This method returns the fully qualified name of the SQL structured
* type of the referenced item.
*
* @return The fully qualified name of the SQL structured type.
*
* @exception SQLException If an error occurs.
*/
public abstract String
getBaseTypeName() throws SQLException;
} // interface Ref
/**
* @since 1.4
*/
public Object getObject(Map map) throws SQLException;
/**
* @since 1.4
*/
public Object getObject() throws SQLException;
/**
* @since 1.4
*/
public void setObject(Object value) throws SQLException;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -39,47 +39,34 @@ exception statement from your version. */
package java.sql;
/**
* This interface is used for mapping SQL data to user defined datatypes.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface SQLData
* This interface is used for mapping SQL data to user defined datatypes.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface SQLData
{
/**
* This method returns the user defined datatype name for this object.
*
* @return The user defined data type name for this object.
* @exception SQLException If an error occurs.
*/
public String getSQLTypeName() throws SQLException;
/**
* This method returns the user defined datatype name for this object.
*
* @return The user defined data type name for this object.
*
* @exception SQLException If an error occurs.
*/
public abstract String
getSQLTypeName() throws SQLException;
/*************************************************************************/
/**
* This method populates the data in the object from the specified stream.
*
* @param stream The stream to read the data from.
* @param name The data type name of the data on the stream.
*
* @exception SQLException If an error occurs.
*/
public abstract void
readSQL(SQLInput stream, String name) throws SQLException;
/*************************************************************************/
/**
* This method writes the data in this object to the specified stream.
*
* @param stream The stream to write the data to.
*
* @exception SQLException If an error occurs.
*/
public abstract void
writeSQL(SQLOutput stream) throws SQLException;
} // interface SQLData
/**
* This method populates the data in the object from the specified stream.
*
* @param stream The stream to read the data from.
* @param name The data type name of the data on the stream.
* @exception SQLException If an error occurs.
*/
public void readSQL(SQLInput stream, String typeName) throws SQLException;
/**
* This method writes the data in this object to the specified stream.
*
* @param stream The stream to write the data to.
* @exception SQLException If an error occurs.
*/
public void writeSQL(SQLOutput stream) throws SQLException;
}
......@@ -39,183 +39,129 @@ exception statement from your version. */
package java.sql;
/**
* This exception is thrown when a database error occurs.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class SQLException extends Exception
{
/*************************************************************************/
/*
* Instance Variables
* This exception is thrown when a database error occurs.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
/**
* This is the next exception in the chain
* @serialized
*/
private SQLException next;
/**
* This is the state of the SQL statement at the time of the error.
* @serialized
*/
private String SQLState;
/**
* The vendor error code for this error
* @serialized
*/
private int vendorCode;
/*************************************************************************/
/**
* Static Variables
*/
/**
* This is the serialization UID for this class
*/
private static final long serialVersionUID = 2135244094396331484L;
/*************************************************************************/
/*
* Constructors
*/
/**
* This method initializes a new instance of <code>SQLException</code>
* that does not have a descriptive messages and SQL state, and which
* has a vendor error code of 0.
*/
public
SQLException()
{
this(null, null, 0);
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>SQLException</code>
* with the specified descriptive error message. The SQL state of this
* instance will be <code>null</code> and the vendor error code will be 0.
*
* @param message A string describing the nature of the error.
*/
public
SQLException(String message)
public class SQLException extends Exception
{
this(message, null, 0);
static final long serialVersionUID = 2135244094396331484L;
/**
* This is the next exception in the chain
*/
private SQLException next;
/**
* This is the state of the SQL statement at the time of the error.
*/
private String SQLState;
/**
* The vendor error code for this error
*/
private int vendorCode;
/**
* This method initializes a nwe instance of <code>SQLException</code>
* with the specified descriptive error message, SQL state string, and
* vendor code.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
* @param vendorCode The vendor error code associated with this error.
*/
public SQLException(String message, String SQLState, int vendorCode)
{
super(message);
this.SQLState = SQLState;
this.vendorCode = vendorCode;
}
/**
* This method initializes a new instance of <code>SQLException</code>
* with the specified descriptive error message and SQL state string.
* The vendor error code of this instance will be 0.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
*/
public SQLException(String message, String SQLState)
{
this(message, SQLState, 0);
}
/**
* This method initializes a new instance of <code>SQLException</code>
* with the specified descriptive error message. The SQL state of this
* instance will be <code>null</code> and the vendor error code will be 0.
*
* @param message A string describing the nature of the error.
*/
public SQLException(String message)
{
this(message, null, 0);
}
/**
* This method initializes a new instance of <code>SQLException</code>
* that does not have a descriptive messages and SQL state, and which
* has a vendor error code of 0.
*/
public SQLException()
{
this(null, null, 0);
}
/**
* This method returns the SQLState information associated with this
* error. The value returned is a <code>String</code> which is formatted
* using the XOPEN SQL state conventions.
*
* @return The SQL state, which may be <code>null</code>.
*/
public String getSQLState()
{
return SQLState;
}
/**
* This method returns the vendor specific error code associated with
* this error.
*
* @return The vendor specific error code associated with this error.
*/
public int getErrorCode()
{
return vendorCode;
}
/**
* This method returns the exception that is chained to this object.
*
* @return The exception chained to this object, which may be
* <code>null</code>.
*/
public SQLException getNextException()
{
return next;
}
/**
* This method adds a new exception to the end of the chain of exceptions
* that are chained to this object.
*
* @param e The exception to add to the end of the chain.
*/
public void setNextException(SQLException e)
{
if (e == null)
return;
SQLException list_entry = this;
while (list_entry.getNextException() != null)
list_entry = list_entry.getNextException();
list_entry.next = e;
}
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>SQLException</code>
* with the specified descriptive error message and SQL state string.
* The vendor error code of this instance will be 0.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
*/
public
SQLException(String message, String SQLState)
{
this(message, SQLState, 0);
}
/*************************************************************************/
/**
* This method initializes a nwe instance of <code>SQLException</code>
* with the specified descriptive error message, SQL state string, and
* vendor code.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
* @param vendorCode The vendor error code associated with this error.
*/
public
SQLException(String message, String SQLState, int vendorCode)
{
super(message);
this.SQLState = SQLState;
this.vendorCode = vendorCode;
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* This method returns the SQLState information associated with this
* error. The value returned is a <code>String</code> which is formatted
* using the XOPEN SQL state conventions.
*
* @return The SQL state, which may be <code>null</code>.
*/
public String
getSQLState()
{
return(SQLState);
}
/*************************************************************************/
/**
* This method returns the vendor specific error code associated with
* this error.
*
* @return The vendor specific error code associated with this error.
*/
public int
getErrorCode()
{
return(vendorCode);
}
/*************************************************************************/
/**
* This method returns the exception that is chained to this object.
*
* @return The exception chained to this object, which may be
* <code>null</code>.
*/
public SQLException
getNextException()
{
return(next);
}
/*************************************************************************/
/**
* This method adds a new exception to the end of the chain of exceptions
* that are chained to this object.
*
* @param e The exception to add to the end of the chain.
*/
public void
setNextException(SQLException e)
{
if (e == null)
return;
SQLException list_entry = this;
while (list_entry.getNextException() != null)
list_entry = list_entry.getNextException();
list_entry.next = e;
}
} // class SQLException
/* SQLPermission.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
import java.security.BasicPermission;
/**
* @since 1.3
*/
public final class SQLPermission extends BasicPermission
{
public SQLPermission(String name)
{
super(name);
}
public SQLPermission(String name, String actions)
{
super(name, actions);
}
}
/* SQLWarning.java -- Database access warnings.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -39,120 +39,82 @@ exception statement from your version. */
package java.sql;
/**
* This exception is thrown when a database warning occurs.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class SQLWarning extends SQLException
{
/*************************************************************************/
/**
* Static Variables
*/
/**
* This is the serialization UID for this class
*/
private static final long serialVersionUID = 3917336774604784856L;
/*************************************************************************/
/*
* Constructors
* This exception is thrown when a database warning occurs.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
/**
* This method initializes a new instance of <code>SQLWarning</code>
* that does not have a descriptive messages and SQL state, and which
* has a vendor error code of 0.
*/
public
SQLWarning()
{
this(null, null, 0);
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>SQLWarning</code>
* with the specified descriptive error message. The SQL state of this
* instance will be <code>null</code> and the vendor error code will be 0.
*
* @param message A string describing the nature of the error.
*/
public
SQLWarning(String message)
{
this(message, null, 0);
}
/*************************************************************************/
/**
* This method initializes a new instance of <code>SQLWarning</code>
* with the specified descriptive error message and SQL state string.
* The vendor error code of this instance will be 0.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
*/
public
SQLWarning(String message, String SQLState)
public class SQLWarning extends SQLException
{
this(message, SQLState, 0);
static final long serialVersionUID = 3917336774604784856L;
/**
* This method initializes a nwe instance of <code>SQLWarning</code>
* with the specified descriptive error message, SQL state string, and
* vendor code.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
* @param vendorCode The vendor error code associated with this error.
*/
public SQLWarning(String reason, String SQLState, int vendorCode)
{
super(reason, SQLState, vendorCode);
}
/**
* This method initializes a new instance of <code>SQLWarning</code>
* with the specified descriptive error message and SQL state string.
* The vendor error code of this instance will be 0.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
*/
public SQLWarning(String message, String SQLState)
{
super(message, SQLState);
}
/**
* This method initializes a new instance of <code>SQLWarning</code>
* with the specified descriptive error message. The SQL state of this
* instance will be <code>null</code> and the vendor error code will be 0.
*
* @param message A string describing the nature of the error.
*/
public SQLWarning(String message)
{
super(message);
}
/**
* This method initializes a new instance of <code>SQLWarning</code>
* that does not have a descriptive messages and SQL state, and which
* has a vendor error code of 0.
*/
public SQLWarning()
{
super();
}
/**
* This method returns the exception that is chained to this object.
*
* @return The exception chained to this object, which may be
* <code>null</code>.
*/
public SQLWarning getNextWarning()
{
return (SQLWarning) super.getNextException();
}
/**
* This method adds a new exception to the end of the chain of exceptions
* that are chained to this object.
*
* @param w The exception to add to the end of the chain.
*/
public void setNextWarning(SQLWarning w)
{
super.setNextException(w);
}
}
/*************************************************************************/
/**
* This method initializes a nwe instance of <code>SQLWarning</code>
* with the specified descriptive error message, SQL state string, and
* vendor code.
*
* @param message A string describing the nature of the error.
* @param SQLState A string containing the SQL state of the error.
* @param vendorCode The vendor error code associated with this error.
*/
public
SQLWarning(String message, String SQLState, int vendorCode)
{
super(message, SQLState, vendorCode);
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* This method returns the exception that is chained to this object.
*
* @return The exception chained to this object, which may be
* <code>null</code>.
*/
public SQLWarning
getNextWarning()
{
return((SQLWarning)super.getNextException());
}
/*************************************************************************/
/**
* This method adds a new exception to the end of the chain of exceptions
* that are chained to this object.
*
* @param e The exception to add to the end of the chain.
*/
public void
setNextWarning(SQLWarning e)
{
super.setNextException(e);
}
} // class SQLWarning
/* SavePoint.java -- Returns information about the ResultSet
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.sql;
/**
* @since 1.4
*/
public interface Savepoint
{
/**
* @since 1.4
*/
public int getSavepointId() throws SQLException;
/**
* @since 1.4
*/
public String getSavepointName() throws SQLException;
}
/* Struct.java -- Mapping for a SQL structured type.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -41,51 +41,37 @@ package java.sql;
import java.util.Map;
/**
* This interface implements the standard type mapping for a SQL
* structured type.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Struct
* This interface implements the standard type mapping for a SQL
* structured type.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Struct
{
/**
* This method returns the name of the SQL structured type for this
* object.
*
* @return The SQL structured type name.
*
* @exception SQLException If an error occurs.
*/
public abstract String
getSQLTypeName() throws SQLException;
/*************************************************************************/
/**
* This method returns the attributes of this SQL structured type.
*
* @return The attributes of this structure type.
*
* @exception SQLException If an error occurs.
*/
public abstract Object[]
getAttributes() throws SQLException;
/*************************************************************************/
/**
* This method returns the attributes of this SQL structured type.
* The specified map of type mappings overrides the default mappings.
*
* @param map The map of SQL type mappings.
*
* @return The attributes of this structure type.
*
* @exception SQLException If a error occurs.
*/
public abstract Object[]
getAttributes(Map map) throws SQLException;
} // interface Struct
/**
* This method returns the name of the SQL structured type for this
* object.
*
* @return The SQL structured type name.
* @exception SQLException If an error occurs.
*/
public String getSQLTypeName() throws SQLException;
/**
* This method returns the attributes of this SQL structured type.
*
* @return The attributes of this structure type.
* @exception SQLException If an error occurs.
*/
public Object[] getAttributes() throws SQLException;
/**
* This method returns the attributes of this SQL structured type.
* The specified map of type mappings overrides the default mappings.
*
* @param map The map of SQL type mappings.
* @return The attributes of this structure type.
* @exception SQLException If a error occurs.
*/
public Object[] getAttributes(Map map) throws SQLException;
}
/* Time.java -- Wrapper around java.util.Date
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -41,113 +41,81 @@ package java.sql;
import java.text.SimpleDateFormat;
/**
* This class is a wrapper around java.util.Date to allow the JDBC
* driver to identify the value as a SQL Time.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class Time extends java.util.Date
{
/*
* Class Variables
*/
/**
* Used for parsing and formatting this date.
*/
private static SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
/**
* This is the serialization UID for this class.
*/
private static final long serialVersionUID = 8397324403548013681L;
/*************************************************************************/
/*
* Class Methods
*/
/**
* This method returns a new instance of this class by parsing a
* date in JDBC format into a Java date.
*
* @param str The string to parse.
*
* @return The resulting <code>java.sql.Time</code> value.
*/
public static Time
valueOf(String str)
{
try
{
java.util.Date d = (java.util.Date)sdf.parseObject(str);
return(new Time(d.getTime()));
}
catch(Exception e)
{
return(null);
}
}
/*************************************************************************/
/*
* Constructors
* This class is a wrapper around java.util.Date to allow the JDBC
* driver to identify the value as a SQL Time.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
/**
* This method initializes a new instance of this class with the
* specified year, month, and day.
*
* @param hour The hour for this Time (0-23)
* @param minute The minute for this time (0-59)
* @param second The second for this time (0-59)
*
* @deprecated
*/
public
Time(int hour, int minute, int second)
{
super(System.currentTimeMillis());
setHours(hour);
setMinutes(minute);
setSeconds(second);
}
/*************************************************************************/
/**
* This method initializes a new instance of this class with the
* specified time value representing the number of seconds since
* Jan 1, 1970 at 12:00 midnight GMT.
*
* @param time The time value to intialize this <code>Time</code> to.
*/
public
Time(long date)
public class Time extends java.util.Date
{
super(date);
}
/*************************************************************************/
/*
* Instance Methods
*/
static final long serialVersionUID = 8397324403548013681L;
/**
* Used for parsing and formatting this date.
*/
private static SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
/**
* This method returns a new instance of this class by parsing a
* date in JDBC format into a Java date.
*
* @param str The string to parse.
* @return The resulting <code>java.sql.Time</code> value.
*/
public static Time valueOf(String str)
{
try
{
java.util.Date d = (java.util.Date) sdf.parseObject(str);
return new Time(d.getTime());
}
catch (Exception e)
{
return null;
}
}
/**
* This method initializes a new instance of this class with the
* specified year, month, and day.
*
* @param hour The hour for this Time (0-23)
* @param minute The minute for this time (0-59)
* @param second The second for this time (0-59)
* @deprecated
*/
public Time(int hour, int minute, int second)
{
super(System.currentTimeMillis());
setHours(hour);
setMinutes(minute);
setSeconds(second);
}
/**
* This method initializes a new instance of this class with the
* specified time value representing the number of seconds since
* Jan 1, 1970 at 12:00 midnight GMT.
*
* @param time The time value to intialize this <code>Time</code> to.
*/
public Time(long date)
{
super(date);
}
/**
* This method returns this date in JDBC format.
*
* @return This date as a string.
*/
public String
toString()
{
return sdf.format(this);
}
/**
* This method returns this date in JDBC format.
*
* @return This date as a string.
*/
public String
toString()
{
return(sdf.format(this));
}
} // class Time
......@@ -39,49 +39,47 @@ exception statement from your version. */
package java.sql;
/**
* This class contains constants that are used to identify SQL data types.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
* This class contains constants that are used to identify SQL data types.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class Types
{
// These should be self explanatory. People need a SQL book, not
// Javadoc comments for these.
public static final int BIT = -7;
public static final int TINYINT = -6;
public static final int SMALLINT = 5;
public static final int INTEGER = 4;
public static final int BIGINT = -5;
public static final int FLOAT = 6;
public static final int REAL = 7;
public static final int DOUBLE = 8;
public static final int NUMERIC = 2;
public static final int DECIMAL = 3;
public static final int CHAR = 1;
public static final int VARCHAR = 12;
public static final int LONGVARCHAR = -1;
public static final int DATE = 91;
public static final int TIME = 92;
public static final int TIMESTAMP = 93;
public static final int BINARY = -2;
public static final int VARBINARY = -3;
public static final int LONGVARBINARY = -4;
public static final int NULL = 0;
public static final int OTHER = 1111;
public static final int JAVA_OBJECT = 2000;
public static final int DISTINCT = 2001;
public static final int STRUCT = 2002;
public static final int ARRAY = 2003;
public static final int BLOB = 2004;
public static final int CLOB = 2005;
public static final int REF = 2006;
// These should be self explanatory. People need a SQL book, not
// Javadoc comments for these.
public static final int BIT = -7;
public static final int TINYINT = -6;
public static final int SMALLINT = 5;
public static final int INTEGER = 4;
public static final int BIGINT = -5;
public static final int FLOAT = 6;
public static final int REAL = 7;
public static final int DOUBLE = 8;
public static final int NUMERIC = 2;
public static final int DECIMAL = 3;
public static final int CHAR = 1;
public static final int VARCHAR = 12;
public static final int LONGVARCHAR = -1;
public static final int DATE = 91;
public static final int TIME = 92;
public static final int TIMESTAMP = 93;
public static final int BINARY = -2;
public static final int VARBINARY = -3;
public static final int LONGVARBINARY = -4;
public static final int NULL = 0;
public static final int OTHER = 1111;
public static final int JAVA_OBJECT = 2000;
public static final int DISTINCT = 2001;
public static final int STRUCT = 2002;
public static final int ARRAY = 2003;
public static final int BLOB = 2004;
public static final int CLOB = 2005;
public static final int REF = 2006;
public static final int DATALINK = 70;
public static final int BOOLEAN = 16;
// This class can't be instantiated.
private Types ()
private Types()
{
}
} // class Types
}
/* ConnectionEvent.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.sql.SQLException;
import java.util.EventObject;
/**
* @since 1.4
*/
public class ConnectionEvent extends EventObject
{
private SQLException sqlException;
/**
* @since 1.4
*/
public ConnectionEvent(PooledConnection con)
{
super(con);
}
/**
* @since 1.4
*/
public ConnectionEvent(PooledConnection con, SQLException ex)
{
super(con);
this.sqlException = ex;
}
/**
* @since 1.4
*/
public SQLException getSQLException()
{
return sqlException;
}
}
/* ConnectionEventListener.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.util.EventListener;
/**
* @since 1.4
*/
public interface ConnectionEventListener extends EventListener
{
/**
* @since 1.4
*/
public void connectionClosed(ConnectionEvent event);
/**
* @since 1.4
*/
public void connectionErrorOccurred(ConnectionEvent event);
}
/* ConnectionPoolDataSource.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.io.PrintWriter;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface ConnectionPoolDataSource
{
/**
* @since 1.4
*/
public PooledConnection getPooledConnection() throws SQLException;
/**
* @since 1.4
*/
public PooledConnection getPooledConnection(String user, String password)
throws SQLException;
/**
* @since 1.4
*/
public PrintWriter getLogWriter() throws SQLException;
/**
* @since 1.4
*/
public void setLogWriter(PrintWriter out) throws SQLException;
/**
* @since 1.4
*/
public void setLoginTimeout(int seconds) throws SQLException;
/**
* @since 1.4
*/
public int getLoginTimeout() throws SQLException;
}
/* DataSource.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface DataSource
{
/**
* @since 1.4
*/
public Connection getConnection() throws SQLException;
/**
* @since 1.4
*/
public Connection getConnection(String username, String password)
throws SQLException;
/**
* @since 1.4
*/
public PrintWriter getLogWriter() throws SQLException;
/**
* @since 1.4
*/
public void setLogWriter(PrintWriter out) throws SQLException;
/**
* @since 1.4
*/
public void setLoginTimeout(int seconds) throws SQLException;
/**
* @since 1.4
*/
public int getLoginTimeout() throws SQLException;
}
/* PooledConnection.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.sql.Connection;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface PooledConnection
{
/**
* @since 1.4
*/
public Connection getConnection() throws SQLException;
/**
* @since 1.4
*/
public void close() throws SQLException;
/**
* @since 1.4
*/
public void addConnectionEventListener(ConnectionEventListener listener);
/**
* @since 1.4
*/
public void removeConnectionEventListener(ConnectionEventListener listener);
}
/* RowSet.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Map;
/**
* @since 1.4
*/
public interface RowSet extends ResultSet
{
/**
* @since 1.4
*/
public String getUrl() throws SQLException;
/**
* @since 1.4
*/
public void setUrl(String url) throws SQLException;
/**
* @since 1.4
*/
public String getDataSourceName();
/**
* @since 1.4
*/
public void setDataSourceName(String name) throws SQLException;
/**
* @since 1.4
*/
public String getUsername();
/**
* @since 1.4
*/
public void setUsername(String name) throws SQLException;
/**
* @since 1.4
*/
public String getPassword();
/**
* @since 1.4
*/
public void setPassword(String password) throws SQLException;
/**
* @since 1.4
*/
public int getTransactionIsolation();
/**
* @since 1.4
*/
public void setTransactionIsolation(int level) throws SQLException;
/**
* @since 1.4
*/
public Map getTypeMap() throws SQLException;
/**
* @since 1.4
*/
public void setTypeMap(Map map) throws SQLException;
/**
* @since 1.4
*/
public String getCommand();
/**
* @since 1.4
*/
public void setCommand(String cmd) throws SQLException;
/**
* @since 1.4
*/
public boolean isReadOnly();
/**
* @since 1.4
*/
public void setReadOnly(boolean value) throws SQLException;
/**
* @since 1.4
*/
public int getMaxFieldSize() throws SQLException;
/**
* @since 1.4
*/
public void setMaxFieldSize(int max) throws SQLException;
/**
* @since 1.4
*/
public int getMaxRows() throws SQLException;
/**
* @since 1.4
*/
public void setMaxRows(int max) throws SQLException;
/**
* @since 1.4
*/
public boolean getEscapeProcessing() throws SQLException;
/**
* @since 1.4
*/
public void setEscapeProcessing(boolean enable) throws SQLException;
/**
* @since 1.4
*/
public int getQueryTimeout() throws SQLException;
/**
* @since 1.4
*/
public void setQueryTimeout(int seconds) throws SQLException;
/**
* @since 1.4
*/
public void setType(int type) throws SQLException;
/**
* @since 1.4
*/
public void setConcurrency(int concurrency) throws SQLException;
/**
* @since 1.4
*/
public void setNull(int parameterIndex, int sqlType) throws SQLException;
/**
* @since 1.4
*/
public void setNull(int paramIndex, int sqlType, String typeName) throws
SQLException;
/**
* @since 1.4
*/
public void setBoolean(int parameterIndex, boolean x) throws SQLException;
/**
* @since 1.4
*/
public void setByte(int parameterIndex, byte x) throws SQLException;
/**
* @since 1.4
*/
public void setShort(int parameterIndex, short x) throws SQLException;
/**
* @since 1.4
*/
public void setInt(int parameterIndex, int x) throws SQLException;
/**
* @since 1.4
*/
public void setLong(int parameterIndex, long x) throws SQLException;
/**
* @since 1.4
*/
public void setFloat(int parameterIndex, float x) throws SQLException;
/**
* @since 1.4
*/
public void setDouble(int parameterIndex, double x) throws SQLException;
/**
* @since 1.4
*/
public void setBigDecimal(int parameterIndex, BigDecimal x) throws
SQLException;
/**
* @since 1.4
*/
public void setString(int parameterIndex, String x) throws SQLException;
/**
* @since 1.4
*/
public void setBytes(int parameterIndex, byte[] x) throws SQLException;
/**
* @since 1.4
*/
public void setDate(int parameterIndex, Date x) throws SQLException;
/**
* @since 1.4
*/
public void setTime(int parameterIndex, Time x) throws SQLException;
/**
* @since 1.4
*/
public void setTimestamp(int parameterIndex, Timestamp x) throws
SQLException;
/**
* @since 1.4
*/
public void setAsciiStream(int parameterIndex, InputStream x, int length)
throws SQLException;
/**
* @since 1.4
*/
public void setBinaryStream(int parameterIndex, InputStream x, int length)
throws SQLException;
/**
* @since 1.4
*/
public void setCharacterStream(int parameterIndex, Reader reader, int
length) throws SQLException;
/**
* @since 1.4
*/
public void setObject(int parameterIndex, Object x, int targetSqlType, int
scale) throws SQLException;
/**
* @since 1.4
*/
public void setObject(int parameterIndex, Object x, int targetSqlType)
throws SQLException;
/**
* @since 1.4
*/
public void setObject(int parameterIndex, Object x) throws SQLException;
/**
* @since 1.4
*/
public void setRef(int i, Ref x) throws SQLException;
/**
* @since 1.4
*/
public void setBlob(int i, Blob x) throws SQLException;
/**
* @since 1.4
*/
public void setClob(int i, Clob x) throws SQLException;
/**
* @since 1.4
*/
public void setArray(int i, Array x) throws SQLException;
/**
* @since 1.4
*/
public void setDate(int parameterIndex, Date x, Calendar cal) throws
SQLException;
/**
* @since 1.4
*/
public void setTime(int parameterIndex, Time x, Calendar cal) throws
SQLException;
/**
* @since 1.4
*/
public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
throws SQLException;
/**
* @since 1.4
*/
public void clearParameters() throws SQLException;
/**
* @since 1.4
*/
public void execute() throws SQLException;
/**
* @since 1.4
*/
public void addRowSetListener(RowSetListener listener);
/**
* @since 1.4
*/
public void removeRowSetListener(RowSetListener listener);
}
/* RowSetEvent.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.util.EventObject;
/**
* @since 1.4
*/
public class RowSetEvent extends EventObject
{
public RowSetEvent(RowSet source)
{
super(source);
}
}
/* RowSetInternal.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface RowSetInternal
{
/**
* @since 1.4
*/
public Object[] getParams() throws SQLException;
/**
* @since 1.4
*/
public Connection getConnection() throws SQLException;
/**
* @since 1.4
*/
public void setMetaData(RowSetMetaData md) throws SQLException;
/**
* @since 1.4
*/
public ResultSet getOriginal() throws SQLException;
/**
* @since 1.4
*/
public ResultSet getOriginalRow() throws SQLException;
}
/* RowSetListener.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.util.EventListener;
/**
* @since 1.4
*/
public interface RowSetListener extends EventListener
{
/**
* @since 1.4
*/
public void rowSetChanged(RowSetEvent event);
/**
* @since 1.4
*/
public void rowChanged(RowSetEvent event);
/**
* @since 1.4
*/
public void cursorMoved(RowSetEvent event);
}
/* RowSetMetaData.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface RowSetMetaData extends ResultSetMetaData
{
/**
* @since 1.4
*/
public void setColumnCount(int columnCount) throws SQLException;
/**
* @since 1.4
*/
public void setAutoIncrement(int columnIndex, boolean property)
throws SQLException;
/**
* @since 1.4
*/
public void setCaseSensitive(int columnIndex, boolean property)
throws SQLException;
/**
* @since 1.4
*/
public void setSearchable(int columnIndex, boolean property)
throws SQLException;
/**
* @since 1.4
*/
public void setCurrency(int columnIndex, boolean property)
throws SQLException;
/**
* @since 1.4
*/
public void setNullable(int columnIndex, int property) throws SQLException;
/**
* @since 1.4
*/
public void setSigned(int columnIndex, boolean property)
throws SQLException;
/**
* @since 1.4
*/
public void setColumnDisplaySize(int columnIndex, int size)
throws SQLException;
/**
* @since 1.4
*/
public void setColumnLabel(int columnIndex, String label)
throws SQLException;
/**
* @since 1.4
*/
public void setColumnName(int columnIndex, String columnName)
throws SQLException;
/**
* @since 1.4
*/
public void setSchemaName(int columnIndex, String schemaName)
throws SQLException;
/**
* @since 1.4
*/
public void setPrecision(int columnIndex, int precision)
throws SQLException;
/**
* @since 1.4
*/
public void setScale(int columnIndex, int scale) throws SQLException;
/**
* @since 1.4
*/
public void setTableName(int columnIndex, String tableName)
throws SQLException;
/**
* @since 1.4
*/
public void setCatalogName(int columnIndex, String catalogName)
throws SQLException;
/**
* @since 1.4
*/
public void setColumnType(int columnIndex, int SQLType) throws SQLException;
/**
* @since 1.4
*/
public void setColumnTypeName(int columnIndex, String typeName)
throws SQLException;
}
/* RowSetReader.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface RowSetReader
{
/**
* @since 1.4
*/
public void readData(RowSetInternal caller) throws SQLException;
}
/* RowSetWriter.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface RowSetWriter
{
/**
* @since 1.4
*/
public boolean writeData(RowSetInternal caller) throws SQLException;
}
/* XAConnection.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.sql.SQLException;
import javax.transaction.xa.XAResource;
/**
* @since 1.4
*/
public interface XAConnection extends PooledConnection
{
/**
* @since 1.4
*/
public XAResource getXAResource() throws SQLException;
}
/* XADataSource.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.sql;
import java.io.PrintWriter;
import java.sql.SQLException;
/**
* @since 1.4
*/
public interface XADataSource
{
/**
* @since 1.4
*/
public XAConnection getXAConnection() throws SQLException;
/**
* @since 1.4
*/
public XAConnection getXAConnection(String user, String password) throws
SQLException;
/**
* @since 1.4
*/
public PrintWriter getLogWriter() throws SQLException;
/**
* @since 1.4
*/
public void setLogWriter(PrintWriter out) throws SQLException;
/**
* @since 1.4
*/
public void setLoginTimeout(int seconds) throws SQLException;
/**
* @since 1.4
*/
public int getLoginTimeout() throws SQLException;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment