|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.abator.internal.java.BaseJavaCodeGenerator
org.apache.ibatis.abator.internal.java.JavaModelGeneratorDefaultImpl
This class supports the following properties:
Field Summary | |
protected java.util.Map |
properties
The properties from the JavaModelGenerator congiguration element |
protected java.lang.String |
targetPackage
The target package from the JavaModelGenerator congiguration element |
protected java.lang.String |
targetProject
The target project from the JavaModelGenerator congiguration element |
protected java.util.List |
warnings
|
Fields inherited from class org.apache.ibatis.abator.internal.java.BaseJavaCodeGenerator |
lineSeparator |
Constructor Summary | |
JavaModelGeneratorDefaultImpl()
|
Method Summary | |
protected void |
generateClassParts(FullyQualifiedTable table,
java.util.Collection columnDefinitions,
GeneratedJavaFile answer)
Adds fields and getter/setter methods for each ColumnDefinition passed into the method. |
protected GeneratedJavaFile |
getExample(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration)
|
FullyQualifiedJavaType |
getExampleType(FullyQualifiedTable table)
|
java.util.List |
getGeneratedJavaFiles(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
ProgressCallback callback)
This method returns a list of GenerateJavaFile objects. |
protected java.lang.String |
getJavaModelPackage(FullyQualifiedTable table)
Calculates the package for generated domain objects. |
protected GeneratedJavaFile |
getPrimaryKey(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration)
|
FullyQualifiedJavaType |
getPrimaryKeyType(FullyQualifiedTable table)
|
protected GeneratedJavaFile |
getRecord(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration)
|
FullyQualifiedJavaType |
getRecordType(FullyQualifiedTable table)
|
protected GeneratedJavaFile |
getRecordWithBLOBs(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration)
|
FullyQualifiedJavaType |
getRecordWithBLOBsType(FullyQualifiedTable table)
|
void |
setProperties(java.util.Map properties)
Sets the properties of the generator taken from the JavaModelGeneratorConfiguration element. |
void |
setTargetPackage(java.lang.String targetPackage)
Sets the target package of the generator taken from the JavaModelGeneratorConfiguration element. |
void |
setTargetProject(java.lang.String targetProject)
Sets the target project of the generator taken from the JavaModelGeneratorConfiguration element. |
void |
setWarnings(java.util.List warnings)
Abator will supply a list to this method. |
Methods inherited from class org.apache.ibatis.abator.internal.java.BaseJavaCodeGenerator |
getFieldComment, getFieldComment, getGetterMethodComment, getMethodComment, getMethodComment, getSetterMethodComment, indent, newLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List warnings
protected java.util.Map properties
protected java.lang.String targetPackage
protected java.lang.String targetProject
Constructor Detail |
public JavaModelGeneratorDefaultImpl()
Method Detail |
public void setProperties(java.util.Map properties)
JavaModelGenerator
setProperties
in interface JavaModelGenerator
properties
- the configuration element's propertiespublic void setTargetPackage(java.lang.String targetPackage)
JavaModelGenerator
setTargetPackage
in interface JavaModelGenerator
targetPackage
- the configuration element's target packageprotected void generateClassParts(FullyQualifiedTable table, java.util.Collection columnDefinitions, GeneratedJavaFile answer)
table
- the table from which the ColumnDefinitions are derived. This
is used to generate appropriate JavaDoc comments for the generated fields and
methods.columnDefinitions
- the collection of ColumnDefinitions used to generate
fields and getter/setter methods.answer
- the generated fields and methods will be added to this objectprotected java.lang.String getJavaModelPackage(FullyQualifiedTable table)
table
- the current table
protected GeneratedJavaFile getExample(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration)
protected GeneratedJavaFile getPrimaryKey(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration)
protected GeneratedJavaFile getRecord(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration)
protected GeneratedJavaFile getRecordWithBLOBs(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration)
public void setTargetProject(java.lang.String targetProject)
JavaModelGenerator
setTargetProject
in interface JavaModelGenerator
targetProject
- the configuration element's target projectpublic FullyQualifiedJavaType getExampleType(FullyQualifiedTable table)
getExampleType
in interface JavaModelGenerator
table
- the table for which the name should be generated
public java.util.List getGeneratedJavaFiles(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, ProgressCallback callback)
JavaModelGenerator
getGeneratedJavaFiles
in interface JavaModelGenerator
columnDefinitions
- tableConfiguration
- callback
-
public FullyQualifiedJavaType getPrimaryKeyType(FullyQualifiedTable table)
getPrimaryKeyType
in interface JavaModelGenerator
public FullyQualifiedJavaType getRecordType(FullyQualifiedTable table)
getRecordType
in interface JavaModelGenerator
table
- the table for which the name should be generated
public FullyQualifiedJavaType getRecordWithBLOBsType(FullyQualifiedTable table)
getRecordWithBLOBsType
in interface JavaModelGenerator
table
- the table for which the name should be generated
public void setWarnings(java.util.List warnings)
JavaModelGenerator
setWarnings
in interface JavaModelGenerator
warnings
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |