org.rimudb.editor.generator
Class Generator

java.lang.Object
  extended by org.rimudb.editor.generator.Generator

public class Generator
extends java.lang.Object

This class is responsible for managing the creation of files for the requested Data Object classes.


Field Summary
static java.lang.String PACKAGE_NAME
           
 
Constructor Summary
Generator()
          Construct the generator
Generator(java.lang.String dbDirectory)
          Construct the generator with the database directory and the implementation directory.
Generator(java.lang.String dbDirectory, boolean log)
          Construct the generator with the database directory.
 
Method Summary
 java.lang.String createDO(DescriptorModel descriptorModel, boolean directoryOutput)
          Create the DO class.
 java.lang.String createFinder(DescriptorModel descriptorModel, boolean directoryOutput)
          Create the Finder class.
 java.lang.String getDbDirectory()
          Returns the dbDirectory.
 void setDbDirectory(java.lang.String dbDirectory)
          Sets the dbDirectory.
 void writeFileSQLFile(java.lang.String text, java.lang.String tablename)
           
 void writeJavaFile(java.lang.String text, java.lang.String className)
          Write the text string to the output file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PACKAGE_NAME

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

Generator

public Generator()
Construct the generator


Generator

public Generator(java.lang.String dbDirectory)
Construct the generator with the database directory and the implementation directory.


Generator

public Generator(java.lang.String dbDirectory,
                 boolean log)
Construct the generator with the database directory.

Method Detail

createFinder

public java.lang.String createFinder(DescriptorModel descriptorModel,
                                     boolean directoryOutput)
                              throws java.io.IOException
Create the Finder class.

Throws:
java.io.IOException

createDO

public java.lang.String createDO(DescriptorModel descriptorModel,
                                 boolean directoryOutput)
                          throws java.io.IOException
Create the DO class.

Throws:
java.io.IOException

writeJavaFile

public void writeJavaFile(java.lang.String text,
                          java.lang.String className)
                   throws java.io.IOException
Write the text string to the output file.

Throws:
java.io.IOException

writeFileSQLFile

public void writeFileSQLFile(java.lang.String text,
                             java.lang.String tablename)
                      throws java.io.IOException
Throws:
java.io.IOException

getDbDirectory

public java.lang.String getDbDirectory()
Returns the dbDirectory.

Returns:
String

setDbDirectory

public void setDbDirectory(java.lang.String dbDirectory)
Sets the dbDirectory.

Parameters:
dbDirectory - The dbDirectory to set


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.