com.is.jrf.extras
Class SourceGen
java.lang.Object
|
+--com.is.jrf.extras.SourceGen
- public class SourceGen
- extends java.lang.Object
Generate AbstractDomain and PersistentObject subclasses based on the
JDBC database metadata.
Thank you to Ralph Schaer for suggesting and submitting his code to do
this.
Before using this, there are some properties in the jrf.properties file
that you should be aware of. The JDBC properties are taken from there
and a couple other of properties (like SourceGen.package and
SourceGen.outputdir) need to be populated as well.
Constructor Summary |
SourceGen(java.lang.String outputDir,
java.lang.String genPackageName,
java.lang.String subPackageName,
java.lang.String policy,
java.lang.String schema,
java.lang.String persistSuffix,
java.lang.String domSuffix,
java.lang.String staticTableList)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SourceGen
public SourceGen(java.lang.String outputDir,
java.lang.String genPackageName,
java.lang.String subPackageName,
java.lang.String policy,
java.lang.String schema,
java.lang.String persistSuffix,
java.lang.String domSuffix,
java.lang.String staticTableList)
throws java.sql.SQLException
generatePersistentObjectClass
public void generatePersistentObjectClass(java.lang.String tableName,
java.util.List columnList)
generateDomainClass
public void generateDomainClass(java.lang.String tableName,
java.util.List columnList)
getMetaData
public java.sql.DatabaseMetaData getMetaData()
getDomainSuperClass
public java.lang.String getDomainSuperClass(java.lang.String tableName)
run
public void run()
throws java.sql.SQLException
main
public static void main(java.lang.String[] args)
throws java.sql.SQLException