Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hsqldb
Class Index  view Index download Index.java

java.lang.Object
  extended byorg.hsqldb.Index

class Index
extends java.lang.Object

Index class declaration

Version:
1.7.0

Field Summary
private  boolean bUnique
           
private  boolean cleanUp
           
(package private) static int DISK_INDEX
           
private  int[] iColumn
           
private  int iColumn_0
           
private  int iFields
           
private  HsqlName indexName
           
private static int iNeedCleanUp
           
private  int[] iType
           
private  int iType_0
           
(package private) static int MEMORY_INDEX
           
(package private) static int POINTER_INDEX
           
private  Node root
           
private  Table table
           
private  int visibleColumns
           
 
Constructor Summary
(package private) Index(HsqlName name, Table table, int[] column, int[] type, boolean unique, int visibleColumns)
          Constructor declaration
 
Method Summary
private  void balance(Node x, boolean way)
           
private  Node child(Node x, boolean w)
          Method declaration
(package private)  int comparePartialRowNonUnique(java.lang.Object[] a, java.lang.Object[] b)
          This method is used for finding foreign key references.
private  int compareRow(java.lang.Object[] a, java.lang.Object[] b)
          Method declaration
private  int compareRowNonUnique(java.lang.Object[] a, java.lang.Object[] b)
          compares two full table rows based on the columns of the index
private  int compareValue(java.lang.Object a, java.lang.Object b)
          Method declaration
(package private)  void delete(java.lang.Object[] row, boolean datatoo)
          Method declaration
(package private)  Node find(java.lang.Object[] data)
          Method declaration
(package private)  Node findFirst(java.lang.Object value, int compare)
          Method declaration
(package private)  Node findSimple(java.lang.Object[] indexcoldata, boolean first)
          for finding foreign key referencing rows (in child table)
(package private)  Node first()
          Method declaration
(package private)  int[] getColumns()
          Method declaration
(package private)  HsqlName getName()
          Method declaration
(package private)  Node getRoot()
          Method declaration
(package private)  int getVisibleColumns()
          Method declaration
(package private)  void insert(Node i)
          Method declaration
(package private)  Node insertUncached(Node i)
           
(package private)  boolean isEquivalent(Index index)
          Method declaration
(package private)  boolean isUnique()
          Method declaration
(package private)  Node next(Node x)
          Method declaration
private  void replace(Node x, Node n)
          Method declaration
private  Node search(java.lang.Object[] d)
          Method declaration
private  void set(Node x, boolean w, Node n)
          Method declaration
(package private)  void setName(java.lang.String name, boolean isquoted)
          Changes index name.
(package private)  void setRoot(Node r)
          Method declaration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEMORY_INDEX

static final int MEMORY_INDEX
See Also:
Constant Field Values

DISK_INDEX

static final int DISK_INDEX
See Also:
Constant Field Values

POINTER_INDEX

static final int POINTER_INDEX
See Also:
Constant Field Values

indexName

private HsqlName indexName

table

private Table table

iFields

private int iFields

iColumn

private int[] iColumn

iType

private int[] iType

bUnique

private boolean bUnique

visibleColumns

private int visibleColumns

root

private Node root

iColumn_0

private int iColumn_0

iType_0

private int iType_0

iNeedCleanUp

private static int iNeedCleanUp

cleanUp

private boolean cleanUp
Constructor Detail

Index

Index(HsqlName name,
      Table table,
      int[] column,
      int[] type,
      boolean unique,
      int visibleColumns)
Constructor declaration

Method Detail

getRoot

Node getRoot()
Method declaration


setRoot

void setRoot(Node r)
Method declaration


getName

HsqlName getName()
Method declaration


setName

void setName(java.lang.String name,
             boolean isquoted)
Changes index name. Used by 'alter index rename to'


getVisibleColumns

int getVisibleColumns()
Method declaration


isUnique

boolean isUnique()
Method declaration


getColumns

int[] getColumns()
Method declaration


isEquivalent

boolean isEquivalent(Index index)
Method declaration


insert

void insert(Node i)
      throws java.sql.SQLException
Method declaration


insertUncached

Node insertUncached(Node i)
              throws java.sql.SQLException

balance

private void balance(Node x,
                     boolean way)
              throws java.sql.SQLException

delete

void delete(java.lang.Object[] row,
            boolean datatoo)
      throws java.sql.SQLException
Method declaration


findSimple

Node findSimple(java.lang.Object[] indexcoldata,
                boolean first)
          throws java.sql.SQLException
for finding foreign key referencing rows (in child table)


find

Node find(java.lang.Object[] data)
    throws java.sql.SQLException
Method declaration


findFirst

Node findFirst(java.lang.Object value,
               int compare)
         throws java.sql.SQLException
Method declaration


first

Node first()
     throws java.sql.SQLException
Method declaration


next

Node next(Node x)
    throws java.sql.SQLException
Method declaration


child

private Node child(Node x,
                   boolean w)
            throws java.sql.SQLException
Method declaration


replace

private void replace(Node x,
                     Node n)
              throws java.sql.SQLException
Method declaration


set

private void set(Node x,
                 boolean w,
                 Node n)
          throws java.sql.SQLException
Method declaration


search

private Node search(java.lang.Object[] d)
             throws java.sql.SQLException
Method declaration


comparePartialRowNonUnique

int comparePartialRowNonUnique(java.lang.Object[] a,
                               java.lang.Object[] b)
                         throws java.sql.SQLException
This method is used for finding foreign key references. It finds a row by comparing the values set in a[] and mapping to b[]. a[] contains only the column values which correspond to the columns of the index. It does not necessarily cover all the columns of the index, only the first a.length columns. b[] contains all the visible columns in a row of the table.


compareRowNonUnique

private int compareRowNonUnique(java.lang.Object[] a,
                                java.lang.Object[] b)
                         throws java.sql.SQLException
compares two full table rows based on the columns of the index


compareRow

private int compareRow(java.lang.Object[] a,
                       java.lang.Object[] b)
                throws java.sql.SQLException
Method declaration


compareValue

private int compareValue(java.lang.Object a,
                         java.lang.Object b)
                  throws java.sql.SQLException
Method declaration