public abstract class AbstractDAOTemplate extends Object
| 构造器和说明 |
|---|
AbstractDAOTemplate()
Instantiates a new abstract dao template.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
addCheckedException(FullyQualifiedJavaType type)
Adds the checked exception.
|
protected void |
addField(Field field)
Adds the field.
|
protected void |
addImplementationImport(FullyQualifiedJavaType type)
Adds the implementation import.
|
protected void |
addInterfaceImport(FullyQualifiedJavaType type)
Adds the interface import.
|
protected void |
addMethod(Method method)
Adds the method.
|
protected void |
configureCheckedExceptions()
Override this method to add checked exceptions to the throws clause of
any generated DAO method.
|
protected abstract void |
configureConstructorTemplate()
Override this method to configure a constructor for generated DAO
implementation classes.
|
protected abstract void |
configureDeleteMethodTemplate()
Override this method to configure a delete method template.
|
protected void |
configureFields()
Override this method to add fields to any generated DAO implementation
class.
|
protected void |
configureImplementationImports()
Override this method to add imports to generated DAO implementation
classes.
|
protected abstract void |
configureInsertMethodTemplate()
Override this method to configure an insert method template.
|
protected void |
configureInterfaceImports()
Override this method to add imports to generated DAO interface classes.
|
protected void |
configureMethods()
Override this method to add methods to generated DAO implementation
classes.
|
protected abstract void |
configureQueryForListMethodTemplate()
Override this method to configure a queryForList method template.
|
protected abstract void |
configureQueryForObjectMethodTemplate()
Override this method to configure a queryForObject method template.
|
protected void |
configureSuperClass()
Override this method to set the superclass for any generated DAO
implementation class.
|
protected abstract void |
configureUpdateMethodTemplate()
Override this method to configure an update method template.
|
List<FullyQualifiedJavaType> |
getCheckedExceptions()
Gets the checked exceptions.
|
Method |
getConstructorClone(CommentGenerator commentGenerator,
FullyQualifiedJavaType type,
IntrospectedTable introspectedTable)
Gets the constructor clone.
|
String |
getDeleteMethod(String sqlMapNamespace,
String statementId,
String parameter)
Gets the delete method.
|
List<Field> |
getFieldClones(CommentGenerator commentGenerator,
IntrospectedTable introspectedTable)
Gets the field clones.
|
List<FullyQualifiedJavaType> |
getImplementationImports()
Gets the implementation imports.
|
String |
getInsertMethod(String sqlMapNamespace,
String statementId,
String parameter)
Gets the insert method.
|
List<FullyQualifiedJavaType> |
getInterfaceImports()
Gets the interface imports.
|
List<Method> |
getMethodClones(CommentGenerator commentGenerator,
IntrospectedTable introspectedTable)
Gets the method clones.
|
String |
getQueryForListMethod(String sqlMapNamespace,
String statementId,
String parameter)
Gets the query for list method.
|
String |
getQueryForObjectMethod(String sqlMapNamespace,
String statementId,
String parameter)
Gets the query for object method.
|
FullyQualifiedJavaType |
getSuperClass()
Gets the super class.
|
String |
getUpdateMethod(String sqlMapNamespace,
String statementId,
String parameter)
Gets the update method.
|
protected void |
setConstructorTemplate(Method constructorTemplate)
Sets the constructor template.
|
protected void |
setDeleteMethodTemplate(String deleteMethodTemplate)
Sets the delete method template.
|
protected void |
setInsertMethodTemplate(String insertMethodTemplate)
Sets the insert method template.
|
protected void |
setQueryForListMethodTemplate(String queryForListMethodTemplate)
Sets the query for list method template.
|
protected void |
setQueryForObjectMethodTemplate(String queryForObjectMethodTemplate)
Sets the query for object method template.
|
protected void |
setSuperClass(FullyQualifiedJavaType superClass)
Sets the super class.
|
protected void |
setUpdateMethodTemplate(String updateMethodTemplate)
Sets the update method template.
|
public final Method getConstructorClone(CommentGenerator commentGenerator, FullyQualifiedJavaType type, IntrospectedTable introspectedTable)
commentGenerator - the comment generatortype - the typeintrospectedTable - the introspected tablepublic final String getDeleteMethod(String sqlMapNamespace, String statementId, String parameter)
sqlMapNamespace - the sql map namespacestatementId - the statement idparameter - the parameterpublic final List<FullyQualifiedJavaType> getInterfaceImports()
public final List<FullyQualifiedJavaType> getImplementationImports()
public final String getInsertMethod(String sqlMapNamespace, String statementId, String parameter)
sqlMapNamespace - the sql map namespacestatementId - the statement idparameter - the parameterpublic final String getQueryForListMethod(String sqlMapNamespace, String statementId, String parameter)
sqlMapNamespace - the sql map namespacestatementId - the statement idparameter - the parameterpublic final String getQueryForObjectMethod(String sqlMapNamespace, String statementId, String parameter)
sqlMapNamespace - the sql map namespacestatementId - the statement idparameter - the parameterpublic final FullyQualifiedJavaType getSuperClass()
public final String getUpdateMethod(String sqlMapNamespace, String statementId, String parameter)
sqlMapNamespace - the sql map namespacestatementId - the statement idparameter - the parameterpublic final List<FullyQualifiedJavaType> getCheckedExceptions()
public final List<Field> getFieldClones(CommentGenerator commentGenerator, IntrospectedTable introspectedTable)
commentGenerator - the comment generatorintrospectedTable - the introspected tablepublic final List<Method> getMethodClones(CommentGenerator commentGenerator, IntrospectedTable introspectedTable)
commentGenerator - the comment generatorintrospectedTable - the introspected tableprotected void setConstructorTemplate(Method constructorTemplate)
constructorTemplate - the new constructor templateprotected void setDeleteMethodTemplate(String deleteMethodTemplate)
deleteMethodTemplate - the new delete method templateprotected void addField(Field field)
field - the fieldprotected void setInsertMethodTemplate(String insertMethodTemplate)
insertMethodTemplate - the new insert method templateprotected void addMethod(Method method)
method - the methodprotected void setQueryForListMethodTemplate(String queryForListMethodTemplate)
queryForListMethodTemplate - the new query for list method templateprotected void setQueryForObjectMethodTemplate(String queryForObjectMethodTemplate)
queryForObjectMethodTemplate - the new query for object method templateprotected void setSuperClass(FullyQualifiedJavaType superClass)
superClass - the new super classprotected void setUpdateMethodTemplate(String updateMethodTemplate)
updateMethodTemplate - the new update method templateprotected void addInterfaceImport(FullyQualifiedJavaType type)
type - the typeprotected void addImplementationImport(FullyQualifiedJavaType type)
type - the typeprotected void addCheckedException(FullyQualifiedJavaType type)
type - the typeprotected void configureCheckedExceptions()
addCheckedException(FullyQualifiedJavaType) one or more
times to add checked exception(s) to all generated DAO methods.protected void configureFields()
addField(Field) one
or more times to add field(s) to the generated DAO implementation class.protected void configureImplementationImports()
addImplementationImport(FullyQualifiedJavaType) one or more
times to add import(s) to generated DAO implementation classes.protected void configureInterfaceImports()
addInterfaceImport(FullyQualifiedJavaType) one or more times
to add import(s) to generated DAO interface classes.protected void configureMethods()
addMethod(Method)
one or more times to add method(s) to generated DAO implementation
classes.protected void configureSuperClass()
setSuperClass(FullyQualifiedJavaType) to set the superclass
for generated DAO implementation classes.protected abstract void configureConstructorTemplate()
setConstructorTemplate(Method) to set the constructor
template.protected abstract void configureInsertMethodTemplate()
setInsertMethodTemplate(String) method to set the template.protected abstract void configureQueryForListMethodTemplate()
setQueryForListMethodTemplate(String) method to set the
template.protected abstract void configureQueryForObjectMethodTemplate()
setQueryForObjectMethodTemplate(String) method to set the
template.protected abstract void configureUpdateMethodTemplate()
setUpdateMethodTemplate(String) method to set the template.protected abstract void configureDeleteMethodTemplate()
setDeleteMethodTemplate(String) method to set the template.Copyright © 2006–2016 MyBatis.org. All rights reserved.