com.darwinsys.sql
Class ResultsDecorator

java.lang.Object
  extended by com.darwinsys.sql.ResultsDecorator
Direct Known Subclasses:
ResultsDecoratorHTML, ResultsDecoratorJTable, ResultsDecoratorSQL, ResultsDecoratorText, ResultsDecoratorXML

public abstract class ResultsDecorator
extends java.lang.Object

Base class for a series of ResultSet printers.

Version:
$Id: ResultsDecorator.java,v 1.12 2007/10/17 16:43:51 ian Exp $

Method Summary
abstract  void displayTable(java.lang.String table, java.sql.ResultSet rs)
          Print the resultset as a table info
 void flush()
           
abstract  java.lang.String getName()
          Print the name of this Decorator's output format
 void print(java.lang.String lineSeg)
           
 void println()
           
 void println(java.lang.String line)
           
 void printRowCount(int n)
           
 void setWriter(java.io.PrintWriter out)
           
abstract  int write(java.sql.ResultSet rs)
          Print the contents of a ResultSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public abstract java.lang.String getName()
Print the name of this Decorator's output format


write

public abstract int write(java.sql.ResultSet rs)
                   throws java.io.IOException,
                          java.sql.SQLException
Print the contents of a ResultSet

Throws:
java.io.IOException
java.sql.SQLException

displayTable

public abstract void displayTable(java.lang.String table,
                                  java.sql.ResultSet rs)
                           throws java.io.IOException,
                                  java.sql.SQLException
Print the resultset as a table info

Throws:
java.io.IOException
java.sql.SQLException

printRowCount

public void printRowCount(int n)
                   throws java.io.IOException
Throws:
java.io.IOException

println

public void println(java.lang.String line)
             throws java.io.IOException
Throws:
java.io.IOException

println

public void println()
             throws java.io.IOException
Throws:
java.io.IOException

print

public void print(java.lang.String lineSeg)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()

setWriter

public void setWriter(java.io.PrintWriter out)


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.