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.
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected String | |
| protected String | |
| protected Writer | |
| protected String | |
| protected TableCreator |
| Access | Constructor and Description |
|---|---|
| public | |
| public | TableCreatorClassGenerator(TableCreator tableCreator)
PUBLIC: Create a new generator to output the table creator. |
| public | TableCreatorClassGenerator(TableCreator tableCreator, String projectClassName, Writer outputWriter)
PUBLIC: Create a new generator to output the table creator. |
| public | TableCreatorClassGenerator(TableCreator tableCreator, String projectClassName, String fileName)
PUBLIC: Create a new generator to output the table creator. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| protected NonreflectiveMethodDefinition | |
| protected NonreflectiveMethodDefinition | |
| protected NonreflectiveMethodDefinition | |
| public void | generate(boolean useUnicode)
PUBLIC: Generate the creator class, output the java source code to the stream or file. |
| public void | |
| protected ClassDefinition | generateCreatorClass()
Return a class definition object representing the code to be generated for the table creator. |
| public String | |
| public String | |
| public String | |
| public Writer | |
| public String | |
| public TableCreator | |
| protected String | |
| protected String | |
| public void | |
| public void | setOutputFileName(String newOutputFileName)
PUBLIC: Set the file name that the generate .java file will be output to. |
| public void | setOutputPath(String newOutputPath)
PUBLIC: Set the path that the generate .java file will be output to. |
| public void | |
| public void | |
| public void | |
| public static void | write(TableCreator tableCreator, String creatorClassName, Writer writer)
PUBLIC: Generate the source code to a table creator class to the table creator's tables into the writer. |
| public static void | write(TableCreator tableCreator, String creatorClassName, String fileName)
PUBLIC: Generate the source code to a table creator class to the table creator's tables into the file. |
| className | back to summary |
|---|---|
| protected String className | |
| outputFileName | back to summary |
|---|---|
| protected String outputFileName | |
| outputPath | back to summary |
|---|---|
| protected String outputPath | |
| outputWriter | back to summary |
|---|---|
| protected Writer outputWriter | |
| packageName | back to summary |
|---|---|
| protected String packageName | |
| tableCreator | back to summary |
|---|---|
| protected TableCreator tableCreator | |
| TableCreatorClassGenerator | back to summary |
|---|---|
| public TableCreatorClassGenerator() PUBLIC: Create a new generator. | |
| TableCreatorClassGenerator | back to summary |
|---|---|
| public TableCreatorClassGenerator(TableCreator tableCreator) PUBLIC: Create a new generator to output the table creator. | |
| TableCreatorClassGenerator | back to summary |
|---|---|
| public TableCreatorClassGenerator(TableCreator tableCreator, String projectClassName, Writer outputWriter) PUBLIC: Create a new generator to output the table creator. | |
| TableCreatorClassGenerator | back to summary |
|---|---|
| public TableCreatorClassGenerator(TableCreator tableCreator, String projectClassName, String fileName) PUBLIC: Create a new generator to output the table creator. | |
| addFieldLines | back to summary |
|---|---|
| protected void addFieldLines(FieldDefinition field, NonreflectiveMethodDefinition method) | |
| addForeignKeyLines | back to summary |
|---|---|
| protected void addForeignKeyLines(ForeignKeyConstraint foreignKey, NonreflectiveMethodDefinition method) | |
| buildConstructor | back to summary |
|---|---|
| protected NonreflectiveMethodDefinition buildConstructor() | |
| buildLoginMethod | back to summary |
|---|---|
| protected NonreflectiveMethodDefinition buildLoginMethod(DatabaseLogin login) | |
| buildTableMethod | back to summary |
|---|---|
| protected NonreflectiveMethodDefinition buildTableMethod(TableDefinition table) | |
| generate | back to summary |
|---|---|
| public void generate(boolean useUnicode) throws ValidationException PUBLIC: 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. | |
| generate | back to summary |
|---|---|
| public void generate() throws ValidationException PUBLIC: Generate the project class, output the java source code to the stream or file. Unicode escaped characters for non_ASCII charaters will be used. | |
| generateCreatorClass | back to summary |
|---|---|
| protected ClassDefinition generateCreatorClass() Return a class definition object representing the code to be generated for the table creator. This class will have one method per descriptor and its toString can be used to convert it to code. | |
| getClassName | back to summary |
|---|---|
| public String getClassName() PUBLIC: Return the name of class to be generated. This is the unqualified name. | |
| getOutputFileName | back to summary |
|---|---|
| public String getOutputFileName() PUBLIC: Return the file name that the generate .java file will be output to. | |
| getOutputPath | back to summary |
|---|---|
| public String getOutputPath() PUBLIC: Return the path that the generate .java file will be output to. | |
| getOutputWriter | back to summary |
|---|---|
| public Writer getOutputWriter() PUBLIC: Return the writer the output to. | |
| getPackageName | back to summary |
|---|---|
| public String getPackageName() PUBLIC: Return the package name of class to be generated. | |
| getTableCreator | back to summary |
|---|---|
| public TableCreator getTableCreator() PUBLIC: Return the table creator to generate from. | |
| printString | back to summary |
|---|---|
| protected String printString(Object value) Return the printed version of the primitive value object. This must determine the class and use the correct constrcutor arguments. | |
| removeDots | back to summary |
|---|---|
| protected String removeDots(String packageName) | |
| setClassName | back to summary |
|---|---|
| public void setClassName(String newClassName) PUBLIC: Set the name of class to be generated. This can be qualified or unqualified name and will set the file name to match. | |
| setOutputFileName | back to summary |
|---|---|
| public void setOutputFileName(String newOutputFileName) PUBLIC: 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 | back to summary |
|---|---|
| public void setOutputPath(String newOutputPath) PUBLIC: Set the path that the generate .java file will be output to. | |
| setOutputWriter | back to summary |
|---|---|
| public void setOutputWriter(Writer outputWriter) PUBLIC: Set the writer the output to. | |
| setPackageName | back to summary |
|---|---|
| public void setPackageName(String newPackageName) PUBLIC: Set the package name of class to be generated. | |
| setTableCreator | back to summary |
|---|---|
| public void setTableCreator(TableCreator tableCreator) PUBLIC: Set the table creator to generate from. All of the creator's tables will be stored into the file. | |
| write | back to summary |
|---|---|
| public static void write(TableCreator tableCreator, String creatorClassName, Writer writer) PUBLIC: Generate the source code to a table creator class to the table creator's tables into the writer. | |
| write | back to summary |
|---|---|
| public static void write(TableCreator tableCreator, String creatorClassName, String fileName) PUBLIC: Generate the source code to a table creator class to the table creator's tables into the file. | |