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:
- PropertyChangeEvent
- VetoableChangeEvent
-
SQLResultSetMetaData()
- Constructs a default SQLResultSetMetaData object.
-
SQLResultSetMetaData(ResultSetMetaData)
- Constructs an SQLResultSetMetaData object with the specified metadata.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a PropertyChangeListener.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds the VetoableChangeListener.
-
getColumnCount()
- Returns the number of columns in the result set.
-
getColumnDisplaySize(int)
- Returns the display size in characters of the column specified by columnIndex.
-
getColumnLabel(int)
- Returns the label of the column specified by columnIndex.
-
getColumnName(int)
- Returns the name of the column specified by columnIndex.
-
getColumnType(int)
- Returns the SQL data type of the column specified by columnIndex.
-
getColumnTypeName(int)
- Returns the data type name of the column specified by columnIndex.
-
getMetaData()
- Returns the result set metadata.
-
getPrecision(int)
- Returns the number of decimal digits for the column specified by columnIndex.
-
getScale(int)
- Returns the number of digits to the right of the decimal point for the column
specified by columnIndex.
-
isNumericData(int)
- Indicates if the column specified by columnIndex contains numeric data.
-
isTextData(int)
- Indicates if the column specified by columnIndex contains text data.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes the PropertyChangeListener from the internal list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes the VetoableChangeListener from the internal list.
-
setColumnLabel(int, String)
- Sets the specified label at the column specified by columnIndex.
-
setMetaData(ResultSetMetaData)
- Sets the result set metadata.
SQLResultSetMetaData
public SQLResultSetMetaData()
- Constructs a default SQLResultSetMetaData object.
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.
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
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
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.
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.
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.
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.
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.
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.
getMetaData
public ResultSetMetaData getMetaData()
- Returns the result set metadata.
- Returns:
- The metadata.
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.
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.
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.
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.
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
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
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.
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