org.postgresql.pljava.jdbc
Class SyntheticResultSetMetaData

java.lang.Object
  extended by org.postgresql.pljava.jdbc.AbstractResultSetMetaData
      extended by org.postgresql.pljava.jdbc.SyntheticResultSetMetaData
All Implemented Interfaces:
java.sql.ResultSetMetaData

public class SyntheticResultSetMetaData
extends AbstractResultSetMetaData

Implementation of ResultSetMetaData for SyntheticResultSet


Field Summary
 
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Constructor Summary
SyntheticResultSetMetaData(ResultSetField[] fields)
          Constructor.
 
Method Summary
protected  void checkColumnIndex(int column)
          Checks if the column index is valid.
 java.lang.String getColumnClassName(int column)
          Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
 int getColumnCount()
          Returns the number of columns in this ResultSet object.
 java.lang.String getColumnLabel(int column)
          Gets the designated column's suggested title for use in printouts and displays.
protected  int getFieldLength(int column)
          Gets column length
protected  Oid getOid(int column)
          Gets column OID
 boolean isAutoIncrement(int column)
          Indicates whether the designated column is automatically numbered, thus read-only.
 
Methods inherited from class org.postgresql.pljava.jdbc.AbstractResultSetMetaData
getCatalogName, getColumnDisplaySize, getColumnName, getColumnType, getColumnTypeName, getPrecision, getScale, getSchemaName, getTableName, isCaseSensitive, isCurrency, isDefinitelyWritable, isNullable, isReadOnly, isSearchable, isSigned, isWritable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyntheticResultSetMetaData

public SyntheticResultSetMetaData(ResultSetField[] fields)
Constructor.

Parameters:
fields - Array of ResultSetField
Method Detail

getColumnCount

public final int getColumnCount()
                         throws java.sql.SQLException
Returns the number of columns in this ResultSet object.

Specified by:
getColumnCount in interface java.sql.ResultSetMetaData
Specified by:
getColumnCount in class AbstractResultSetMetaData
Returns:
the number of columns
Throws:
java.sql.SQLException - if a database access error occurs

isAutoIncrement

public final boolean isAutoIncrement(int column)
                              throws java.sql.SQLException
Indicates whether the designated column is automatically numbered, thus read-only.

Specified by:
isAutoIncrement in interface java.sql.ResultSetMetaData
Specified by:
isAutoIncrement in class AbstractResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
java.sql.SQLException - if a database access error occurs

getColumnLabel

public final java.lang.String getColumnLabel(int column)
                                      throws java.sql.SQLException
Gets the designated column's suggested title for use in printouts and displays.

Specified by:
getColumnLabel in interface java.sql.ResultSetMetaData
Specified by:
getColumnLabel in class AbstractResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the suggested column title
Throws:
java.sql.SQLException - if a database access error occurs

getColumnClassName

public final java.lang.String getColumnClassName(int column)
                                          throws java.sql.SQLException

Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. ResultSet.getObject may return a subclass of the class returned by this method.

Specified by:
getColumnClassName in interface java.sql.ResultSetMetaData
Specified by:
getColumnClassName in class AbstractResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping.
Throws:
java.sql.SQLException - if a database access error occurs
Since:
1.2

checkColumnIndex

protected final void checkColumnIndex(int column)
                               throws java.sql.SQLException
Checks if the column index is valid.

Specified by:
checkColumnIndex in class AbstractResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Throws:
java.sql.SQLException - if the column is out of index bounds

getOid

protected final Oid getOid(int column)
                    throws java.sql.SQLException
Gets column OID

Specified by:
getOid in class AbstractResultSetMetaData
Parameters:
column - Column index
Returns:
column OID
Throws:
java.sql.SQLException - if an error occurs

getFieldLength

protected final int getFieldLength(int column)
                            throws java.sql.SQLException
Gets column length

Specified by:
getFieldLength in class AbstractResultSetMetaData
Parameters:
column - Column index
Returns:
column length
Throws:
java.sql.SQLException - if an error occurs


Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. Distributed under the terms shown in COPYRIGHT