org.apache.ibatis.abator.api
Interface DAOGenerator

All Known Implementing Classes:
BaseDAOGenerator, BaseLegacyDAOGenerator

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.Properties properties)
          Adds properties for this instance from any properties configured in the DAOGeneratorConfiguration.
 java.util.List getGeneratedJavaFiles(IntrospectedTable introspectedTable, ProgressCallback callback)
          This method returns a list of GenerateJavaFile objects.
 void setAbatorContext(AbatorContext abatorContext)
          Sets the instance of the AbatorConfiguration object associated with this instance.
 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

public void addConfigurationProperties(java.util.Properties 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

setAbatorContext

public void setAbatorContext(AbatorContext abatorContext)
Sets the instance of the AbatorConfiguration object associated with this instance. This method will be called before any of the get methods.

Parameters:
abatorContext - The current AbatorContext

setWarnings

public 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

public 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

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

setJavaModelGenerator

public 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

public 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

public 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