org.apache.ibatis.abator.internal.java.dao
Class BaseLegacyDAOGenerator
java.lang.Object
org.apache.ibatis.abator.internal.java.dao.BaseDAOGenerator
org.apache.ibatis.abator.internal.java.dao.BaseLegacyDAOGenerator
- All Implemented Interfaces:
- DAOGenerator
- Direct Known Subclasses:
- GenericCILegacyDAOGenerator, GenericSILegacyDAOGenerator, IbatisLegacyDAOGenerator, SpringLegacyDAOGenerator
- public class BaseLegacyDAOGenerator
- extends BaseDAOGenerator
- implements DAOGenerator
This class overrides the base DAO generator class to provide the legacy
implementarion of the "by example" methods.
This class can be removed when we remove the Legacy generator set.
- Author:
- Jeff Butler
Method Summary |
protected void |
afterImplementationGenerationHook(IntrospectedTable introspectedTable,
TopLevelClass generatedClass)
Override this method to provide any extra customization of
the generated implementation class. |
protected java.util.List |
getCountByExampleMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getDeleteByExampleMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected Method |
getExampleParmsMethod(ColumnDefinition cd,
FullyQualifiedTable table)
This method returns a properly formatted method that sets up example
parms for an individual column. |
protected java.util.List |
getSelectByExampleWithBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getSelectByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected InnerClass |
getUpdateByExampleParms(IntrospectedTable introspectedTable,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByExampleSelectiveMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByExampleWithBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
protected java.util.List |
getUpdateByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
|
Methods inherited from class org.apache.ibatis.abator.internal.java.dao.BaseDAOGenerator |
addConfigurationProperties, afterInterfaceGenerationHook, getDAOImplementation, getDAOImplementationType, getDAOInterface, getDAOInterfaceType, getDAOPackage, getDeleteByPrimaryKeyMethods, getGeneratedJavaFiles, getInsertMethods, getSelectByPrimaryKeyMethods, getUpdateByPrimaryKeySelectiveMethods, getUpdateByPrimaryKeyWithBLOBsMethods, getUpdateByPrimaryKeyWithoutBLOBsMethods, setAbatorContext, setJavaModelGenerator, setSqlMapGenerator, setTargetPackage, setTargetProject, setWarnings |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseLegacyDAOGenerator
public BaseLegacyDAOGenerator(AbstractDAOTemplate daoTemplate)
getSelectByExampleWithoutBLOBsMethods
protected java.util.List getSelectByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
- Overrides:
getSelectByExampleWithoutBLOBsMethods
in class BaseDAOGenerator
getSelectByExampleWithBLOBsMethods
protected java.util.List getSelectByExampleWithBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
- Overrides:
getSelectByExampleWithBLOBsMethods
in class BaseDAOGenerator
getDeleteByExampleMethods
protected java.util.List getDeleteByExampleMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
- Overrides:
getDeleteByExampleMethods
in class BaseDAOGenerator
getCountByExampleMethods
protected java.util.List getCountByExampleMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
- Overrides:
getCountByExampleMethods
in class BaseDAOGenerator
afterImplementationGenerationHook
protected void afterImplementationGenerationHook(IntrospectedTable introspectedTable,
TopLevelClass generatedClass)
- Description copied from class:
BaseDAOGenerator
- Override this method to provide any extra customization of
the generated implementation class.
- Overrides:
afterImplementationGenerationHook
in class BaseDAOGenerator
- Parameters:
introspectedTable
- generatedClass
- the generated class
getExampleParmsMethod
protected Method getExampleParmsMethod(ColumnDefinition cd,
FullyQualifiedTable table)
- This method returns a properly formatted method that sets up example
parms for an individual column. In the generated DAO, the method will be
called by the
getExampleParms
method. The expectation is
that there will be one column based method for each column in the table
(except BLOB columns). We do it this way to avoid generating one huge
method - which in some cases can actually be too large to compile. The
generated method should have this signature:
protected Map getXXXXExampleParms(YYYY example)
Where XXXX is the column name and YYYY is the example class
- Parameters:
cd
- the column for which the method should be generatedtable
- the table in which the column exists
- Returns:
- the method
getUpdateByExampleSelectiveMethods
protected java.util.List getUpdateByExampleSelectiveMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
- Overrides:
getUpdateByExampleSelectiveMethods
in class BaseDAOGenerator
getUpdateByExampleWithBLOBsMethods
protected java.util.List getUpdateByExampleWithBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
- Overrides:
getUpdateByExampleWithBLOBsMethods
in class BaseDAOGenerator
getUpdateByExampleWithoutBLOBsMethods
protected java.util.List getUpdateByExampleWithoutBLOBsMethods(IntrospectedTable introspectedTable,
boolean interfaceMethod,
CompilationUnit compilationUnit)
- Overrides:
getUpdateByExampleWithoutBLOBsMethods
in class BaseDAOGenerator
getUpdateByExampleParms
protected InnerClass getUpdateByExampleParms(IntrospectedTable introspectedTable,
CompilationUnit compilationUnit)
- Overrides:
getUpdateByExampleParms
in class BaseDAOGenerator