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.11 2006/06/12 16:48:22 ian Exp $

Method Summary
 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

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.