Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
OOoRunner test harness

stats
Class DataBaseOutProducer

java.lang.Object
  |
  +--stats.DataBaseOutProducer
All Implemented Interfaces:
LogWriter
Direct Known Subclasses:
ComplexDataBaseOutProducer, FatDataBaseOutProducer

public abstract class DataBaseOutProducer
extends Object
implements LogWriter


Field Summary
protected  boolean m_bDebug
           
protected  SQLExecution mSqlExec
           
protected  Hashtable mSqlInput
           
protected  Hashtable mSqlOutput
           
protected  String[] mWriteableEntryTypes
           
 
Constructor Summary
DataBaseOutProducer(Hashtable param)
          Creates a new instance of DataBaseOutProducer
 
Method Summary
protected  boolean executeSQLCommand(String command)
          Wrap the command of SQLExecution class for transparency.
protected  boolean executeSQLCommand(String command, boolean mergeOutput)
          Wrap the command of SQLExecution class for transparency.
protected  boolean findTypeInEntryTree(DescEntry entry, LogWriter log)
          Step recursively through the entry tree: write all entries of the defined types to the database.
 boolean initialize(DescEntry entry, boolean active)
          initialization
protected  boolean insertEntry(DescEntry entry, LogWriter log)
          Insert this entrry to the database.
protected abstract  boolean insertEntry(LogWriter log)
          Insert one entr into the database.
protected  boolean isWriteableEntryType(DescEntry entry)
          Is the entry of the writeable entry type?
protected abstract  boolean prepareDataBase(LogWriter log)
          Prepare the database: executed once at the beginning.
 void println(String msg)
          Method to print: empty here
 void setWriteableEntryTypes(String[] types)
          Set the writeable entry types: for example "method", "interface", etc.
 boolean summary(DescEntry entry)
          will mostly be used by outproducers to sum up the information, maybe write them to a db
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSqlInput

protected Hashtable mSqlInput

mSqlOutput

protected Hashtable mSqlOutput

mWriteableEntryTypes

protected String[] mWriteableEntryTypes

mSqlExec

protected SQLExecution mSqlExec

m_bDebug

protected boolean m_bDebug
Constructor Detail

DataBaseOutProducer

public DataBaseOutProducer(Hashtable param)
Creates a new instance of DataBaseOutProducer
Parameters:
param - The Hashtable with test parameters
Method Detail

initialize

public boolean initialize(DescEntry entry,
                          boolean active)
initialization
Specified by:
initialize in interface LogWriter

summary

public boolean summary(DescEntry entry)
Description copied from interface: LogWriter
will mostly be used by outproducers to sum up the information, maybe write them to a db
Specified by:
summary in interface LogWriter

findTypeInEntryTree

protected boolean findTypeInEntryTree(DescEntry entry,
                                      LogWriter log)
Step recursively through the entry tree: write all entries of the defined types to the database.
Parameters:
entry - The description entry that is take as root
log - The log writer

insertEntry

protected boolean insertEntry(DescEntry entry,
                              LogWriter log)
Insert this entrry to the database.
Parameters:
entry - The entry to write.
log - The log writer.

setWriteableEntryTypes

public void setWriteableEntryTypes(String[] types)
Set the writeable entry types: for example "method", "interface", etc. All these entries are written to the database.
Parameters:
types - A String array with all types that have to be written.

isWriteableEntryType

protected boolean isWriteableEntryType(DescEntry entry)
Is the entry of the writeable entry type?
Parameters:
entry - The entry that is checked
Returns:
True, if it is indeed a writeable entry.

executeSQLCommand

protected boolean executeSQLCommand(String command,
                                    boolean mergeOutput)
Wrap the command of SQLExecution class for transparency.

executeSQLCommand

protected boolean executeSQLCommand(String command)
Wrap the command of SQLExecution class for transparency.

println

public void println(String msg)
Method to print: empty here
Specified by:
println in interface LogWriter

prepareDataBase

protected abstract boolean prepareDataBase(LogWriter log)
Prepare the database: executed once at the beginning. Abstract method, so derived classes have to overwrite it.

insertEntry

protected abstract boolean insertEntry(LogWriter log)
Insert one entr into the database. Abstract method, so derived classes have to overwrite it.

OOoRunner test harness

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.