Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enableit.db.darrt
Class PlainFormatter  view PlainFormatter download PlainFormatter.java

java.lang.Object
  extended byorg.enableit.db.darrt.PlainFormatter
All Implemented Interfaces:
DarrtListener, DiffFormatter, ReportListener

public class PlainFormatter
extends java.lang.Object
implements DiffFormatter, ReportListener


Field Summary
private  DDLFactory ddlFactory
           
private static java.lang.String indent
           
private  int index
           
protected static org.apache.log4j.Logger logger
          The Log4J Logger doing the logging.
private  java.io.PrintWriter out
           
private  org.enableit.db.darrt.schema.Provider provider
          The database provider to pass to the DDLFactory.
 
Fields inherited from interface org.enableit.db.darrt.ReportListener
about
 
Constructor Summary
PlainFormatter()
          Default constructor.
PlainFormatter(org.enableit.db.darrt.schema.Provider provider)
          Constructor that also sets database provider.
 
Method Summary
 java.lang.String format(org.enableit.db.darrt.beans.DiffData diff)
          Format a difference for another class to control the writing of.
 void handle(DarrtEvent event)
           
 void setWriter(java.io.Writer out)
          Set the writer for the report.
 void writeDiffs(java.util.List diffsList, java.io.Writer writer)
          Formats the differences and writes them to the writer provided.
private  void writeObj(java.lang.Object refObj, java.lang.Object targetObj, java.io.PrintWriter out, int printObjIdx)
          Uses introspection to compare properties of reference and target objects, then write the value of the requested one the writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

provider

private org.enableit.db.darrt.schema.Provider provider
The database provider to pass to the DDLFactory.


ddlFactory

private DDLFactory ddlFactory

index

private int index

out

private java.io.PrintWriter out

indent

private static final java.lang.String indent
See Also:
Constant Field Values

logger

protected static org.apache.log4j.Logger logger
The Log4J Logger doing the logging.

Constructor Detail

PlainFormatter

public PlainFormatter()
Default constructor.


PlainFormatter

public PlainFormatter(org.enableit.db.darrt.schema.Provider provider)
Constructor that also sets database provider.

Method Detail

handle

public void handle(DarrtEvent event)
Specified by:
handle in interface DarrtListener

setWriter

public void setWriter(java.io.Writer out)
Set the writer for the report.

Specified by:
setWriter in interface ReportListener

writeDiffs

public void writeDiffs(java.util.List diffsList,
                       java.io.Writer writer)
Formats the differences and writes them to the writer provided.

Specified by:
writeDiffs in interface DiffFormatter

format

public java.lang.String format(org.enableit.db.darrt.beans.DiffData diff)
Format a difference for another class to control the writing of.

Specified by:
format in interface DiffFormatter

writeObj

private void writeObj(java.lang.Object refObj,
                      java.lang.Object targetObj,
                      java.io.PrintWriter out,
                      int printObjIdx)
Uses introspection to compare properties of reference and target objects, then write the value of the requested one the writer.