org.h2.index

## Class PageIndex

- java.lang.Object
- - org.h2.engine.DbObjectBase
  - - org.h2.schema.SchemaObjectBase
    - - org.h2.index.BaseIndex
      - - org.h2.index.PageIndex

All Implemented Interfaces:
  DbObject, Index, SchemaObject

Direct Known Subclasses:
  PageBtreeIndex, PageDataIndex, PageDelegateIndex

    public abstract class PageIndex
    extends BaseIndex

A page store index.

### Field Summary

Fields
`protected int` `rootPageId` The root page of this index.

### Fields inherited from class org.h2.index.BaseIndex

`columnIds, columns, indexColumns, indexType, isMultiVersion, table`

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

`comment, database, trace`

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

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

### Constructor Summary

Constructors
Constructor and Description
`PageIndex()`

### Method Summary

Methods
`int` `getRootPageId()` Get the root page of this index.
`void` `setSortedInsertMode(boolean sortedInsertMode)` Enable or disable the 'sorted insert' optimizations (rows are inserted in ascending or descending order) if applicable for this index implementation.
`abstract void` `writeRowCount()` Write back the row count if it has changed.

### Methods inherited from class org.h2.index.BaseIndex

`canFindNext, canScan, checkIndexColumnTypes, commit, compareRows, containsNullAndAllowMultipleNull, createLookupBatch, find, findNext, getColumnIndex, getColumns, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDropSQL, getDuplicateKeyException, getIndexColumns, getIndexType, getPlanSQL, getRow, getTable, getType, initBaseIndex, isFirstColumn, isHidden, isRowIdIndex, removeChildrenAndResources`

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

`getSchema, getSQL, initSchemaObjectBase`

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

`checkRename, getChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, rename, 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.index.Index

`add, canGetFirstOrLast, close, find, findFirstOrLast, getCost, getDiskSpaceUsed, getRowCount, getRowCountApproximation, needRebuild, remove, remove, truncate`

### Methods inherited from interface org.h2.schema.SchemaObject

`getSchema`

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

`checkRename, getChildren, getComment, getDatabase, getId, getName, getSQL, isTemporary, rename, setComment, setTemporary`

### Field Detail

#### rootPageId

    protected int rootPageId

The root page of this index.

### Constructor Detail

#### PageIndex

    public PageIndex()

### Method Detail

#### getRootPageId

    public int getRootPageId()

Get the root page of this index.

Returns:
  the root page id

#### writeRowCount

    public abstract void writeRowCount()

Write back the row count if it has changed.

#### setSortedInsertMode

    public void setSortedInsertMode(boolean sortedInsertMode)

Description copied from interface: `Index`
Enable or disable the 'sorted insert' optimizations (rows are inserted in ascending or descending order) if applicable for this index implementation.

Specified by:
  `setSortedInsertMode` in interface `Index`
Overrides:
  `setSortedInsertMode` in class `BaseIndex`
Parameters:
  `sortedInsertMode` - the new value