public class GenericSIDAOTemplate extends AbstractDAOTemplate
Constructor and Description |
---|
GenericSIDAOTemplate() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureCheckedExceptions()
Override this method to add checked exceptions to the throws clause of
any generated DAO method.
|
protected void |
configureConstructorTemplate()
Override this method to configure a constructor for generated DAO
implementation classes.
|
protected 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 void |
configureInsertMethodTemplate()
Override this method to configure an insert method template.
|
protected void |
configureMethods()
Override this method to add methods to generated DAO implementation
classes.
|
protected void |
configureQueryForListMethodTemplate()
Override this method to configure a queryForList method template.
|
protected void |
configureQueryForObjectMethodTemplate()
Override this method to configure a queryForObject method template.
|
protected void |
configureUpdateMethodTemplate()
Override this method to configure an update method template.
|
addCheckedException, addField, addImplementationImport, addInterfaceImport, addMethod, configureInterfaceImports, configureSuperClass, getCheckedExceptions, getConstructorClone, getDeleteMethod, getFieldClones, getImplementationImports, getInsertMethod, getInterfaceImports, getMethodClones, getQueryForListMethod, getQueryForObjectMethod, getSuperClass, getUpdateMethod, setConstructorTemplate, setDeleteMethodTemplate, setInsertMethodTemplate, setQueryForListMethodTemplate, setQueryForObjectMethodTemplate, setSuperClass, setUpdateMethodTemplate
protected void configureCheckedExceptions()
AbstractDAOTemplate
addCheckedException(FullyQualifiedJavaType)
one or more
times to add checked exception(s) to all generated DAO methods.configureCheckedExceptions
in class AbstractDAOTemplate
protected void configureConstructorTemplate()
AbstractDAOTemplate
setConstructorTemplate(Method)
to set the constructor
template.configureConstructorTemplate
in class AbstractDAOTemplate
protected void configureDeleteMethodTemplate()
AbstractDAOTemplate
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)
method to set the template.
configureDeleteMethodTemplate
in class AbstractDAOTemplate
protected void configureFields()
AbstractDAOTemplate
addField(Field)
one
or more times to add field(s) to the generated DAO implementation class.configureFields
in class AbstractDAOTemplate
protected void configureImplementationImports()
AbstractDAOTemplate
addImplementationImport(FullyQualifiedJavaType)
one or more
times to add import(s) to generated DAO implementation classes.configureImplementationImports
in class AbstractDAOTemplate
protected void configureInsertMethodTemplate()
AbstractDAOTemplate
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)
method to set the template.
configureInsertMethodTemplate
in class AbstractDAOTemplate
protected void configureMethods()
AbstractDAOTemplate
addMethod(Method)
one or more times to add method(s) to generated DAO implementation
classes.configureMethods
in class AbstractDAOTemplate
protected void configureQueryForListMethodTemplate()
AbstractDAOTemplate
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)
method to set the
template.
configureQueryForListMethodTemplate
in class AbstractDAOTemplate
protected void configureQueryForObjectMethodTemplate()
AbstractDAOTemplate
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)
method to set the
template.
configureQueryForObjectMethodTemplate
in class AbstractDAOTemplate
protected void configureUpdateMethodTemplate()
AbstractDAOTemplate
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)
method to set the template.
configureUpdateMethodTemplate
in class AbstractDAOTemplate
Copyright © 2006–2018 MyBatis.org. All rights reserved.