Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.tools.workbench
Class TableCreatorClassGenerator

java.lang.Object
  extended by oracle.toplink.tools.workbench.TableCreatorClassGenerator

public class TableCreatorClassGenerator
extends java.lang.Object

Purpose: Allow for a class storing a TopLink table creator's tables (meta-data) to be generated. This class can then be used at runtime to (re)create a project's database schema.

Since:
TopLink 3.0

Constructor Summary
TableCreatorClassGenerator()
          Create a new generator.
TableCreatorClassGenerator(TableCreator tableCreator)
          Create a new generator to output the table creator.
TableCreatorClassGenerator(TableCreator tableCreator, java.lang.String projectClassName, java.lang.String fileName)
          Create a new generator to output the table creator.
TableCreatorClassGenerator(TableCreator tableCreator, java.lang.String projectClassName, java.io.Writer outputWriter)
          Create a new generator to output the table creator.
 
Method Summary
 void generate()
          Generate the project class, output the java source code to the stream or file.
 void generate(boolean useUnicode)
          Generate the creator class, output the java source code to the stream or file.
 java.lang.String getClassName()
          Return the name of class to be generated.
 java.lang.String getOutputFileName()
          Return the file name that the generate .java file will be output to.
 java.lang.String getOutputPath()
          Return the path that the generate .java file will be output to.
 java.io.Writer getOutputWriter()
          Return the writer the output to.
 java.lang.String getPackageName()
          Return the package name of class to be generated.
 TableCreator getTableCreator()
          Return the table creator to generate from.
 void setClassName(java.lang.String newClassName)
          Set the name of class to be generated.
 void setOutputFileName(java.lang.String newOutputFileName)
          Set the file name that the generate .java file will be output to.
 void setOutputPath(java.lang.String newOutputPath)
          Set the path that the generate .java file will be output to.
 void setOutputWriter(java.io.Writer outputWriter)
          Set the writer the output to.
 void setPackageName(java.lang.String newPackageName)
          Set the package name of class to be generated.
 void setTableCreator(TableCreator tableCreator)
          Set the table creator to generate from.
static void write(TableCreator tableCreator, java.lang.String creatorClassName, java.lang.String fileName)
          Generate the source code to a table creator class to the table creator's tables into the file.
static void write(TableCreator tableCreator, java.lang.String creatorClassName, java.io.Writer writer)
          Generate the source code to a table creator class to the table creator's tables into the writer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableCreatorClassGenerator

public TableCreatorClassGenerator()
Create a new generator.


TableCreatorClassGenerator

public TableCreatorClassGenerator(TableCreator tableCreator)
Create a new generator to output the table creator.


TableCreatorClassGenerator

public TableCreatorClassGenerator(TableCreator tableCreator,
                                  java.lang.String projectClassName,
                                  java.io.Writer outputWriter)
Create a new generator to output the table creator.


TableCreatorClassGenerator

public TableCreatorClassGenerator(TableCreator tableCreator,
                                  java.lang.String projectClassName,
                                  java.lang.String fileName)
Create a new generator to output the table creator.

Method Detail

generate

public void generate(boolean useUnicode)
              throws ValidationException
Generate the creator class, output the java source code to the stream or file. useUnicode determines if unicode escaped characters for non_ASCII charaters will be used.

Throws:
ValidationException

generate

public void generate()
              throws ValidationException
Generate the project class, output the java source code to the stream or file. Unicode escaped characters for non_ASCII charaters will be used.

Throws:
ValidationException

getClassName

public java.lang.String getClassName()
Return the name of class to be generated. This is the unqualified name.


getOutputFileName

public java.lang.String getOutputFileName()
Return the file name that the generate .java file will be output to.


getOutputPath

public java.lang.String getOutputPath()
Return the path that the generate .java file will be output to.


getOutputWriter

public java.io.Writer getOutputWriter()
Return the writer the output to.


getPackageName

public java.lang.String getPackageName()
Return the package name of class to be generated.


getTableCreator

public TableCreator getTableCreator()
Return the table creator to generate from.


setClassName

public void setClassName(java.lang.String newClassName)
Set the name of class to be generated. This can be qualified or unqualified name and will set the file name to match.


setOutputFileName

public void setOutputFileName(java.lang.String newOutputFileName)
Set the file name that the generate .java file will be output to. If the file does not include .java it will be appended.


setOutputPath

public void setOutputPath(java.lang.String newOutputPath)
Set the path that the generate .java file will be output to.


setOutputWriter

public void setOutputWriter(java.io.Writer outputWriter)
Set the writer the output to.


setPackageName

public void setPackageName(java.lang.String newPackageName)
Set the package name of class to be generated.


setTableCreator

public void setTableCreator(TableCreator tableCreator)
Set the table creator to generate from. All of the creator's tables will be stored into the file.


write

public static void write(TableCreator tableCreator,
                         java.lang.String creatorClassName,
                         java.io.Writer writer)
Generate the source code to a table creator class to the table creator's tables into the writer.


write

public static void write(TableCreator tableCreator,
                         java.lang.String creatorClassName,
                         java.lang.String fileName)
Generate the source code to a table creator class to the table creator's tables into the file.


Copyright © 1998, 2010, Oracle. All Rights Reserved.