|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.abator.internal.java.dao.BaseDAOGenerator
public class BaseDAOGenerator
This class generates DAO classes based on the values in the supplied DAOTemplate. This class supports the following properties:
org.apache.ibatis.abator.api.DAOMethodNameCalculator
interface.
Field Summary | |
---|---|
protected AbatorContext |
abatorContext
|
protected AbstractDAOTemplate |
daoTemplate
|
protected JavaVisibility |
exampleMethodVisibility
|
protected JavaModelGenerator |
javaModelGenerator
|
protected DAOMethodNameCalculator |
methodNameCalculator
|
protected java.util.Properties |
properties
|
protected SqlMapGenerator |
sqlMapGenerator
|
protected java.lang.String |
targetPackage
|
protected java.lang.String |
targetProject
|
protected java.util.List |
warnings
|
Constructor Summary | |
---|---|
BaseDAOGenerator(AbstractDAOTemplate daoTemplate,
boolean useJava5Features)
|
Method Summary | |
---|---|
void |
addConfigurationProperties(java.util.Properties properties)
Adds properties for this instance from any properties configured in the DAOGeneratorConfiguration. |
protected void |
afterImplementationGenerationHook(IntrospectedTable introspectedTable,
TopLevelClass generatedClass)
Override this method to provide any extra customization of the generated implementation class. |
protected void |
afterInterfaceGenerationHook(IntrospectedTable introspectedTable,
Interface generatedInterface)
Override this method to provide any extra customization of the generated interface. |
protected java.util.List |
getCountByExampleMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected TopLevelClass |
getDAOImplementation(IntrospectedTable introspectedTable)
|
protected FullyQualifiedJavaType |
getDAOImplementationType(FullyQualifiedTable table)
|
protected Interface |
getDAOInterface(IntrospectedTable introspectedTable)
|
protected FullyQualifiedJavaType |
getDAOInterfaceType(FullyQualifiedTable table)
|
protected java.lang.String |
getDAOPackage(FullyQualifiedTable table)
|
protected java.util.List |
getDeleteByExampleMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getDeleteByPrimaryKeyMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
java.util.List |
getGeneratedJavaFiles(IntrospectedTable introspectedTable,
ProgressCallback callback)
This method returns a list of GenerateJavaFile objects. |
protected java.util.List |
getInsertMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getSelectByExampleWithBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getSelectByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getSelectByPrimaryKeyMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected InnerClass |
getUpdateByExampleParms(IntrospectedTable introspectedTable,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByExampleSelectiveMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByExampleWithBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByPrimaryKeySelectiveMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByPrimaryKeyWithBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByPrimaryKeyWithoutBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
void |
setAbatorContext(AbatorContext abatorContext)
Sets the instance of the AbatorConfiguration object associated with this instance. |
void |
setJavaModelGenerator(JavaModelGenerator javaModelGenerator)
Sets the instance of JavaModelGenerator associated with 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AbatorContext abatorContext
protected AbstractDAOTemplate daoTemplate
protected java.util.Properties properties
protected java.util.List warnings
protected java.lang.String targetPackage
protected java.lang.String targetProject
protected JavaModelGenerator javaModelGenerator
protected SqlMapGenerator sqlMapGenerator
protected JavaVisibility exampleMethodVisibility
protected DAOMethodNameCalculator methodNameCalculator
Constructor Detail |
---|
public BaseDAOGenerator(AbstractDAOTemplate daoTemplate, boolean useJava5Features)
Method Detail |
---|
public void addConfigurationProperties(java.util.Properties properties)
DAOGenerator
addConfigurationProperties
in interface DAOGenerator
properties
- All properties from the configurationpublic void setWarnings(java.util.List warnings)
DAOGenerator
setWarnings
in interface DAOGenerator
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
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(IntrospectedTable introspectedTable, ProgressCallback callback)
DAOGenerator
getGeneratedJavaFiles
in interface DAOGenerator
protected TopLevelClass getDAOImplementation(IntrospectedTable introspectedTable)
protected void afterInterfaceGenerationHook(IntrospectedTable introspectedTable, Interface generatedInterface)
introspectedTable
- generatedInterface
- the generated interfaceprotected void afterImplementationGenerationHook(IntrospectedTable introspectedTable, TopLevelClass generatedClass)
introspectedTable
- generatedClass
- the generated classprotected Interface getDAOInterface(IntrospectedTable introspectedTable)
protected FullyQualifiedJavaType getDAOImplementationType(FullyQualifiedTable table)
protected java.util.List getInsertMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getUpdateByPrimaryKeyWithoutBLOBsMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getUpdateByPrimaryKeyWithBLOBsMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getUpdateByPrimaryKeySelectiveMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getSelectByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getSelectByExampleWithBLOBsMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getSelectByPrimaryKeyMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getDeleteByExampleMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getDeleteByPrimaryKeyMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getCountByExampleMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.lang.String getDAOPackage(FullyQualifiedTable table)
protected FullyQualifiedJavaType getDAOInterfaceType(FullyQualifiedTable table)
public void setAbatorContext(AbatorContext abatorContext)
DAOGenerator
setAbatorContext
in interface DAOGenerator
abatorContext
- The current AbatorContextprotected java.util.List getUpdateByExampleSelectiveMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected InnerClass getUpdateByExampleParms(IntrospectedTable introspectedTable, CompilationUnit compilationUnit)
protected java.util.List getUpdateByExampleWithBLOBsMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
protected java.util.List getUpdateByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable, boolean interfaceMethod, CompilationUnit compilationUnit)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |