|
|||||||||||
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.dao.BaseJava2DAOGenerator
This class generates DAO classes based on the values in the supplied DAOTemplate. This class supports the following properties:
Field Summary | |
protected JavaModelGenerator |
javaModelGenerator
|
protected java.util.Map |
properties
|
protected SqlMapGenerator |
sqlMapGenerator
|
protected java.lang.String |
targetPackage
|
protected java.lang.String |
targetProject
|
protected java.util.List |
warnings
|
Fields inherited from class org.apache.ibatis.abator.internal.java.BaseJavaCodeGenerator |
lineSeparator |
Constructor Summary | |
BaseJava2DAOGenerator(AbstractDAOTemplate daoTemplate)
|
Method Summary | |
protected GeneratedJavaFile |
getDAOImplementation(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration)
|
protected FullyQualifiedJavaType |
getDAOImplementationType(FullyQualifiedTable table)
|
protected GeneratedJavaFile |
getDAOInterface(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration)
|
protected FullyQualifiedJavaType |
getDAOInterfaceType(FullyQualifiedTable table)
|
protected java.lang.String |
getDAOPackage(FullyQualifiedTable table)
|
protected java.util.List |
getDeleteByExampleMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
protected java.util.List |
getDeleteByPrimaryKeyMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
java.util.List |
getGeneratedJavaFiles(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
ProgressCallback callback)
This method returns a list of GenerateJavaFile objects. |
protected java.util.List |
getInsertMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
protected java.util.List |
getSelectByExampleMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
protected java.util.List |
getSelectByExampleWithBLOBsMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
protected java.util.List |
getSelectByPrimaryKeyMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
protected java.util.List |
getUpdateByPrimaryKeyMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
protected java.util.List |
getUpdateByPrimaryKeyWithBLOBsMethods(ColumnDefinitions columnDefinitions,
TableConfiguration tableConfiguration,
boolean interfaceMethod,
java.util.Set imports)
|
void |
setJavaModelGenerator(JavaModelGenerator javaModelGenerator)
Sets the instance of JavaModelGenerator associated with this instance. |
void |
setProperties(java.util.Map properties)
Sets unique properties for this instance. |
void |
setSqlMapGenerator(SqlMapGenerator sqlMapGenerator)
Sets the instance of SqlMapGenerator associated with this instance. |
void |
setTargetPackage(java.lang.String targetPackage)
Sets the target package for this instance. |
void |
setTargetProject(java.lang.String targetProject)
|
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.Map properties
protected java.util.List warnings
protected java.lang.String targetPackage
protected java.lang.String targetProject
protected JavaModelGenerator javaModelGenerator
protected SqlMapGenerator sqlMapGenerator
Constructor Detail |
public BaseJava2DAOGenerator(AbstractDAOTemplate daoTemplate)
Method Detail |
public void setProperties(java.util.Map properties)
DAOGenerator
setProperties
in interface DAOGenerator
properties
- All properties from the configurationpublic void setWarnings(java.util.List warnings)
DAOGenerator
setWarnings
in interface DAOGenerator
warnings
- public void setTargetPackage(java.lang.String targetPackage)
DAOGenerator
setTargetPackage
in interface DAOGenerator
targetPackage
- The target package from the configurationpublic void setTargetProject(java.lang.String targetProject)
setTargetProject
in interface DAOGenerator
targetProject
- public void setJavaModelGenerator(JavaModelGenerator javaModelGenerator)
DAOGenerator
setJavaModelGenerator
in interface DAOGenerator
javaModelGenerator
- The JavaModelGenerator associated with this instancepublic void setSqlMapGenerator(SqlMapGenerator sqlMapGenerator)
DAOGenerator
setSqlMapGenerator
in interface DAOGenerator
sqlMapGenerator
- The SqlMapGenerator associated with this instancepublic java.util.List getGeneratedJavaFiles(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, ProgressCallback callback)
DAOGenerator
getGeneratedJavaFiles
in interface DAOGenerator
columnDefinitions
- tableConfiguration
- callback
-
protected GeneratedJavaFile getDAOImplementation(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration)
protected GeneratedJavaFile getDAOInterface(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration)
protected FullyQualifiedJavaType getDAOImplementationType(FullyQualifiedTable table)
protected java.util.List getInsertMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
protected java.util.List getUpdateByPrimaryKeyMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
columnDefinitions
- column definitions for the current tabletableConfiguration
- table configuration for the current tableinterfaceMethod
- true if the method is an interface method, false if the method
is an implementation methodimports
- the method can add FullyQualifiedJavaType objects to this set
if they are required by the resulting method
protected java.util.List getUpdateByPrimaryKeyWithBLOBsMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
protected java.util.List getSelectByExampleMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
protected java.util.List getSelectByExampleWithBLOBsMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
protected java.util.List getSelectByPrimaryKeyMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
protected java.util.List getDeleteByExampleMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
protected java.util.List getDeleteByPrimaryKeyMethods(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, boolean interfaceMethod, java.util.Set imports)
protected java.lang.String getDAOPackage(FullyQualifiedTable table)
protected FullyQualifiedJavaType getDAOInterfaceType(FullyQualifiedTable table)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |