org.apache.ibatis.abator.api
Interface DAOGenerator

All Known Implementing Classes:
BaseJava2DAOGenerator, DAOGeneratorBaseImpl

public interface DAOGenerator

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

Author:
Jeff Butler

Method Summary
 java.util.List getGeneratedJavaFiles(ColumnDefinitions columnDefinitions, TableConfiguration tableConfiguration, ProgressCallback callback)
          This method returns a list of GenerateJavaFile objects.
 void setJavaModelGenerator(JavaModelGenerator javaModelGenerator)
          Sets the instance of JavaModelGenerator associated with this instance.
 void setProperties(java.util.Map properties)
          Sets unique properties for 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

setProperties

public void setProperties(java.util.Map properties)
Sets unique properties for this instance. The properties consist of the default properties for the DAOGenerator, overridden and added to by any DAOGenerator properties that are unique to the current table. This method will be called before any of the get methods.

Parameters:
properties - All properties from the configuration

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(ColumnDefinitions columnDefinitions,
                                            TableConfiguration tableConfiguration,
                                            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:
columnDefinitions -
tableConfiguration -
callback -
Returns:
a list of GeneratedJavaFile objects