org.afcs.warts.report
Class TableDescriptionReport

java.lang.Object
  extended byorg.afcs.warts.report.TableDescriptionReport

public final class TableDescriptionReport
extends java.lang.Object

The TableDescriptionReport class generates plain text description reports of database tables.

LICENSE: This code is released to the public domain and may be used for any purpose whatsoever without permission or acknowledgment.

Version:
Last Modified 15 October 2003
Author:
Warren Hedley ( whedley at sdsc dot edu )

Method Summary
static java.util.List getDescriptionReportData(TableDescription description)
          Produces the list of lists containing the values that make up the table description report.
static java.lang.String report(AccountConfiguration configuration)
          Iterates through all of the tables accessible via the specified account configuration, compiling the description report for each table into a larger report, which is returned.
static java.lang.String report(TableDescription description)
          Returns a description of the specified database table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

report

public static java.lang.String report(AccountConfiguration configuration)
Iterates through all of the tables accessible via the specified account configuration, compiling the description report for each table into a larger report, which is returned.

Parameters:
configuration - The account configuration to work with.
Returns:
A compilation of description reports for all of the tables accessible via the specified account configuration.
Throws:
java.lang.NullPointerException - If configuration is null.

report

public static java.lang.String report(TableDescription description)
Returns a description of the specified database table. The description contains a title and then a plain-text formatted table containing information about each column in the database table, including whether or not it's part of the primary key, the type of the column, the size of the column if appropriate, whether it's nullable, and it's default value.

Parameters:
description - The table to report on.
Returns:
A description of the specified database table.
Throws:
java.lang.NullPointerException - If description is null.

getDescriptionReportData

public static java.util.List getDescriptionReportData(TableDescription description)
Produces the list of lists containing the values that make up the table description report. This data can be used with a TablePrinter to produce plain text reports, or with a TableDescriptionModel to produce a Swing table version of the report.

Parameters:
description - The table to report on.
Returns:
A list of lists containing the values that make up the table description report.
Throws:
java.lang.NullPointerException - If description is null.