|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.sahits.codegen.java.model.HeadlessJavaModelFactory
public class HeadlessJavaModelFactory
This factory class provides a model for the class to be generated
In the model factory the monitor is processed according to the workload
model generator. Generally the initialization takes up one 1/5 - 1/6 of
the workload while the rest is taken up by the model generation. In the case
of an XML file it is otherwise: The initialization takes two third since this
includes the parsing of the XML file which can be expensive.
This implementation is for the headless generation
| Field Summary | |
|---|---|
protected static IExtendedDBDefinitionPage |
page2
Current dB connection definition page, needed for createModelWithDBConnection(String, String, String, String, String, String, String, String, String, String, IProgressMonitor, String) |
| Constructor Summary | |
|---|---|
protected |
HeadlessJavaModelFactory()
|
| Method Summary | |
|---|---|
static IGeneratedJavaDBClass |
createModelWithDBConnection(JavaClassDefinition definition,
java.lang.String dbProduct,
java.lang.String host,
java.lang.String port,
java.lang.String dbName,
java.lang.String userName,
java.lang.String passWd,
java.lang.String tableName,
java.lang.String packageName,
java.lang.String className,
IProgressMonitor monitor,
java.lang.String schema)
Generates a model of a database table. |
static IGeneratedJavaDBClass |
createModelWithDBConnection(java.lang.String typeName,
java.lang.String dbProduct,
java.lang.String host,
java.lang.String port,
java.lang.String dbName,
java.lang.String userName,
java.lang.String passWd,
java.lang.String tableName,
java.lang.String packageName,
java.lang.String className,
IProgressMonitor monitor,
java.lang.String schema)
Deprecated. This method is replaced by createModelWithDBConnection(JavaClassDefinition, String, String, String, String, String, String, String, String, String, IProgressMonitor, String) |
static IGeneratedJavaClass |
createModelWithDBInputFile(JavaClassDefinition definition,
java.lang.String dbProduct,
java.lang.String inputFilePath,
IJavaProject project,
IProgressMonitor monitor)
Generates the model based on the class name and the inputFilePath Data in the wizard provided but not contained in the inputfilePath must be added to the model by the caller |
static IGeneratedJavaClass |
createModelWithDBInputFile(java.lang.String typeName,
java.lang.String dbProduct,
java.lang.String inputFilePath,
IJavaProject project,
IProgressMonitor monitor)
Deprecated. This method is replaced by createModelWithDBInputFile(JavaClassDefinition, String, String, IJavaProject, IProgressMonitor) |
static IGeneratedJavaClass |
createModelWithoutDB(JavaClassDefinition definition,
java.lang.String inputFilePath,
IProgressMonitor monitor)
Generates a model for the class that is not based on a database table |
static IGeneratedJavaClass |
createModelWithoutDB(java.lang.String typeName,
java.lang.String inputFilePath,
IProgressMonitor monitor)
Deprecated. This method is replaced by createModelWithoutDB(JavaClassDefinition, String, IProgressMonitor) |
static int |
getModelGenerationWorkload(int modelBase,
java.lang.String inputFilePath,
java.lang.String dbProduct)
Compute the number of work units for the generation of the file |
protected int |
getModelWorkloadDBConnection(int modelBase,
java.lang.String dbProduct)
Compute the workcload if the database data is retrived from the db definition page |
static void |
setCurrentDBDefinitionPage(IExtendedDBDefinitionPage page2)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static IExtendedDBDefinitionPage page2
createModelWithDBConnection(String, String, String, String, String, String, String, String, String, String, IProgressMonitor, String)
| Constructor Detail |
|---|
protected HeadlessJavaModelFactory()
| Method Detail |
|---|
public static IGeneratedJavaClass createModelWithDBInputFile(JavaClassDefinition definition,
java.lang.String dbProduct,
java.lang.String inputFilePath,
IJavaProject project,
IProgressMonitor monitor)
throws java.io.FileNotFoundException,
java.io.IOException
definition - Java Class definition that encapsules the class informationsdbProduct - name of the database productinputFilePath - path to the input file the model is based uponproject - java project to generate the class inmonitor - Progress monitor
java.io.IOException - File could not be read
java.io.FileNotFoundException - File path incorrect
public static IGeneratedJavaDBClass createModelWithDBConnection(JavaClassDefinition definition,
java.lang.String dbProduct,
java.lang.String host,
java.lang.String port,
java.lang.String dbName,
java.lang.String userName,
java.lang.String passWd,
java.lang.String tableName,
java.lang.String packageName,
java.lang.String className,
IProgressMonitor monitor,
java.lang.String schema)
definition - Java Class definition that encapsules the class informationsdbProduct - database producthost - name of the databaseport - number of the databasedbName - name of the databaseuserName - name of the database userpassWd - password for the usertableName - name of the database tablepackageName - name of the packageclassName - name of the classmonitor - Progress monitorschema - name
DataBaseTable
public static IGeneratedJavaClass createModelWithoutDB(JavaClassDefinition definition,
java.lang.String inputFilePath,
IProgressMonitor monitor)
definition - Java Class definition that encapsules the class informationsinputFilePath - path to the input file the model is based uponmonitor - Progress monitor
public static int getModelGenerationWorkload(int modelBase,
java.lang.String inputFilePath,
java.lang.String dbProduct)
inputFilePath - path to the input file the model is based uponmodelBase - code for the generationdbProduct - name of the database product my be null if the generation is not done with a database
protected int getModelWorkloadDBConnection(int modelBase,
java.lang.String dbProduct)
modelBase - dbProduct -
public static void setCurrentDBDefinitionPage(IExtendedDBDefinitionPage page2)
page2 - the page2 to set
@Deprecated
public static IGeneratedJavaClass createModelWithDBInputFile(java.lang.String typeName,
java.lang.String dbProduct,
java.lang.String inputFilePath,
IJavaProject project,
IProgressMonitor monitor)
throws java.io.FileNotFoundException,
java.io.IOException
createModelWithDBInputFile(JavaClassDefinition, String, String, IJavaProject, IProgressMonitor)
typeName - name of the classdbProduct - name of the database productinputFilePath - path to the input file the model is based uponproject - java project to generate the class inmonitor - Progress monitor
IGeneratedJavaDBClass
java.io.IOException - File could not be read
java.io.FileNotFoundException - File path incorrect
@Deprecated
public static IGeneratedJavaClass createModelWithoutDB(java.lang.String typeName,
java.lang.String inputFilePath,
IProgressMonitor monitor)
createModelWithoutDB(JavaClassDefinition, String, IProgressMonitor)
typeName - name of the classinputFilePath - path to the input file the model is based uponmonitor - Progress monitor
@Deprecated
public static IGeneratedJavaDBClass createModelWithDBConnection(java.lang.String typeName,
java.lang.String dbProduct,
java.lang.String host,
java.lang.String port,
java.lang.String dbName,
java.lang.String userName,
java.lang.String passWd,
java.lang.String tableName,
java.lang.String packageName,
java.lang.String className,
IProgressMonitor monitor,
java.lang.String schema)
createModelWithDBConnection(JavaClassDefinition, String, String, String, String, String, String, String, String, String, IProgressMonitor, String)
typeName - name of the classdbProduct - database producthost - name of the databaseport - number of the databasedbName - name of the databaseuserName - name of the database userpassWd - password for the usertableName - name of the database tablepackageName - name of the packageclassName - name of the classmonitor - Progress monitorschema - name
DataBaseTable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||