com.wrq.apptrieve.jdbc
Class ApptrieveResultSetMetaData

java.lang.Object
  extended by com.wrq.apptrieve.jdbc.ApptrieveResultSetMetaData
All Implemented Interfaces:
java.sql.ResultSetMetaData

public class ApptrieveResultSetMetaData
extends java.lang.Object
implements java.sql.ResultSetMetaData


Field Summary
 
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Method Summary
 java.lang.String getCatalogName(int column)
          Gets the catalog name for the table from which an indexed column of this result set derives.
 java.lang.String getColumnClassName(int column)
          Gets the fully-qualified name for the Java class to which a value in an indexed column will be mapped.
 int getColumnCount()
          Gets the number of columns in the ResultSet object for which this ResultSetMetaData object pertains.
 int getColumnDisplaySize(int column)
          Gets the normal maximum width in characters for an indexed column.
 java.lang.String getColumnLabel(int column)
          Gets the suggested column title for an indexed column, to be used in printouts and displays.
 java.lang.String getColumnName(int column)
          Gets the name for an indexed column.
 int getColumnType(int column)
          Gets the JDBC type for the value stored in an indexed column.
 java.lang.String getColumnTypeName(int column)
          Gets type name used for the value stored in an indexed column.
 int getPrecision(int column)
          Gets the precision for an indexed column.
 int getScale(int column)
          Gets the number of digits to the right of the decimal point for values in an indexed column.
 java.lang.String getSchemaName(int column)
          Gets the schema name for the table from which an indexed column in this ResultSet was derived.
 java.lang.String getTableName(int column)
          Gets the name of the table from which an indexed column in this ResultSet was derived.
 boolean isAutoIncrement(int column)
          Discovers whether an indexed column is automatically numbered.
 boolean isCaseSensitive(int column)
          Discovers whether an indexed column is case sensitive.
 boolean isCurrency(int column)
          Discovers whether an indexed column a cash value.
 boolean isDefinitelyWritable(int column)
          Discovers whether a write on an indexed column will definitely succeed.
 int isNullable(int column)
          Discovers whether a null can be stored in an indexed column.
 boolean isReadOnly(int column)
          Discovers whether an indexed column is definitely not writable.
 boolean isSearchable(int column)
          Discovers whether the value stored in an indexed column can be used in a WHERE clause.
 boolean isSigned(int column)
          Discovers whether the value stored in an indexed column is a signed number.
 boolean isWritable(int column)
          Discovers whether it is possible for a write on an indexed column to succeed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCatalogName

public java.lang.String getCatalogName(int column)
                                throws java.sql.SQLException
Gets the catalog name for the table from which an indexed column of this result set derives. Apptrieve driver does not support this method

Specified by:
getCatalogName in interface java.sql.ResultSetMetaData
Parameters:
column - int - the index of the column
Returns:
java.lang.String - the catalog name
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getCatalogName(int)

getColumnClassName

public java.lang.String getColumnClassName(int column)
                                    throws java.sql.SQLException
Gets the fully-qualified name for the Java class to which a value in an indexed column will be mapped.

Specified by:
getColumnClassName in interface java.sql.ResultSetMetaData
Parameters:
column - int - the index of the column
Returns:
java.lang.String - the Java class name
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getColumnClassName(int)

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Gets the number of columns in the ResultSet object for which this ResultSetMetaData object pertains.

Specified by:
getColumnCount in interface java.sql.ResultSetMetaData
Returns:
int - the number of columns
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getColumnCount()

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                         throws java.sql.SQLException
Gets the normal maximum width in characters for an indexed column.

Specified by:
getColumnDisplaySize in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
int - the maximum width for the column
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getColumnDisplaySize(int)

getColumnLabel

public java.lang.String getColumnLabel(int column)
                                throws java.sql.SQLException
Gets the suggested column title for an indexed column, to be used in printouts and displays. For Apptrieve the column label is the same as the column name.

Specified by:
getColumnLabel in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
java.lang.String - the column label
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getColumnLabel(int)

getColumnName

public java.lang.String getColumnName(int column)
                               throws java.sql.SQLException
Gets the name for an indexed column.

Specified by:
getColumnName in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
java.lang.String - the column name
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getColumnName(int)

getColumnType

public int getColumnType(int column)
                  throws java.sql.SQLException
Gets the JDBC type for the value stored in an indexed column.

Specified by:
getColumnType in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
int - the column type (from the class java.sql.Types)
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getColumnType(int)

getColumnTypeName

public java.lang.String getColumnTypeName(int column)
                                   throws java.sql.SQLException
Gets type name used for the value stored in an indexed column.

Specified by:
getColumnTypeName in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
java.lang.String - the column type name
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getColumnTypeName(int)

getPrecision

public int getPrecision(int column)
                 throws java.sql.SQLException
Gets the precision for an indexed column. For number types, this is the number of decimal digits for the column. For character types, this is the maximum length in characters for the column. For binary types, this is the maximum length in bytes for the column.

Specified by:
getPrecision in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
int - the precision of the column
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getPrecision(int)

getScale

public int getScale(int column)
             throws java.sql.SQLException
Gets the number of digits to the right of the decimal point for values in an indexed column.

Specified by:
getScale in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
int - the number of digits to the right of the decimal point
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getScale(int)

getSchemaName

public java.lang.String getSchemaName(int column)
                               throws java.sql.SQLException
Gets the schema name for the table from which an indexed column in this ResultSet was derived. The Apptrieve driver does not support this method.

Specified by:
getSchemaName in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
java.lang.String - always empty
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getSchemaName(int)

getTableName

public java.lang.String getTableName(int column)
                              throws java.sql.SQLException
Gets the name of the table from which an indexed column in this ResultSet was derived.

Specified by:
getTableName in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
java.lang.String - the table name or an empty string if there is no table
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.getTableName(int)

isAutoIncrement

public boolean isAutoIncrement(int column)
                        throws java.sql.SQLException
Discovers whether an indexed column is automatically numbered.

Specified by:
isAutoIncrement in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isAutoIncrement(int)

isCaseSensitive

public boolean isCaseSensitive(int column)
                        throws java.sql.SQLException
Discovers whether an indexed column is case sensitive.

Specified by:
isCaseSensitive in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isCaseSensitive(int)

isCurrency

public boolean isCurrency(int column)
                   throws java.sql.SQLException
Discovers whether an indexed column a cash value.

Specified by:
isCurrency in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isCurrency(int)

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
                             throws java.sql.SQLException
Discovers whether a write on an indexed column will definitely succeed.

Specified by:
isDefinitelyWritable in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isDefinitelyWritable(int)

isNullable

public int isNullable(int column)
               throws java.sql.SQLException
Discovers whether a null can be stored in an indexed column.

Specified by:
isNullable in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isNullable(int)

isReadOnly

public boolean isReadOnly(int column)
                   throws java.sql.SQLException
Discovers whether an indexed column is definitely not writable.

Specified by:
isReadOnly in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isReadOnly(int)

isSearchable

public boolean isSearchable(int column)
                     throws java.sql.SQLException
Discovers whether the value stored in an indexed column can be used in a WHERE clause.

Specified by:
isSearchable in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isSearchable(int)

isSigned

public boolean isSigned(int column)
                 throws java.sql.SQLException
Discovers whether the value stored in an indexed column is a signed number.

Specified by:
isSigned in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isSigned(int)

isWritable

public boolean isWritable(int column)
                   throws java.sql.SQLException
Discovers whether it is possible for a write on an indexed column to succeed.

Specified by:
isWritable in interface java.sql.ResultSetMetaData
Parameters:
column - int - the column index
Returns:
boolean - true if so, false otherwise
Throws:
java.sql.SQLException
See Also:
ResultSetMetaData.isSigned(int)