|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ephman.abra.tools.GenericFactoryGenerator
(this is the generic base a db specific descendant will be copied into this package given a base output directory generate a factory class for get/put when given a JClass descriptor
Nested Class Summary | |
(package private) class |
GenericFactoryGenerator.InlineFieldWriter
|
(package private) class |
GenericFactoryGenerator.NativeObjectMapping
|
Field Summary | |
(package private) java.lang.String |
constructorString
|
(package private) java.lang.String |
END_DATE
|
(package private) static java.util.HashSet |
nativeClassSet
|
(package private) static java.util.HashMap |
nativeSetTypes
|
protected java.util.HashMap |
typeMap
|
static java.lang.String |
VERSION_NUMBER
|
Fields inherited from interface org.ephman.abra.tools.AbraTypes |
BIG_DECIMAL, BIG_INTEGER, BLOB, BOOLEAN, BOOLEAN_OBJ, CHARACTER, CLOB, DOUBLE, DOUBLE_OBJ, FLOAT, INTEGER, INTEGER_OBJ, LONG, STRING, TIMESTAMP |
Constructor Summary | |
GenericFactoryGenerator(java.lang.String outdir,
char file_sep,
java.lang.String imp,
boolean useProcs)
make a new generator with a base directory of outdir so for foo.bar.FooBar if outdir = /home/dknull and file_sep = '/' then a class /home/dknull/foo/bar/AbstractFooBarFactory.java is created |
Method Summary | |
protected java.lang.String |
createClobString()
|
protected void |
createTypeMap()
|
void |
generate(JClass currentClass)
|
abstract java.lang.String |
getPrimaryKeyString(JClass currentClass)
methods which should be implemented by descendant generator |
java.util.HashMap |
getTypeMap()
|
protected boolean |
setPKInInsertStmt()
override to false if auto increment is turned on.. |
protected boolean |
usePackages()
|
protected void |
writeDeepRetrieval(java.io.FileWriter outFile,
JClass currentClass,
java.util.Vector allFields)
|
protected void |
writeFactoryHeader(java.io.FileWriter factoryOutFile,
JClass currentClass)
|
protected void |
writeFactoryMethods(java.io.FileWriter factoryOutFile,
JClass currentClass,
java.util.Vector allFields)
|
protected int |
writeInsertMethod(java.io.FileWriter factoryOutFile,
JClass currentClass,
java.util.Vector allFields)
|
protected void |
writeMakeFromRs(java.io.FileWriter outFile,
JClass currentClass,
java.util.Vector allFields)
|
protected void |
writeManyToManyMethods(java.io.FileWriter outFile,
JClass currentClass,
java.util.Vector allFields)
|
protected void |
writeOutAField(java.io.FileWriter outFile,
JField jf)
|
protected java.lang.String |
writeOutAField(JField jf)
|
protected java.lang.String |
writeOutAField(JField jf,
java.lang.String fieldType,
java.lang.String colName)
|
protected java.lang.String |
writeOutAField(JField jf,
java.lang.String fieldType,
java.lang.String colName,
java.lang.String varName)
|
protected java.lang.String |
writeOutAField(JField jf,
java.lang.String fieldType,
java.lang.String colName,
java.lang.String varName,
java.lang.String stype)
|
protected void |
writeProcs(java.io.FileWriter outFile,
JClass currentClass,
java.util.Vector allFields)
write procs |
protected void |
writeQueryBasedFactoryMethods(java.io.FileWriter outFile,
JClass currentClass)
|
protected void |
writeSetArgForPK(java.io.FileWriter factoryOutFile,
java.lang.String varName,
java.lang.String get_set_name)
|
protected void |
writeStoreAndDeleteMethods(java.io.FileWriter outFile,
JClass currentClass,
java.util.Vector allFields)
routine which writes store, getByOid and delete |
protected void |
writeViewCode(java.io.FileWriter outFile,
JClass currentClass,
java.util.Vector allFields)
|
protected void |
writeViewString(JView view,
JClass currentClass,
java.io.FileWriter outFile)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.lang.String END_DATE
java.lang.String constructorString
public static final java.lang.String VERSION_NUMBER
static java.util.HashSet nativeClassSet
static java.util.HashMap nativeSetTypes
protected java.util.HashMap typeMap
Constructor Detail |
public GenericFactoryGenerator(java.lang.String outdir, char file_sep, java.lang.String imp, boolean useProcs)
outdir
- the base directory for writing filesfile_sep
- the file seperator ('/' for unix/linux , '\\' for Windows)Method Detail |
public void generate(JClass currentClass) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
public abstract java.lang.String getPrimaryKeyString(JClass currentClass)
protected void writeSetArgForPK(java.io.FileWriter factoryOutFile, java.lang.String varName, java.lang.String get_set_name) throws java.io.IOException
java.io.IOException
protected void writeFactoryMethods(java.io.FileWriter factoryOutFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected void writeQueryBasedFactoryMethods(java.io.FileWriter outFile, JClass currentClass) throws java.io.IOException
java.io.IOException
protected void writeDeepRetrieval(java.io.FileWriter outFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected void writeStoreAndDeleteMethods(java.io.FileWriter outFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected boolean usePackages()
protected void writeProcs(java.io.FileWriter outFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected void writeMakeFromRs(java.io.FileWriter outFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected void writeOutAField(java.io.FileWriter outFile, JField jf) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected java.lang.String writeOutAField(JField jf) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected java.lang.String writeOutAField(JField jf, java.lang.String fieldType, java.lang.String colName) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected java.lang.String writeOutAField(JField jf, java.lang.String fieldType, java.lang.String colName, java.lang.String varName) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected java.lang.String writeOutAField(JField jf, java.lang.String fieldType, java.lang.String colName, java.lang.String varName, java.lang.String stype) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected int writeInsertMethod(java.io.FileWriter factoryOutFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected java.lang.String createClobString()
protected boolean setPKInInsertStmt()
protected void writeFactoryHeader(java.io.FileWriter factoryOutFile, JClass currentClass) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected void writeViewCode(java.io.FileWriter outFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected void writeViewString(JView view, JClass currentClass, java.io.FileWriter outFile) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
protected void writeManyToManyMethods(java.io.FileWriter outFile, JClass currentClass, java.util.Vector allFields) throws java.io.IOException, SchemaException
java.io.IOException
SchemaException
public java.util.HashMap getTypeMap()
protected void createTypeMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |