public class

GenericSIDAOTemplate

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

Summary

Public Constructors
GenericSIDAOTemplate()
Protected Methods
void configureCheckedExceptions()
Override this method to add checked exceptions to the throws clause of any generated DAO method.
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 configureFields()
Override this method to add fields to any generated DAO implementation class.
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 configureMethods()
Override this method to add methods to generated DAO implementation classes.
void configureQueryForListMethodTemplate()
Override this method to configure a queryForList method template.
void configureQueryForObjectMethodTemplate()
Override this method to configure a queryForObject method template.
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 GenericSIDAOTemplate ()

Protected Methods

protected void configureCheckedExceptions ()

Override this method to add checked exceptions to the throws clause of any generated DAO method. When overriding this method, call addCheckedException(FullyQualifiedJavaType) one or more times to add checked exception(s) to all generated DAO 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 configureFields ()

Override this method to add fields to any generated DAO implementation class. When overriding this method, call addField(Field) one or more times to add field(s) to the generated DAO implementation class.

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 configureMethods ()

Override this method to add methods to generated DAO implementation classes. When overriding this method, call addMethod(Method) one or more times to add method(s) to generated DAO implementation classes.

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 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)