org.apache.ibatis.abator.internal.sqlmap
Class SqlMapGeneratorLegacyImpl

java.lang.Object
  extended by org.apache.ibatis.abator.internal.sqlmap.SqlMapGeneratorIterateImpl
      extended by org.apache.ibatis.abator.internal.sqlmap.SqlMapGeneratorLegacyImpl
All Implemented Interfaces:
SqlMapGenerator

public class SqlMapGeneratorLegacyImpl
extends SqlMapGeneratorIterateImpl
implements SqlMapGenerator

This class overrides the iterate implementation to provide the legacy "by example" methods. This class can be removed when we remove the Legacy generator set.

Author:
Jeff Butler

Field Summary
 
Fields inherited from class org.apache.ibatis.abator.internal.sqlmap.SqlMapGeneratorIterateImpl
abatorContext, javaModelGenerator, properties, targetPackage, targetProject, warnings
 
Constructor Summary
SqlMapGeneratorLegacyImpl()
          Constructs an instance of SqlMapGeneratorDefaultImpl
 
Method Summary
protected  XmlElement getByExampleWhereClauseFragment(IntrospectedTable introspectedTable)
          This method should return an XmlElement for the example where clause SQL fragment (an sql fragment).
protected  XmlElement getCountByExample(IntrospectedTable introspectedTable)
          This method should return an XmlElement for the count by example statement.
protected  XmlElement getDeleteByExample(IntrospectedTable introspectedTable)
          This method should return an XmlElement for the delete by example statement.
protected  XmlElement getSelectByExample(IntrospectedTable introspectedTable)
          This method should return an XmlElement for the select by example statement that returns all fields in the table (except BLOB fields).
protected  XmlElement getSelectByExampleWithBLOBs(IntrospectedTable introspectedTable)
          This method should return an XmlElement for the select by example statement that returns all fields in the table (including BLOB fields).
protected  XmlElement getUpdateByExampleSelective(IntrospectedTable introspectedTable)
          This method should return an XmlElement for the update by example statement that updates all fields in the table - but only if the field is not null in the parameter object.
protected  XmlElement getUpdateByExampleWithBLOBs(IntrospectedTable introspectedTable)
           
protected  XmlElement getUpdateByExampleWithoutBLOBs(IntrospectedTable introspectedTable)
           
 
Methods inherited from class org.apache.ibatis.abator.internal.sqlmap.SqlMapGeneratorIterateImpl
addConfigurationProperties, afterGenerationHook, getBaseResultMapElement, getCountByExampleStatementId, getDeleteByExampleStatementId, getDeleteByPrimaryKey, getDeleteByPrimaryKeyStatementId, getExampleWhereClauseId, getGeneratedXMLFiles, getInsertElement, getInsertStatementId, getResultMapName, getResultMapWithBLOBsElement, getSelectByExampleStatementId, getSelectByExampleWithBLOBsStatementId, getSelectByPrimaryKey, getSelectByPrimaryKeyStatementId, getSelectKey, getSqlMap, getSqlMapElement, getSqlMapFileName, getSqlMapNamespace, getSqlMapPackage, getUpdateByExampleSelectiveStatementId, getUpdateByExampleStatementId, getUpdateByExampleWithBLOBsStatementId, getUpdateByPrimaryKeySelective, getUpdateByPrimaryKeySelectiveStatementId, getUpdateByPrimaryKeyStatementId, getUpdateByPrimaryKeyWithBLOBs, getUpdateByPrimaryKeyWithBLOBsStatementId, getUpdateByPrimaryKeyWithoutBLOBs, setAbatorContext, setJavaModelGenerator, setTargetPackage, setTargetProject, setWarnings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ibatis.abator.api.SqlMapGenerator
addConfigurationProperties, getCountByExampleStatementId, getDeleteByExampleStatementId, getDeleteByPrimaryKeyStatementId, getGeneratedXMLFiles, getInsertStatementId, getSelectByExampleStatementId, getSelectByExampleWithBLOBsStatementId, getSelectByPrimaryKeyStatementId, getSqlMapNamespace, getUpdateByExampleSelectiveStatementId, getUpdateByExampleStatementId, getUpdateByExampleWithBLOBsStatementId, getUpdateByPrimaryKeySelectiveStatementId, getUpdateByPrimaryKeyStatementId, getUpdateByPrimaryKeyWithBLOBsStatementId, setAbatorContext, setJavaModelGenerator, setTargetPackage, setTargetProject, setWarnings
 

Constructor Detail

SqlMapGeneratorLegacyImpl

public SqlMapGeneratorLegacyImpl()
Constructs an instance of SqlMapGeneratorDefaultImpl

Method Detail

getDeleteByExample

protected XmlElement getDeleteByExample(IntrospectedTable introspectedTable)
This method should return an XmlElement for the delete by example statement. This statement uses the "by example" SQL fragment

Overrides:
getDeleteByExample in class SqlMapGeneratorIterateImpl
Parameters:
introspectedTable -
Returns:
the delete element

getCountByExample

protected XmlElement getCountByExample(IntrospectedTable introspectedTable)
This method should return an XmlElement for the count by example statement. This statement uses the "by example" SQL fragment

Overrides:
getCountByExample in class SqlMapGeneratorIterateImpl
Parameters:
introspectedTable -
Returns:
the select element

getByExampleWhereClauseFragment

protected XmlElement getByExampleWhereClauseFragment(IntrospectedTable introspectedTable)
This method should return an XmlElement for the example where clause SQL fragment (an sql fragment).

Overrides:
getByExampleWhereClauseFragment in class SqlMapGeneratorIterateImpl
Parameters:
introspectedTable -
Returns:
a well formatted String containing the SQL element

getSelectByExample

protected XmlElement getSelectByExample(IntrospectedTable introspectedTable)
This method should return an XmlElement for the select by example statement that returns all fields in the table (except BLOB fields).

Overrides:
getSelectByExample in class SqlMapGeneratorIterateImpl
Parameters:
introspectedTable -
Returns:
the select element

getSelectByExampleWithBLOBs

protected XmlElement getSelectByExampleWithBLOBs(IntrospectedTable introspectedTable)
This method should return an XmlElement for the select by example statement that returns all fields in the table (including BLOB fields).

Overrides:
getSelectByExampleWithBLOBs in class SqlMapGeneratorIterateImpl
Parameters:
introspectedTable -
Returns:
the select element

getUpdateByExampleSelective

protected XmlElement getUpdateByExampleSelective(IntrospectedTable introspectedTable)
Description copied from class: SqlMapGeneratorIterateImpl
This method should return an XmlElement for the update by example statement that updates all fields in the table - but only if the field is not null in the parameter object.

Overrides:
getUpdateByExampleSelective in class SqlMapGeneratorIterateImpl
Returns:
the update element

getUpdateByExampleWithBLOBs

protected XmlElement getUpdateByExampleWithBLOBs(IntrospectedTable introspectedTable)
Overrides:
getUpdateByExampleWithBLOBs in class SqlMapGeneratorIterateImpl

getUpdateByExampleWithoutBLOBs

protected XmlElement getUpdateByExampleWithoutBLOBs(IntrospectedTable introspectedTable)
Overrides:
getUpdateByExampleWithoutBLOBs in class SqlMapGeneratorIterateImpl