|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.sessions.factories.TableCreatorClassGenerator
public class TableCreatorClassGenerator
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.
Field Summary | |
---|---|
protected java.lang.String |
className
|
protected java.lang.String |
outputFileName
|
protected java.lang.String |
outputPath
|
protected java.io.Writer |
outputWriter
|
protected java.lang.String |
packageName
|
protected TableCreator |
tableCreator
|
Constructor Summary | |
---|---|
TableCreatorClassGenerator()
PUBLIC: Create a new generator. |
|
TableCreatorClassGenerator(TableCreator tableCreator)
PUBLIC: Create a new generator to output the table creator. |
|
TableCreatorClassGenerator(TableCreator tableCreator,
java.lang.String projectClassName,
java.lang.String fileName)
PUBLIC: Create a new generator to output the table creator. |
|
TableCreatorClassGenerator(TableCreator tableCreator,
java.lang.String projectClassName,
java.io.Writer outputWriter)
PUBLIC: Create a new generator to output the table creator. |
Method Summary | |
---|---|
protected void |
addFieldLines(FieldDefinition field,
org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition method)
|
protected void |
addForeignKeyLines(ForeignKeyConstraint foreignKey,
org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition method)
|
protected org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition |
buildConstructor()
|
protected org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition |
buildLoginMethod(DatabaseLogin login)
|
protected org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition |
buildTableMethod(TableDefinition table)
|
void |
generate()
PUBLIC: Generate the project class, output the java source code to the stream or file. |
void |
generate(boolean useUnicode)
PUBLIC: Generate the creator class, output the java source code to the stream or file. |
protected org.eclipse.persistence.internal.codegen.ClassDefinition |
generateCreatorClass()
Return a class definition object representing the code to be generated for the table creator. |
java.lang.String |
getClassName()
PUBLIC: Return the name of class to be generated. |
java.lang.String |
getOutputFileName()
PUBLIC: Return the file name that the generate .java file will be output to. |
java.lang.String |
getOutputPath()
PUBLIC: Return the path that the generate .java file will be output to. |
java.io.Writer |
getOutputWriter()
PUBLIC: Return the writer the output to. |
java.lang.String |
getPackageName()
PUBLIC: Return the package name of class to be generated. |
TableCreator |
getTableCreator()
PUBLIC: Return the table creator to generate from. |
protected java.lang.String |
printString(java.lang.Object value)
Return the printed version of the primitive value object. |
protected java.lang.String |
removeDots(java.lang.String packageName)
|
void |
setClassName(java.lang.String newClassName)
PUBLIC: Set the name of class to be generated. |
void |
setOutputFileName(java.lang.String newOutputFileName)
PUBLIC: Set the file name that the generate .java file will be output to. |
void |
setOutputPath(java.lang.String newOutputPath)
PUBLIC: Set the path that the generate .java file will be output to. |
void |
setOutputWriter(java.io.Writer outputWriter)
PUBLIC: Set the writer the output to. |
void |
setPackageName(java.lang.String newPackageName)
PUBLIC: Set the package name of class to be generated. |
void |
setTableCreator(TableCreator tableCreator)
PUBLIC: Set the table creator to generate from. |
static void |
write(TableCreator tableCreator,
java.lang.String creatorClassName,
java.lang.String fileName)
PUBLIC: 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)
PUBLIC: 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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String className
protected java.lang.String packageName
protected java.lang.String outputPath
protected java.lang.String outputFileName
protected java.io.Writer outputWriter
protected TableCreator tableCreator
Constructor Detail |
---|
public TableCreatorClassGenerator()
public TableCreatorClassGenerator(TableCreator tableCreator)
public TableCreatorClassGenerator(TableCreator tableCreator, java.lang.String projectClassName, java.io.Writer outputWriter)
public TableCreatorClassGenerator(TableCreator tableCreator, java.lang.String projectClassName, java.lang.String fileName)
Method Detail |
---|
protected void addFieldLines(FieldDefinition field, org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition method)
protected void addForeignKeyLines(ForeignKeyConstraint foreignKey, org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition method)
protected org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition buildConstructor()
protected org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition buildLoginMethod(DatabaseLogin login)
protected org.eclipse.persistence.internal.codegen.NonreflectiveMethodDefinition buildTableMethod(TableDefinition table)
public void generate(boolean useUnicode) throws ValidationException
ValidationException
public void generate() throws ValidationException
ValidationException
protected org.eclipse.persistence.internal.codegen.ClassDefinition generateCreatorClass()
public java.lang.String getClassName()
public java.lang.String getOutputFileName()
public java.lang.String getOutputPath()
public java.io.Writer getOutputWriter()
public java.lang.String getPackageName()
public TableCreator getTableCreator()
protected java.lang.String printString(java.lang.Object value)
protected java.lang.String removeDots(java.lang.String packageName)
public void setClassName(java.lang.String newClassName)
public void setOutputFileName(java.lang.String newOutputFileName)
public void setOutputPath(java.lang.String newOutputPath)
public void setOutputWriter(java.io.Writer outputWriter)
public void setPackageName(java.lang.String newPackageName)
public void setTableCreator(TableCreator tableCreator)
public static void write(TableCreator tableCreator, java.lang.String creatorClassName, java.io.Writer writer)
public static void write(TableCreator tableCreator, java.lang.String creatorClassName, java.lang.String fileName)
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |