org.agileclick.genorm
Class GenUtil

java.lang.Object
  extended by org.agileclick.genorm.TemplateHelper
      extended by org.agileclick.genorm.GenUtil
Direct Known Subclasses:
Genormous, QueryGen

public class GenUtil
extends TemplateHelper


Field Summary
static java.lang.String PROP_BASE_CLASS_DESTINATION
           
static java.lang.String PROP_BASE_CLASS_PACKAGE
           
static java.lang.String PROP_DATASOURCE_PACKAGE
          Sets the package for the GenOrmDataSource class.
static java.lang.String PROP_DESTINATION
           
static java.lang.String PROP_FORMATTER
          Class name of a class that extends Format.
static java.lang.String PROP_GRAPHVIZ_FILE
           
static java.lang.String PROP_INHERIT
          Genorm property to not inherit global column definitions.
Value must be 'true' or 'false'
static java.lang.String PROP_PACKAGE
          Property containing the package name for all generated ORM objects
 
Constructor Summary
GenUtil(java.lang.String source, boolean verbose)
           
 
Method Summary
 Format getFormat()
          Gets the Format object specified in the PROP_FORMATTER properties or an instance of DefaultFormat
 java.lang.String getJavaType(java.lang.String custom)
           
 void setDestination(java.lang.String destination)
           
 void setFormat(Format formatter)
           
 void setPackage(java.lang.String packageName)
           
 void setTypesFile(java.lang.String typeFile)
           
 
Methods inherited from class org.agileclick.genorm.TemplateHelper
conditionalWriteTemplate, conditionalWriteTemplate, loadTemplateGroup, readResource, setDestinationDir, writeTemplate, writeTemplate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_INHERIT

public static final java.lang.String PROP_INHERIT
Genorm property to not inherit global column definitions.
Value must be 'true' or 'false'

See Also:
Constant Field Values

PROP_PACKAGE

public static final java.lang.String PROP_PACKAGE
Property containing the package name for all generated ORM objects

See Also:
Constant Field Values

PROP_DESTINATION

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

PROP_GRAPHVIZ_FILE

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

PROP_FORMATTER

public static final java.lang.String PROP_FORMATTER
Class name of a class that extends Format. If not specified DefaultFormat is used.

See Also:
Constant Field Values

PROP_DATASOURCE_PACKAGE

public static final java.lang.String PROP_DATASOURCE_PACKAGE
Sets the package for the GenOrmDataSource class. This defaults to the output package but if the queries are generated into a separate package then the orm objects this can be used to identify that other package.

See Also:
Constant Field Values

PROP_BASE_CLASS_PACKAGE

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

PROP_BASE_CLASS_DESTINATION

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

GenUtil

public GenUtil(java.lang.String source,
               boolean verbose)
        throws ConfigurationException
Throws:
ConfigurationException
Method Detail

getJavaType

public java.lang.String getJavaType(java.lang.String custom)

setFormat

public void setFormat(Format formatter)

getFormat

public Format getFormat()
                 throws ConfigurationException
Gets the Format object specified in the PROP_FORMATTER properties or an instance of DefaultFormat

Throws:
ConfigurationException

setTypesFile

public void setTypesFile(java.lang.String typeFile)

setPackage

public void setPackage(java.lang.String packageName)

setDestination

public void setDestination(java.lang.String destination)