com.mungoknotwise.sqlcli
Class PrintStreamedShowTablesResultSetExtractor

java.lang.Object
  |
  +--com.mungoknotwise.sqlcli.BasicPrintStreamed
        |
        +--com.mungoknotwise.sqlcli.PrintStreamedShowTablesResultSetExtractor
All Implemented Interfaces:
PrintStreamed, ResultSetExtractor

public class PrintStreamedShowTablesResultSetExtractor
extends BasicPrintStreamed
implements ResultSetExtractor

Implemention of ResultSetExtractor that writes the results of a show tables command to the object's print streams.

Version:
$Id: PrintStreamedShowTablesResultSetExtractor.java,v 1.2 2004/09/07 22:24:21 mungoknotwise Exp $
Author:
Steven Caswell

Constructor Summary
PrintStreamedShowTablesResultSetExtractor()
          Constructs a new instance of PrintStreamedShowTablesResultSetExtractor.
 
Method Summary
 java.lang.Object extractData(java.sql.ResultSet resultSet)
          Extracts data from the result set. Implementing classes are expected to step through each row of the result set and handle the rows as desired.
 void setAttribute(java.lang.String key, java.lang.Object value)
          Sets the attribute value with the specified key.
 void setDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData)
          Sets the database metadata for use by this instance.
 void writeFooter()
          Writes the footer to the print streams.
 void writeHeader()
          Writes the header to the print streams.
 
Methods inherited from class com.mungoknotwise.sqlcli.BasicPrintStreamed
addPrintStream, print, println, removePrintStream, streamIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintStreamedShowTablesResultSetExtractor

public PrintStreamedShowTablesResultSetExtractor()
Constructs a new instance of PrintStreamedShowTablesResultSetExtractor.

Method Detail

extractData

public java.lang.Object extractData(java.sql.ResultSet resultSet)
                             throws java.sql.SQLException
Extracts data from the result set. Implementing classes are expected to step through each row of the result set and handle the rows as desired.

Specified by:
extractData in interface ResultSetExtractor
Parameters:
resultSet - the result set
Returns:
the extracted result set
Throws:
java.sql.SQLException - if an error occurs

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Sets the attribute value with the specified key.

Specified by:
setAttribute in interface ResultSetExtractor
Parameters:
key - the attribute key
value - the attribute value

setDatabaseMetaData

public void setDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData)
Sets the database metadata for use by this instance.

Parameters:
databaseMetaData - databaseMetaData

writeFooter

public void writeFooter()
Writes the footer to the print streams.


writeHeader

public void writeHeader()
Writes the header to the print streams.



Copyright © 2004 Steven Caswell. All Rights Reserved.