org.javaWebGen.data.util
Class GenerateDataBean

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

public class GenerateDataBean
extends CodeGenerator

Generated database aware JavaBean objects based on database config

Version:
$Revision: 1.2 $
Author:
Kevin scott

Field Summary
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
GenerateDataBean()
           
 
Method Summary
protected  java.lang.String buldClass()
          8** build class based on template
protected  void execute()
          exec write Java class
 void init()
          run init code ie stuff to setup templates
static void main(java.lang.String[] args)
          main
 java.lang.String makeInsertSQL(java.lang.String[] cols)
          gen insert sql
protected  java.lang.String makeJSON(java.lang.String[] cols, int[] types)
          gen JSON for databean
 java.lang.String makeLoad(java.lang.String[] cols)
          gen load method
 java.lang.String makeSelectSQL(java.lang.String[] cols)
          gen select sql
protected  java.lang.String makeTypes(java.lang.String[] cols, int[] types)
          list of list of column types
 java.lang.String makeUpdateSQL(java.lang.String[] cols)
          gen update sql
protected  java.lang.String makeXML(java.lang.String tableName, java.lang.String[] cols, int[] types)
          gen xml for databean
 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
Constructor Detail

GenerateDataBean

public GenerateDataBean()
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

makeTypes

protected java.lang.String makeTypes(java.lang.String[] cols,
                                     int[] types)
list of list of column types


makeXML

protected java.lang.String makeXML(java.lang.String tableName,
                                   java.lang.String[] cols,
                                   int[] types)
                            throws java.lang.Exception
gen xml for databean

Throws:
java.lang.Exception

makeInsertSQL

public java.lang.String makeInsertSQL(java.lang.String[] cols)
gen insert sql


makeUpdateSQL

public java.lang.String makeUpdateSQL(java.lang.String[] cols)
gen update sql


makeSelectSQL

public java.lang.String makeSelectSQL(java.lang.String[] cols)
gen select sql


makeLoad

public java.lang.String makeLoad(java.lang.String[] cols)
gen load method


buldClass

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

Throws:
java.lang.Exception

makeJSON

protected java.lang.String makeJSON(java.lang.String[] cols,
                                    int[] types)
                             throws java.lang.Exception
gen JSON for databean

Throws:
java.lang.Exception

execute

protected void execute()
                throws UtilException
exec write Java class

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.