org.h2.table

## Class TableBase

- java.lang.Object
- - org.h2.engine.DbObjectBase
  - - org.h2.schema.SchemaObjectBase
    - - org.h2.table.Table
      - - org.h2.table.TableBase

All Implemented Interfaces:
  DbObject, SchemaObject

Direct Known Subclasses:
  RegularTable

    public abstract class TableBase
    extends Table

The base class of a regular table, or a user defined table.

### Field Summary

### Fields inherited from class org.h2.table.Table

`columns, compareMode, isHidden, TYPE_CACHED, TYPE_MEMORY`

### Fields inherited from class org.h2.engine.DbObjectBase

`comment, database, trace`

### Fields inherited from interface org.h2.engine.DbObject

`AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, TRIGGER, USER`

### Constructor Summary

Constructors
Constructor and Description
`TableBase(CreateTableData data)`

### Method Summary

Methods
`java.lang.String` `getCreateSQL()` Build a SQL statement to re-create this object.
`java.lang.String` `getDropSQL()` Build a SQL statement to drop this object.
`static int` `getMainIndexColumn(IndexType indexType, IndexColumn[] cols)` Returns main index column if index is an primary key index and has only one column with _ROWID_ compatible data type.
`boolean` `isGlobalTemporary()`

### Methods inherited from class org.h2.table.Table

`addConstraint, addDependencies, addDependentView, addIndex, addRow, addSequence, addSynonym, addTrigger, canDrop, canGetRowCount, canReference, canTruncate, checkDeadlock, checkSupportAlter, checkWritingAllowed, close, compareValues, createRow, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findColumn, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getCreateSQLForCopy, getDefaultValue, getDependentViews, getDiskSpaceUsed, getIndex, getIndexes, getIndexForColumn, getMaxDataModificationId, getOnCommitDrop, getOnCommitTruncate, getOnUpdateValue, getPrimaryKey, getRow, getRowCount, getRowCountApproximation, getRowIdColumn, getScanIndex, getScanIndex, getTableType, getTemplateRow, getTemplateSimpleRow, getType, getUniqueIndex, hasInsteadOfTrigger, hasSelectTrigger, isDeterministic, isHidden, isLockedExclusively, isLockedExclusivelyBy, isMVStore, isPersistData, isPersistIndexes, isQueryComparable, isTableExpression, isView, lock, lockRow, removeChildrenAndResources, removeColumnExpressionsDependencies, removeConstraint, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeRow, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, truncate, unlock, updateRow, updateRows, validateConvertUpdateSequence`

### Methods inherited from class org.h2.schema.SchemaObjectBase

`getSchema, getSQL, getSQL`

### Methods inherited from class org.h2.engine.DbObjectBase

`checkRename, getComment, getDatabase, getId, getModificationId, getName, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.h2.engine.DbObject

`checkRename, getComment, getDatabase, getId, getName, isTemporary, setComment, setTemporary`

### Constructor Detail

#### TableBase

    public TableBase(CreateTableData data)

### Method Detail

#### getMainIndexColumn

    public static int getMainIndexColumn(IndexType indexType,
                         IndexColumn[] cols)

Returns main index column if index is an primary key index and has only one column with _ROWID_ compatible data type.

Parameters:
  `indexType` - type of an index
  `cols` - columns of the index
Returns:
  main index column or `SearchRow.ROWID_INDEX`

#### getDropSQL

    public java.lang.String getDropSQL()

Description copied from class: `DbObjectBase`
Build a SQL statement to drop this object.

Specified by:
  `getDropSQL` in interface `DbObject`
Specified by:
  `getDropSQL` in class `DbObjectBase`
Returns:
  the SQL statement

#### getCreateSQL

    public java.lang.String getCreateSQL()

Description copied from class: `DbObjectBase`
Build a SQL statement to re-create this object.

Specified by:
  `getCreateSQL` in interface `DbObject`
Specified by:
  `getCreateSQL` in class `DbObjectBase`
Returns:
  the SQL statement

#### isGlobalTemporary

    public boolean isGlobalTemporary()

Overrides:
  `isGlobalTemporary` in class `Table`