org.apache.ibatis.abator.internal.rules
Class TableType

java.lang.Object
  extended byorg.apache.ibatis.abator.internal.rules.TableType

public class TableType
extends java.lang.Object

Typesafe enum (from "Effective Java" #21) of table types supported by Abator. See package JavaDoc for more information.

Author:
Jeff Butler

Field Summary
static TableType NO_PK_FIELDS_BLOBS
          A table that has no primary key and columns that are both BLOBs and non BLOBs.
static TableType NO_PK_FIELDS_NO_BLOBS
          A table that has no primary key and all columns are not BLOBs.
static TableType PK_FIELDS_BLOBS
          A table with a primary key and other columns that are both BLOBs and non BLOBs.
static TableType PK_FIELDS_NO_BLOBS
          A table with a primary key, and all other columns are not BLOBs.
static TableType PK_NO_FIELDS_BLOBS
          A table with a primary key, and all other columns are BLOBs.
static TableType PK_NO_FIELDS_NO_BLOBS
          A table with a primary key only.
 
Method Summary
static TableType calculateTableType(ColumnDefinitions columnDefinitions)
          Calculates the table type from the physical structure of the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_PK_FIELDS_NO_BLOBS

public static final TableType NO_PK_FIELDS_NO_BLOBS
A table that has no primary key and all columns are not BLOBs.


NO_PK_FIELDS_BLOBS

public static final TableType NO_PK_FIELDS_BLOBS
A table that has no primary key and columns that are both BLOBs and non BLOBs.


PK_NO_FIELDS_NO_BLOBS

public static final TableType PK_NO_FIELDS_NO_BLOBS
A table with a primary key only.


PK_FIELDS_NO_BLOBS

public static final TableType PK_FIELDS_NO_BLOBS
A table with a primary key, and all other columns are not BLOBs.


PK_NO_FIELDS_BLOBS

public static final TableType PK_NO_FIELDS_BLOBS
A table with a primary key, and all other columns are BLOBs.


PK_FIELDS_BLOBS

public static final TableType PK_FIELDS_BLOBS
A table with a primary key and other columns that are both BLOBs and non BLOBs.

Method Detail

calculateTableType

public static TableType calculateTableType(ColumnDefinitions columnDefinitions)
Calculates the table type from the physical structure of the table.

Parameters:
columnDefinitions - the introspected table columns
Returns:
the calculated TableType