org.jcoderz.phoenix.sqlparser
Class SqlTransformer

java.lang.Object
  extended by org.jcoderz.phoenix.sqlparser.SqlTransformer

public class SqlTransformer
extends Object

Author:
Albrecht Messner

Constructor Summary
SqlTransformer(String inFile, String outFile, String metainfFile, boolean force)
          Constructor.
 
Method Summary
 boolean checkFiles()
          Check status of input and output files.
 void execute()
          Executes transformation based on timestamp checking and force flag.
 void filterComments()
          Filters all comments out of the input file and writes the filtered SQL to the output file.
static void main(String[] args)
          Main method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlTransformer

public SqlTransformer(String inFile,
                      String outFile,
                      String metainfFile,
                      boolean force)
Constructor.

Parameters:
inFile - the input file
outFile - the output file
metainfFile - file containing meta information
force - force transformation flag
Method Detail

execute

public void execute()
Executes transformation based on timestamp checking and force flag.


checkFiles

public boolean checkFiles()
                   throws IOException
Check status of input and output files.

Returns:
true if the transformation needs to be performed, false otherwise
Throws:
IOException - if the input file does not exist

filterComments

public void filterComments()
                    throws FileNotFoundException,
                           ParseException
Filters all comments out of the input file and writes the filtered SQL to the output file.

Throws:
FileNotFoundException - if the input file could not be opened
ParseException - if the input file could not be parsed

main

public static void main(String[] args)
Main method.

Parameters:
args - command line args


Copyright 2007 The jCoderZ Project.