|
||||||||||
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 AbstractDAOTemplate |
daoTemplate
|
protected JavaVisibility |
exampleMethodVisibility
|
protected JavaModelGenerator |
javaModelGenerator
|
protected DAOMethodNameCalculator |
methodNameCalculator
|
protected java.util.Map |
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.Map properties)
Adds properties for this instance from any properties configured in the DAOGeneratorConfiguration. |
void |
addContextProperties(java.util.Map properties)
Adds properties for this instance from any properties configured in the current context. |
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)
|
protected java.util.List |
getExtraImplementationMethods(IntrospectedTable introspectedTable,
CompilationUnit compilationUnit)
Override this method to provide any extra methods needed in the implementation class. |
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 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 |
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 AbstractDAOTemplate daoTemplate
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
protected JavaVisibility exampleMethodVisibility
protected DAOMethodNameCalculator methodNameCalculator
Constructor Detail |
---|
public BaseDAOGenerator(AbstractDAOTemplate daoTemplate, boolean useJava5Features)
Method Detail |
---|
public void addConfigurationProperties(java.util.Map 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 java.util.List getExtraImplementationMethods(IntrospectedTable introspectedTable, CompilationUnit compilationUnit)
introspectedTable
- compilationUnit
-
null
.protected 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.lang.String getDAOPackage(FullyQualifiedTable table)
protected FullyQualifiedJavaType getDAOInterfaceType(FullyQualifiedTable table)
public void addContextProperties(java.util.Map properties)
DAOGenerator
addContextProperties
in interface DAOGenerator
properties
- All properties from the configuration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |