org.javaWebGen.util
Class GenerateTestCase

java.lang.Object
  extended by org.javaWebGen.data.DAO
      extended by org.javaWebGen.util.CodeGenerator
          extended by org.javaWebGen.util.GenerateTestCase

public class GenerateTestCase
extends CodeGenerator

Generated database aware JavaBean objects based on database config

Version:
$Revision: 1.2 $
Author:
Kevin scott

Field Summary
static int DEFAULT_PRIMARYKEY_ID
           
static java.lang.String DEFAULT_PRIMARYKEY_VALUE
           
static java.lang.String VERSION
           
 
Fields inherited from class org.javaWebGen.util.CodeGenerator
TS
 
Fields inherited from class org.javaWebGen.data.DAO
TOO_MANY_ROWS, TOO_MANY_ROWS_WARNING
 
Constructor Summary
GenerateTestCase()
           
 
Method Summary
protected  java.lang.String buldClass()
          8** build class based on template
protected  void execute()
          main writing loop called by processFile
 void init()
          run init code ie stuff to setup templates
static void main(java.lang.String[] args)
          main
 java.lang.String makeDelete(java.lang.String[] cols, int[] types)
          make delete test case
 java.lang.String makeGetByPrimaryKey(java.lang.String[] cols, int[] types)
          getPrimary key test case
 java.lang.String makeInsert(java.lang.String[] cols, int[] types)
          make test Insert TestCase
 java.lang.String makeListAll(java.lang.String[] cols, int[] types)
          make list all test case
 java.lang.String makeUpdate(java.lang.String[] cols, int[] types)
          make update test case
 void useage()
          print instruction on how to object from the command line to sysout
 
Methods inherited from class org.javaWebGen.util.CodeGenerator
getClassText, getColNames, getColTypes, getFileName, getFilePath, getPrimaryKeys, getPrimaryKeyTypes, getPrimayParmCast, getTableName, getTemplate, getVars, mapData, processFile, setCmdParms, setTableName
 
Methods inherited from class org.javaWebGen.data.DAO
close, getColumnClass, getConnection, getDataManager, getNextValue, getNextValue, getResultSet, query, query, query, query, runQuery, runQuery, runQuery, runQuery, setColumn, update, update, update, update, updateDataBean, updateDataBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

DEFAULT_PRIMARYKEY_ID

public static final int DEFAULT_PRIMARYKEY_ID
See Also:
Constant Field Values

DEFAULT_PRIMARYKEY_VALUE

public static final java.lang.String DEFAULT_PRIMARYKEY_VALUE
See Also:
Constant Field Values
Constructor Detail

GenerateTestCase

public GenerateTestCase()
Method Detail

init

public void init()
Description copied from class: CodeGenerator
run init code ie stuff to setup templates

Specified by:
init in class CodeGenerator

makeInsert

public java.lang.String makeInsert(java.lang.String[] cols,
                                   int[] types)
make test Insert TestCase

Parameters:
cols -
types -
Returns:
text

makeUpdate

public java.lang.String makeUpdate(java.lang.String[] cols,
                                   int[] types)
make update test case

Parameters:
cols -
types -
Returns:
text

makeDelete

public java.lang.String makeDelete(java.lang.String[] cols,
                                   int[] types)
make delete test case

Parameters:
cols -
types -
Returns:
text

makeListAll

public java.lang.String makeListAll(java.lang.String[] cols,
                                    int[] types)
make list all test case

Parameters:
cols -
types -
Returns:
text

makeGetByPrimaryKey

public java.lang.String makeGetByPrimaryKey(java.lang.String[] cols,
                                            int[] types)
getPrimary key test case

Parameters:
cols -
types -
Returns:
text

buldClass

protected java.lang.String buldClass()
                              throws java.lang.Exception
8** build class based on template

Throws:
java.lang.Exception

execute

protected void execute()
                throws UtilException
main writing loop called by processFile

Specified by:
execute in class CodeGenerator
Throws:
UtilException

main

public static void main(java.lang.String[] args)
main


useage

public void useage()
Description copied from class: CodeGenerator
print instruction on how to object from the command line to sysout

Specified by:
useage in class CodeGenerator


Copyright(C) 2003-2006 Kevin Scott - All Rights Reserved.