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

Quick Search    Search Deep

org.apache.derby.iapi.sql.dictionary
Interface TabInfo  view TabInfo download TabInfo.java


public interface TabInfo

This interface is for communicating between the DataDictionary and the various CatalogRowFactories. It tries to hide as much about each catalog as it can behind this interface.


Field Summary
static int ROWNOTDUPLICATE
          ROWNOTDUPLICATE is out of range for a row number.
 
Method Summary
 int deleteRow(org.apache.derby.iapi.store.access.TransactionController tc, org.apache.derby.iapi.sql.execute.ExecIndexRow key, int indexNumber)
          Given a key row, delete all matching heap rows and their index rows.
 int deleteRows(org.apache.derby.iapi.store.access.TransactionController tc, org.apache.derby.iapi.sql.execute.ExecIndexRow startKey, int startOp, org.apache.derby.iapi.store.access.Qualifier[][] qualifier, org.apache.derby.iapi.sql.execute.TupleFilter filter, org.apache.derby.iapi.sql.execute.ExecIndexRow stopKey, int stopOp, int indexNumber)
          Delete the set of rows defined by a scan on an index from the table.
 int getBaseColumnPosition(int indexNumber, int colNumber)
          Get the base column position for a column within a catalog given the (0-based) index number for this catalog and the (0-based) column number for the column within the index.
 CatalogRowFactory getCatalogRowFactory()
          Get the CatalogRowFactory for this TabInfo.
 java.util.Properties getCreateHeapProperties()
          Get the Properties associated with creating the heap.
 java.util.Properties getCreateIndexProperties(int indexNumber)
          Get the Properties associated with creating the specified index.
 long getHeapConglomerate()
          Get the conglomerate for the heap.
 int getIndexColumnCount(int indexNumber)
          Get the column count for the specified index number.
 long getIndexConglomerate(int indexID)
          Get the conglomerate for the specified index.
 java.lang.String getIndexName(int indexID)
          Get the index name.
 IndexRowGenerator getIndexRowGenerator(int indexNumber)
          Get the IndexRowGenerator for the specified index number.
 int getNumberOfIndexes()
          Get the number of indexes on this catalog.
 org.apache.derby.iapi.sql.execute.ExecRow getRow(org.apache.derby.iapi.store.access.TransactionController tc, org.apache.derby.iapi.store.access.ConglomerateController heap, org.apache.derby.iapi.sql.execute.ExecIndexRow key, int indexNumber)
          Given a key row, return the first matching heap row.
 org.apache.derby.iapi.sql.execute.ExecRow getRow(org.apache.derby.iapi.store.access.TransactionController tc, org.apache.derby.iapi.sql.execute.ExecIndexRow key, int indexNumber)
          Given a key row, return the first matching heap row.
 org.apache.derby.iapi.types.RowLocation getRowLocation(org.apache.derby.iapi.store.access.TransactionController tc, org.apache.derby.iapi.sql.execute.ExecIndexRow key, int indexNumber)
          Given an index row and index number return the RowLocation in the heap of the first matching row.
 java.lang.String getTableName()
          Get the table name.
 int insertRow(org.apache.derby.iapi.sql.execute.ExecRow row, org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
          Inserts a base row into a catalog and inserts all the corresponding index rows.
 int insertRow(org.apache.derby.iapi.sql.execute.ExecRow row, org.apache.derby.iapi.store.access.TransactionController tc, boolean wait)
          Inserts a base row into a catalog and inserts all the corresponding index rows.
 org.apache.derby.iapi.types.RowLocation insertRowAndFetchRowLocation(org.apache.derby.iapi.sql.execute.ExecRow r, org.apache.derby.iapi.store.access.TransactionController tc)
          Inserts a base row into a catalog and inserts all the corresponding index rows.
 int insertRowList(org.apache.derby.iapi.sql.execute.ExecRow[] rowList, org.apache.derby.iapi.store.access.TransactionController tc)
          Inserts a list of base rows into a catalog and inserts all the corresponding index rows.
 boolean isComplete()
          Is the TabInfo fully initialized.
 boolean isIndexUnique(int indexNumber)
          Return whether or not this index is declared unique
 void setBaseColumnPosition(int indexNumber, int colNumber, int baseColumnPosition)
          Set the base column position for a column within a catalog given the (0-based) index number for this catalog and the (0-based) column number for the column within the index.
 void setHeapConglomerate(long heapConglomerate)
          Set the heap conglomerate for the TabInfo.
 void setIndexConglomerate(ConglomerateDescriptor cd)
          Set the index conglomerate for the table.
 void setIndexConglomerate(int index, long indexConglomerate)
          Set the index conglomerate for the table.
 void setIndexName(int indexID, java.lang.String indexName)
          Set the index name for the specified indexID
 void setIndexRowGenerator(int indexNumber, IndexRowGenerator irg)
          Set the IndexRowGenerator for the specified index number.
 int truncate(org.apache.derby.iapi.store.access.TransactionController tc)
          Delete all the rows from the table.
 void updateRow(org.apache.derby.iapi.sql.execute.ExecIndexRow key, org.apache.derby.iapi.sql.execute.ExecRow[] newRows, int indexNumber, boolean[] indicesToUpdate, int[] colsToUpdate, org.apache.derby.iapi.store.access.TransactionController tc)
          Updates a set of base rows in a catalog with same index key on an index and updates all the corresponding index rows.
 void updateRow(org.apache.derby.iapi.sql.execute.ExecIndexRow key, org.apache.derby.iapi.sql.execute.ExecRow newRow, int indexNumber, boolean[] indicesToUpdate, int[] colsToUpdate, org.apache.derby.iapi.store.access.TransactionController tc)
          Updates a base row in a catalog and updates all the corresponding index rows.
 void updateRow(org.apache.derby.iapi.sql.execute.ExecIndexRow key, org.apache.derby.iapi.sql.execute.ExecRow newRow, int indexNumber, boolean[] indicesToUpdate, int[] colsToUpdate, org.apache.derby.iapi.store.access.TransactionController tc, boolean wait)
          Updates a base row in a catalog and updates all the corresponding index rows.
 

Field Detail

ROWNOTDUPLICATE

public static final int ROWNOTDUPLICATE
ROWNOTDUPLICATE is out of range for a row number. If a return code does not equal this value, then it refers to the row that is a duplicate.

See Also:
Constant Field Values
Method Detail

getHeapConglomerate

public long getHeapConglomerate()
Get the conglomerate for the heap.


setHeapConglomerate

public void setHeapConglomerate(long heapConglomerate)
Set the heap conglomerate for the TabInfo.


getIndexConglomerate

public long getIndexConglomerate(int indexID)
Get the conglomerate for the specified index.


setIndexConglomerate

public void setIndexConglomerate(int index,
                                 long indexConglomerate)
Set the index conglomerate for the table.


setIndexConglomerate

public void setIndexConglomerate(ConglomerateDescriptor cd)
Set the index conglomerate for the table.


getTableName

public java.lang.String getTableName()
Get the table name.


getIndexName

public java.lang.String getIndexName(int indexID)
Get the index name.


setIndexName

public void setIndexName(int indexID,
                         java.lang.String indexName)
Set the index name for the specified indexID


getCatalogRowFactory

public CatalogRowFactory getCatalogRowFactory()
Get the CatalogRowFactory for this TabInfo.


isComplete

public boolean isComplete()
Is the TabInfo fully initialized. (i.e., is all conglomerate info initialized)


getIndexColumnCount

public int getIndexColumnCount(int indexNumber)
Get the column count for the specified index number.


getIndexRowGenerator

public IndexRowGenerator getIndexRowGenerator(int indexNumber)
Get the IndexRowGenerator for the specified index number.


setIndexRowGenerator

public void setIndexRowGenerator(int indexNumber,
                                 IndexRowGenerator irg)
Set the IndexRowGenerator for the specified index number.


getNumberOfIndexes

public int getNumberOfIndexes()
Get the number of indexes on this catalog.


getBaseColumnPosition

public int getBaseColumnPosition(int indexNumber,
                                 int colNumber)
Get the base column position for a column within a catalog given the (0-based) index number for this catalog and the (0-based) column number for the column within the index.


setBaseColumnPosition

public void setBaseColumnPosition(int indexNumber,
                                  int colNumber,
                                  int baseColumnPosition)
Set the base column position for a column within a catalog given the (0-based) index number for this catalog and the (0-based) column number for the column within the index.


isIndexUnique

public boolean isIndexUnique(int indexNumber)
Return whether or not this index is declared unique


insertRow

public int insertRow(org.apache.derby.iapi.sql.execute.ExecRow row,
                     org.apache.derby.iapi.store.access.TransactionController tc,
                     boolean wait)
              throws org.apache.derby.iapi.error.StandardException
Inserts a base row into a catalog and inserts all the corresponding index rows.


insertRow

public int insertRow(org.apache.derby.iapi.sql.execute.ExecRow row,
                     org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
              throws org.apache.derby.iapi.error.StandardException
Inserts a base row into a catalog and inserts all the corresponding index rows.


insertRowAndFetchRowLocation

public org.apache.derby.iapi.types.RowLocation insertRowAndFetchRowLocation(org.apache.derby.iapi.sql.execute.ExecRow r,
                                                                            org.apache.derby.iapi.store.access.TransactionController tc)
                                                                     throws org.apache.derby.iapi.error.StandardException
Inserts a base row into a catalog and inserts all the corresponding index rows.


insertRowList

public int insertRowList(org.apache.derby.iapi.sql.execute.ExecRow[] rowList,
                         org.apache.derby.iapi.store.access.TransactionController tc)
                  throws org.apache.derby.iapi.error.StandardException
Inserts a list of base rows into a catalog and inserts all the corresponding index rows.


truncate

public int truncate(org.apache.derby.iapi.store.access.TransactionController tc)
             throws org.apache.derby.iapi.error.StandardException
Delete all the rows from the table.

LOCKING: exclusive TABLE locking


deleteRows

public int deleteRows(org.apache.derby.iapi.store.access.TransactionController tc,
                      org.apache.derby.iapi.sql.execute.ExecIndexRow startKey,
                      int startOp,
                      org.apache.derby.iapi.store.access.Qualifier[][] qualifier,
                      org.apache.derby.iapi.sql.execute.TupleFilter filter,
                      org.apache.derby.iapi.sql.execute.ExecIndexRow stopKey,
                      int stopOp,
                      int indexNumber)
               throws org.apache.derby.iapi.error.StandardException
Delete the set of rows defined by a scan on an index from the table. Most of the parameters are simply passed to TransactionController.openScan. Please refer to the TransactionController documentation for details.

LOCKING: row locking if there is a start and a stop key; otherwise, table locking


deleteRow

public int deleteRow(org.apache.derby.iapi.store.access.TransactionController tc,
                     org.apache.derby.iapi.sql.execute.ExecIndexRow key,
                     int indexNumber)
              throws org.apache.derby.iapi.error.StandardException
Given a key row, delete all matching heap rows and their index rows.

LOCKING: row locking if there is a key; otherwise, table locking.


getRow

public org.apache.derby.iapi.sql.execute.ExecRow getRow(org.apache.derby.iapi.store.access.TransactionController tc,
                                                        org.apache.derby.iapi.sql.execute.ExecIndexRow key,
                                                        int indexNumber)
                                                 throws org.apache.derby.iapi.error.StandardException
Given a key row, return the first matching heap row.

LOCKING: shared row locking.


getRow

public org.apache.derby.iapi.sql.execute.ExecRow getRow(org.apache.derby.iapi.store.access.TransactionController tc,
                                                        org.apache.derby.iapi.store.access.ConglomerateController heap,
                                                        org.apache.derby.iapi.sql.execute.ExecIndexRow key,
                                                        int indexNumber)
                                                 throws org.apache.derby.iapi.error.StandardException
Given a key row, return the first matching heap row.

LOCKING: shared row locking.


getRowLocation

public org.apache.derby.iapi.types.RowLocation getRowLocation(org.apache.derby.iapi.store.access.TransactionController tc,
                                                              org.apache.derby.iapi.sql.execute.ExecIndexRow key,
                                                              int indexNumber)
                                                       throws org.apache.derby.iapi.error.StandardException
Given an index row and index number return the RowLocation in the heap of the first matching row. Used by the autoincrement code to get the RowLocation in syscolumns given a pair.


updateRow

public void updateRow(org.apache.derby.iapi.sql.execute.ExecIndexRow key,
                      org.apache.derby.iapi.sql.execute.ExecRow[] newRows,
                      int indexNumber,
                      boolean[] indicesToUpdate,
                      int[] colsToUpdate,
                      org.apache.derby.iapi.store.access.TransactionController tc)
               throws org.apache.derby.iapi.error.StandardException
Updates a set of base rows in a catalog with same index key on an index and updates all the corresponding index rows.

LOCKING: exclusive row locking


updateRow

public void updateRow(org.apache.derby.iapi.sql.execute.ExecIndexRow key,
                      org.apache.derby.iapi.sql.execute.ExecRow newRow,
                      int indexNumber,
                      boolean[] indicesToUpdate,
                      int[] colsToUpdate,
                      org.apache.derby.iapi.store.access.TransactionController tc)
               throws org.apache.derby.iapi.error.StandardException
Updates a base row in a catalog and updates all the corresponding index rows.

LOCKING: exclusive row locking


updateRow

public void updateRow(org.apache.derby.iapi.sql.execute.ExecIndexRow key,
                      org.apache.derby.iapi.sql.execute.ExecRow newRow,
                      int indexNumber,
                      boolean[] indicesToUpdate,
                      int[] colsToUpdate,
                      org.apache.derby.iapi.store.access.TransactionController tc,
                      boolean wait)
               throws org.apache.derby.iapi.error.StandardException
Updates a base row in a catalog and updates all the corresponding index rows.

LOCKING: exclusive row locking


getCreateHeapProperties

public java.util.Properties getCreateHeapProperties()
Get the Properties associated with creating the heap.


getCreateIndexProperties

public java.util.Properties getCreateIndexProperties(int indexNumber)
Get the Properties associated with creating the specified index.