org.apache.ibatis.abator.internal
Class DefaultDAOMethodNameCalculator

java.lang.Object
  extended byorg.apache.ibatis.abator.internal.DefaultDAOMethodNameCalculator
All Implemented Interfaces:
DAOMethodNameCalculator

public class DefaultDAOMethodNameCalculator
extends java.lang.Object
implements DAOMethodNameCalculator

Author:
Jeff Butler

Constructor Summary
DefaultDAOMethodNameCalculator()
           
 
Method Summary
 java.lang.String getCountByExampleMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the count by example method.
 java.lang.String getDeleteByExampleMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the delete by example method.
 java.lang.String getDeleteByPrimaryKeyMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the delete by primary key method.
 java.lang.String getInsertMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the insert method.
 java.lang.String getSelectByExampleWithBLOBsMethodName(IntrospectedTable introspectedTable)
          1.
 java.lang.String getSelectByExampleWithoutBLOBsMethodName(IntrospectedTable introspectedTable)
          1.
 java.lang.String getSelectByPrimaryKeyMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the select by primary key method.
 java.lang.String getUpdateByExampleSelectiveMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the update by example selective method.
 java.lang.String getUpdateByExampleWithBLOBsMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the update by example with BLOBs method.
 java.lang.String getUpdateByExampleWithoutBLOBsMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the update by example without BLOBs method.
 java.lang.String getUpdateByPrimaryKeySelectiveMethodName(IntrospectedTable introspectedTable)
          Calculates and returns a name for the update by primary key selective method.
 java.lang.String getUpdateByPrimaryKeyWithBLOBsMethodName(IntrospectedTable introspectedTable)
          1.
 java.lang.String getUpdateByPrimaryKeyWithoutBLOBsMethodName(IntrospectedTable introspectedTable)
          1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDAOMethodNameCalculator

public DefaultDAOMethodNameCalculator()
Method Detail

getInsertMethodName

public java.lang.String getInsertMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the insert method.

Specified by:
getInsertMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getUpdateByPrimaryKeyWithoutBLOBsMethodName

public java.lang.String getUpdateByPrimaryKeyWithoutBLOBsMethodName(IntrospectedTable introspectedTable)
1. if this will be the only updateByPrimaryKey, then the result should be updateByPrimaryKey. 2. If the other method is enabled, but there are seperate base and blob classes, then the method name should be updateByPrimaryKey 3. Else the method name should be updateByPrimaryKeyWithoutBLOBs

Specified by:
getUpdateByPrimaryKeyWithoutBLOBsMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getUpdateByPrimaryKeyWithBLOBsMethodName

public java.lang.String getUpdateByPrimaryKeyWithBLOBsMethodName(IntrospectedTable introspectedTable)
1. if this will be the only updateByPrimaryKey, then the result should be updateByPrimaryKey. 2. If the other method is enabled, but there are seperate base and blob classes, then the method name should be updateByPrimaryKey 3. Else the method name should be updateByPrimaryKeyWithBLOBs

Specified by:
getUpdateByPrimaryKeyWithBLOBsMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getDeleteByExampleMethodName

public java.lang.String getDeleteByExampleMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the delete by example method.

Specified by:
getDeleteByExampleMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getDeleteByPrimaryKeyMethodName

public java.lang.String getDeleteByPrimaryKeyMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the delete by primary key method.

Specified by:
getDeleteByPrimaryKeyMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getSelectByExampleWithoutBLOBsMethodName

public java.lang.String getSelectByExampleWithoutBLOBsMethodName(IntrospectedTable introspectedTable)
1. if this will be the only selectByExample, then the result should be selectByExample. 2. Else the method name should be selectByExampleWithoutBLOBs

Specified by:
getSelectByExampleWithoutBLOBsMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getSelectByExampleWithBLOBsMethodName

public java.lang.String getSelectByExampleWithBLOBsMethodName(IntrospectedTable introspectedTable)
1. if this will be the only selectByExample, then the result should be selectByExample. 2. Else the method name should be selectByExampleWithBLOBs

Specified by:
getSelectByExampleWithBLOBsMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getSelectByPrimaryKeyMethodName

public java.lang.String getSelectByPrimaryKeyMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the select by primary key method.

Specified by:
getSelectByPrimaryKeyMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getUpdateByPrimaryKeySelectiveMethodName

public java.lang.String getUpdateByPrimaryKeySelectiveMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the update by primary key selective method.

Specified by:
getUpdateByPrimaryKeySelectiveMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getCountByExampleMethodName

public java.lang.String getCountByExampleMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the count by example method.

Specified by:
getCountByExampleMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getUpdateByExampleSelectiveMethodName

public java.lang.String getUpdateByExampleSelectiveMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the update by example selective method.

Specified by:
getUpdateByExampleSelectiveMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getUpdateByExampleWithBLOBsMethodName

public java.lang.String getUpdateByExampleWithBLOBsMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the update by example with BLOBs method.

Specified by:
getUpdateByExampleWithBLOBsMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name

getUpdateByExampleWithoutBLOBsMethodName

public java.lang.String getUpdateByExampleWithoutBLOBsMethodName(IntrospectedTable introspectedTable)
Description copied from interface: DAOMethodNameCalculator
Calculates and returns a name for the update by example without BLOBs method.

Specified by:
getUpdateByExampleWithoutBLOBsMethodName in interface DAOMethodNameCalculator
Parameters:
introspectedTable -
Returns:
the calculated name