org.apache.ibatis.abator.internal.db
Class IntrospectedTableImpl

java.lang.Object
  extended by org.apache.ibatis.abator.internal.db.IntrospectedTableImpl
All Implemented Interfaces:
IntrospectedTable

public class IntrospectedTableImpl
extends java.lang.Object
implements IntrospectedTable

Author:
Jeff Butler

Constructor Summary
IntrospectedTableImpl(TableConfiguration tableConfiguration, ColumnDefinitions columnDefinitions, FullyQualifiedTable table)
           
 
Method Summary
 java.util.Iterator getAllColumns()
          Returns all columns in the table (for use by the select by primary key and select by example with BLOBs methods)
 java.util.Iterator getBaseColumns()
           
 java.util.Iterator getBLOBColumns()
           
 ColumnDefinition getColumn(java.lang.String columnName)
           
 ColumnDefinitions getColumnDefinitions()
           
 GeneratedKey getGeneratedKey()
           
 java.util.Iterator getNonBLOBColumns()
          Returns all columns axcept BLOBs (for use by the select by example without BLOBs method)
 java.util.Iterator getNonPrimaryKeyColumns()
           
 java.util.Iterator getPrimaryKeyColumns()
          Returns the columns in the primary key.
 AbatorRules getRules()
           
 java.lang.String getSelectByExampleQueryId()
           
 java.lang.String getSelectByPrimaryKeyQueryId()
           
 FullyQualifiedTable getTable()
           
 boolean hasBLOBColumns()
           
 boolean hasJDBCDateColumns()
          Returns true if any of the columns in the table are JDBC Dates (as opposed to timestamps).
 boolean hasJDBCTimeColumns()
          Returns true if any of the columns in the table are JDBC Times (as opposed to timestamps).
 boolean hasPrimaryKeyColumns()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntrospectedTableImpl

public IntrospectedTableImpl(TableConfiguration tableConfiguration,
                             ColumnDefinitions columnDefinitions,
                             FullyQualifiedTable table)
Method Detail

getTable

public FullyQualifiedTable getTable()
Specified by:
getTable in interface IntrospectedTable

getSelectByExampleQueryId

public java.lang.String getSelectByExampleQueryId()
Specified by:
getSelectByExampleQueryId in interface IntrospectedTable

getSelectByPrimaryKeyQueryId

public java.lang.String getSelectByPrimaryKeyQueryId()
Specified by:
getSelectByPrimaryKeyQueryId in interface IntrospectedTable

getGeneratedKey

public GeneratedKey getGeneratedKey()
Specified by:
getGeneratedKey in interface IntrospectedTable

getColumn

public ColumnDefinition getColumn(java.lang.String columnName)
Specified by:
getColumn in interface IntrospectedTable

hasJDBCDateColumns

public boolean hasJDBCDateColumns()
Description copied from interface: IntrospectedTable
Returns true if any of the columns in the table are JDBC Dates (as opposed to timestamps).

Specified by:
hasJDBCDateColumns in interface IntrospectedTable
Returns:
true if the table contains DATE columns

hasJDBCTimeColumns

public boolean hasJDBCTimeColumns()
Description copied from interface: IntrospectedTable
Returns true if any of the columns in the table are JDBC Times (as opposed to timestamps).

Specified by:
hasJDBCTimeColumns in interface IntrospectedTable
Returns:
true if the table contains TIME columns

getColumnDefinitions

public ColumnDefinitions getColumnDefinitions()

getRules

public AbatorRules getRules()
Specified by:
getRules in interface IntrospectedTable

getAllColumns

public java.util.Iterator getAllColumns()
Description copied from interface: IntrospectedTable
Returns all columns in the table (for use by the select by primary key and select by example with BLOBs methods)

Specified by:
getAllColumns in interface IntrospectedTable
Returns:
an Iterator of ColumnDefinition objects for all columns in the table

getNonBLOBColumns

public java.util.Iterator getNonBLOBColumns()
Description copied from interface: IntrospectedTable
Returns all columns axcept BLOBs (for use by the select by example without BLOBs method)

Specified by:
getNonBLOBColumns in interface IntrospectedTable
Returns:
an Iterator of ColumnDefinition objects for columns in the table that are non BLOBs

getPrimaryKeyColumns

public java.util.Iterator getPrimaryKeyColumns()
Description copied from interface: IntrospectedTable
Returns the columns in the primary key. If the generatePrimaryKeyClass() method returns false, then these columns will be iterated as the parameters of the selectByPrimaryKay and deleteByPrimaryKey methods

Specified by:
getPrimaryKeyColumns in interface IntrospectedTable
Returns:
an Iterator of ColumnDefinition objects for columns in the primary key

getBaseColumns

public java.util.Iterator getBaseColumns()
Specified by:
getBaseColumns in interface IntrospectedTable

hasPrimaryKeyColumns

public boolean hasPrimaryKeyColumns()
Specified by:
hasPrimaryKeyColumns in interface IntrospectedTable

getBLOBColumns

public java.util.Iterator getBLOBColumns()
Specified by:
getBLOBColumns in interface IntrospectedTable

hasBLOBColumns

public boolean hasBLOBColumns()
Specified by:
hasBLOBColumns in interface IntrospectedTable

getNonPrimaryKeyColumns

public java.util.Iterator getNonPrimaryKeyColumns()
Specified by:
getNonPrimaryKeyColumns in interface IntrospectedTable