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)
           
 
Method Summary
 void generateDomainClass(java.lang.String tableName, java.util.List columnList)
           
 void generatePersistentObjectClass(java.lang.String tableName, java.util.List columnList)
           
 java.lang.String getDomainSuperClass(java.lang.String tableName)
           
 java.sql.DatabaseMetaData getMetaData()
           
static void main(java.lang.String[] args)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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