All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.util.servlet.SQLResultSetMetaData

java.lang.Object
   |
   +----com.ibm.as400.util.servlet.SQLResultSetMetaData

public class SQLResultSetMetaData
extends Object
implements RowMetaData, Serializable
An SQLResultSetMetaData object can be used to find out information about the columns of an SQLResultSetRowData object.

Serializing the object results in the metadata being cached with the object. After deserialization the cached data is used until the metadata is reset using the setMetaData method.

SQLResultSetMetaData objects generate the following events:


Constructor Index

 o SQLResultSetMetaData()
Constructs a default SQLResultSetMetaData object.
 o SQLResultSetMetaData(ResultSetMetaData)
Constructs an SQLResultSetMetaData object with the specified metadata.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener.
 o addVetoableChangeListener(VetoableChangeListener)
Adds the VetoableChangeListener.
 o getColumnCount()
Returns the number of columns in the result set.
 o getColumnDisplaySize(int)
Returns the display size in characters of the column specified by columnIndex.
 o getColumnLabel(int)
Returns the label of the column specified by columnIndex.
 o getColumnName(int)
Returns the name of the column specified by columnIndex.
 o getColumnType(int)
Returns the SQL data type of the column specified by columnIndex.
 o getColumnTypeName(int)
Returns the data type name of the column specified by columnIndex.
 o getMetaData()
Returns the result set metadata.
 o getPrecision(int)
Returns the number of decimal digits for the column specified by columnIndex.
 o getScale(int)
Returns the number of digits to the right of the decimal point for the column specified by columnIndex.
 o isNumericData(int)
Indicates if the column specified by columnIndex contains numeric data.
 o isTextData(int)
Indicates if the column specified by columnIndex contains text data.
 o removePropertyChangeListener(PropertyChangeListener)
Removes the PropertyChangeListener from the internal list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes the VetoableChangeListener from the internal list.
 o setColumnLabel(int, String)
Sets the specified label at the column specified by columnIndex.
 o setMetaData(ResultSetMetaData)
Sets the result set metadata.

Constructors

 o SQLResultSetMetaData
 public SQLResultSetMetaData()
Constructs a default SQLResultSetMetaData object.

 o SQLResultSetMetaData
 public SQLResultSetMetaData(ResultSetMetaData metadata) throws RowDataException
Constructs an SQLResultSetMetaData object with the specified metadata.

Parameters:
metadata - The metadata.
Throws: RowDataException
If a row data error occurs.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method is called each time the value of any bound property is changed.

Parameters:
listener - The PropertyChangeListener.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds the VetoableChangeListener. The specified VetoableChangeListener's vetoableChange method is called each time the value of any constrained property is changed.

Parameters:
listener - The VetoableChangeListener.
See Also:
removeVetoableChangeListener
 o getColumnCount
 public int getColumnCount() throws RowDataException
Returns the number of columns in the result set.

Returns:
The number of columns.
Throws: RowDataException
If a row data error occurs.
 o getColumnDisplaySize
 public int getColumnDisplaySize(int columnIndex) throws RowDataException
Returns the display size in characters of the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column display size in characters.
Throws: RowDataException
If a row data error occurs.
 o getColumnLabel
 public String getColumnLabel(int columnIndex) throws RowDataException
Returns the label of the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column label.
Throws: RowDataException
If a row data error occurs.
 o getColumnName
 public String getColumnName(int columnIndex) throws RowDataException
Returns the name of the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column name.
Throws: RowDataException
If a row data error occurs.
 o getColumnType
 public int getColumnType(int columnIndex) throws RowDataException
Returns the SQL data type of the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column SQL type (see java.sql.Types).
Throws: RowDataException
If a row data error occurs.
 o getColumnTypeName
 public String getColumnTypeName(int columnIndex) throws RowDataException
Returns the data type name of the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column data type name.
Throws: RowDataException
If a row data error occurs.
 o getMetaData
 public ResultSetMetaData getMetaData()
Returns the result set metadata.

Returns:
The metadata.
 o getPrecision
 public int getPrecision(int columnIndex) throws RowDataException
Returns the number of decimal digits for the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column precision (number of decimal digits).
Throws: RowDataException
If a row data error occurs.
 o getScale
 public int getScale(int columnIndex) throws RowDataException
Returns the number of digits to the right of the decimal point for the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
Returns:
The column scale (number of decimal digits to the right of the decimal point).
Throws: RowDataException
If a row data error occurs.
 o isNumericData
 public boolean isNumericData(int columnIndex) throws RowDataException
Indicates if the column specified by columnIndex contains numeric data.

Parameters:
columnIndex - The column index (0-based).
Returns:
true if numeric data; false otherwise.
Throws: RowDataException
If a row data error occurs.
 o isTextData
 public boolean isTextData(int columnIndex) throws RowDataException
Indicates if the column specified by columnIndex contains text data.

Parameters:
columnIndex - The column index (0-based).
Returns:
true if text data; false otherwise.
Throws: RowDataException
If a row data error occurs.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list. If the PropertyChangeListener is not on the list, nothing is done.

Parameters:
listener - The PropertyChangeListener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. If the VetoableChangeListener is not on the list, nothing is done.

Parameters:
listener - The VetoableChangeListener.
See Also:
addVetoableChangeListener
 o setMetaData
 public void setMetaData(ResultSetMetaData metadata) throws PropertyVetoException, RowDataException
Sets the result set metadata.

Parameters:
metadata - The metadata.
Throws: PropertyVetoException
If a change is vetoed.
Throws: RowDataException
If a row data error occurs.
 o setColumnLabel
 public void setColumnLabel(int columnIndex,
                            String label) throws RowDataException
Sets the specified label at the column specified by columnIndex.

Parameters:
columnIndex - The column index (0-based).
label - The label.
Throws: RowDataException
If a row data error occurs.

All Packages  Class Hierarchy  This Package  Previous  Next  Index