org.apache.ibatis.abator.api
Interface DAOGenerator

All Known Implementing Classes:
BaseDAOGenerator, BaseLegacyDAOGenerator, GenericCIJava2DAOGenerator, GenericCIJava5DAOGenerator, GenericCILegacyDAOGenerator, GenericSIJava2DAOGenerator, GenericSIJava5DAOGenerator, GenericSILegacyDAOGenerator, IbatisJava2DAOGenerator, IbatisJava5DAOGenerator, IbatisLegacyDAOGenerator, SpringJava2DAOGenerator, SpringJava5DAOGenerator, SpringLegacyDAOGenerator

public interface DAOGenerator

The DAOGenerator interface describes the methods needed to generate DAO objects for a table.

Author:
Jeff Butler

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.
 java.util.List getGeneratedJavaFiles(IntrospectedTable introspectedTable, ProgressCallback callback)
          This method returns a list of GenerateJavaFile objects.
 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.
 

Method Detail

addConfigurationProperties

void addConfigurationProperties(java.util.Map properties)
Adds properties for this instance from any properties configured in the DAOGeneratorConfiguration. This method will be called before any of the get methods.

Parameters:
properties - All properties from the configuration

addContextProperties

void addContextProperties(java.util.Map properties)
Adds properties for this instance from any properties configured in the current context. This method will be called before any of the get methods.

Parameters:
properties - All properties from the configuration

setWarnings

void setWarnings(java.util.List warnings)
Abator will supply a list to this method. The implementation class may add strings to the list that will be treated as warning messages and displayed to the user. The concept of a warning is that code generation can continue, but that the results may not be what is expected.

Parameters:
warnings -

setTargetPackage

void setTargetPackage(java.lang.String targetPackage)
Sets the target package for this instance. This value should be used to calculate the package for the DAO interface and implementation classes. This method will be called before any of the get methods.

Parameters:
targetPackage - The target package from the configuration

setTargetProject

void setTargetProject(java.lang.String targetProject)
Parameters:
targetProject -

setJavaModelGenerator

void setJavaModelGenerator(JavaModelGenerator javaModelGenerator)
Sets the instance of JavaModelGenerator associated with this instance. This method will be called before any of the get methods.

Parameters:
javaModelGenerator - The JavaModelGenerator associated with this instance

setSqlMapGenerator

void setSqlMapGenerator(SqlMapGenerator sqlMapGenerator)
Sets the instance of SqlMapGenerator associated with this instance. This method will be called before any of the get methods.

Parameters:
sqlMapGenerator - The SqlMapGenerator associated with this instance

getGeneratedJavaFiles

java.util.List getGeneratedJavaFiles(IntrospectedTable introspectedTable,
                                     ProgressCallback callback)
This method returns a list of GenerateJavaFile objects. The list may include any, or all, of the following types of generated java classes:

Parameters:
introspectedTable -
callback -
Returns:
a list of GeneratedJavaFile objects