public class

IbatisDAOTemplate

extends AbstractDAOTemplate
java.lang.Object
   ↳ org.mybatis.generator.codegen.ibatis2.dao.templates.AbstractDAOTemplate
     ↳ org.mybatis.generator.codegen.ibatis2.dao.templates.IbatisDAOTemplate

Summary

Public Constructors
IbatisDAOTemplate()
Protected Methods
void configureConstructorTemplate()
Override this method to configure a constructor for generated DAO implementation classes.
void configureDeleteMethodTemplate()
Override this method to configure a delete method template.
void configureImplementationImports()
Override this method to add imports to generated DAO implementation classes.
void configureInsertMethodTemplate()
Override this method to configure an insert method template.
void configureQueryForListMethodTemplate()
Override this method to configure a queryForList method template.
void configureQueryForObjectMethodTemplate()
Override this method to configure a queryForObject method template.
void configureSuperClass()
Override this method to set the superclass for any generated DAO implementation class.
void configureUpdateMethodTemplate()
Override this method to configure an update method template.
[Expand]
Inherited Methods
From class org.mybatis.generator.codegen.ibatis2.dao.templates.AbstractDAOTemplate
From class java.lang.Object

Public Constructors

public IbatisDAOTemplate ()

Protected Methods

protected void configureConstructorTemplate ()

Override this method to configure a constructor for generated DAO implementation classes. During code generation, we will build a new constructor using the visibility, parameters, body lines, and exceptions set on the constructor template. When overriding this method, call setConstructorTemplate(Method) to set the constructor template.

protected void configureDeleteMethodTemplate ()

Override this method to configure a delete method template. A method template is a string with three substitution markers that we will fill in when generating code. The substitution markers will be:

  • {0} - The SqlMap namespace
  • {1} - The SqlMap statement id
  • {2} - The parameter object
For example, when calling methods in the SqlMapClient interface, the template would be: sqlMapClient.delete(\"{0}.{1}\", {2}); Overriding methods should call the setDeleteMethodTemplate(String)

protected void configureImplementationImports ()

Override this method to add imports to generated DAO implementation classes. When overriding this method, call addImplementationImport(FullyQualifiedJavaType) one or more times to add import(s) to generated DAO implementation classes.

protected void configureInsertMethodTemplate ()

Override this method to configure an insert method template. A method template is a string with three substitution markers that we will fill in when generating code. The substitution markers will be:

  • {0} - The SqlMap namespace
  • {1} - The SqlMap statement id
  • {2} - The parameter object
For example, when calling methods in the SqlMapClient interface, the template would be: sqlMapClient.insert(\"{0}.{1}\", {2}); Overriding methods should call the setInsertMethodTemplate(String)

protected void configureQueryForListMethodTemplate ()

Override this method to configure a queryForList method template. A method template is a string with three substitution markers that we will fill in when generating code. The substitution markers will be:

  • {0} - The SqlMap namespace
  • {1} - The SqlMap statement id
  • {2} - The parameter object
For example, when calling methods in the SqlMapClient interface, the template would be: sqlMapClient.queryForList(\"{0}.{1}\", {2}); Overriding methods should call the setQueryForListMethodTemplate(String)

protected void configureQueryForObjectMethodTemplate ()

Override this method to configure a queryForObject method template. A method template is a string with three substitution markers that we will fill in when generating code. The substitution markers will be:

  • {0} - The SqlMap namespace
  • {1} - The SqlMap statement id
  • {2} - The parameter object
For example, when calling methods in the SqlMapClient interface, the template would be: sqlMapClient.queryForObject(\"{0}.{1}\", {2}); Overriding methods should call the setQueryForObjectMethodTemplate(String)

protected void configureSuperClass ()

Override this method to set the superclass for any generated DAO implementation class. When overriding this method call setSuperClass(FullyQualifiedJavaType) to set the superclass for generated DAO implementation classes.

protected void configureUpdateMethodTemplate ()

Override this method to configure an update method template. A method template is a string with three substitution markers that we will fill in when generating code. The substitution markers will be:

  • {0} - The SqlMap namespace
  • {1} - The SqlMap statement id
  • {2} - The parameter object
For example, when calling methods in the SqlMapClient interface, the template would be: sqlMapClient.update(\"{0}.{1}\", {2}); Overriding methods should call the setUpdateMethodTemplate(String)