org.vizzini.database
Class Exporter

java.lang.Object
  extended by org.vizzini.database.Exporter

public class Exporter
extends Object

Provides database record export functionality.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
Exporter()
           
 
Method Summary
static void exportXML(Writer writer, IDatabase database)
          Export all records from the given database.
static void exportXML(Writer writer, List records)
          Export the given records and their related records.
protected static void printList(String title, List rows)
           
protected static void writeHeader(Writer writer)
          Write the XML header to the given writer.
protected static void writeRecords(Writer writer, Collection records)
          Export the given records, and their related records, from the given database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Exporter

public Exporter()
Method Detail

exportXML

public static void exportXML(Writer writer,
                             IDatabase database)
                      throws IOException,
                             SQLException
Export all records from the given database.

Throws:
IOException
SQLException
Since:
v0.3

exportXML

public static void exportXML(Writer writer,
                             List records)
                      throws IOException,
                             SQLException
Export the given records and their related records.

Throws:
IOException
SQLException
Since:
v0.3

printList

protected static void printList(String title,
                                List rows)

writeHeader

protected static void writeHeader(Writer writer)
                           throws IOException
Write the XML header to the given writer.

Throws:
IOException
Since:
v0.3

writeRecords

protected static void writeRecords(Writer writer,
                                   Collection records)
                            throws IOException
Export the given records, and their related records, from the given database.

Throws:
IOException
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02