aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/sql/DataTruncation.java
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2002-06-21 05:39:33 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2002-06-21 06:39:33 +0100
commitf2390faddfd8fb109355466b4ba961ef07457006 (patch)
treed61a972368a3bd024fed477ac2ab03e86b96d2f3 /libjava/java/sql/DataTruncation.java
parent00b94a4440d95cc009c4434782a00eced71e2745 (diff)
downloadgcc-f2390faddfd8fb109355466b4ba961ef07457006.zip
gcc-f2390faddfd8fb109355466b4ba961ef07457006.tar.gz
gcc-f2390faddfd8fb109355466b4ba961ef07457006.tar.bz2
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
Diffstat (limited to 'libjava/java/sql/DataTruncation.java')
-rw-r--r--libjava/java/sql/DataTruncation.java272
1 files changed, 111 insertions, 161 deletions
diff --git a/libjava/java/sql/DataTruncation.java b/libjava/java/sql/DataTruncation.java
index 0cb67ae..9892cd0 100644
--- a/libjava/java/sql/DataTruncation.java
+++ b/libjava/java/sql/DataTruncation.java
@@ -1,5 +1,5 @@
/* 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
-