vishnu.model.indexes
Class AbstractIndex

java.lang.Object
  extended by vishnu.model.indexes.AbstractIndex
All Implemented Interfaces:
Index
Direct Known Subclasses:
AbstractHashIndex, BTreeIndex

public abstract class AbstractIndex
extends java.lang.Object
implements Index

Author:
Mariano
 

Field Summary
protected  TableContext context
           
 
Fields inherited from interface vishnu.model.indexes.Index
BTREE, CLUSTERED, HASH, UNIQUE
 
Constructor Summary
AbstractIndex(java.lang.String name, boolean isUnique, boolean isClustered, int structure, java.util.List<java.lang.String> searchKeys)
           
 
Method Summary
 void attach(TableContext c)
          Usado para definir el esquema del indice.
protected  Database database()
           
 int getStructure()
          devuelve el tipo de estructura del indice (HASH , BTREE o algun otro)
 Value getStructureIdentifier()
          devuelve el tipo de estructura del indice (HASH , BTREE o algun otro)
 Table getTable()
           
 boolean isClustered()
          indica si el indice es clustered
 boolean isUnique()
          indica si el indice es unique
 java.lang.String name()
          devuelve el nombre del indice
 void notifyDelete(Record r)
           
 void notifyUpdate(Record r)
           
 java.util.List<java.lang.String> searchKeys()
          TODO FIX COMMENT.
protected  UserContext userContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface vishnu.model.indexes.Index
createSearchKeyRecord, matchingRecords, notifyInsert
 

Field Detail

context

protected TableContext context
Constructor Detail

AbstractIndex

public AbstractIndex(java.lang.String name,
                     boolean isUnique,
                     boolean isClustered,
                     int structure,
                     java.util.List<java.lang.String> searchKeys)
Method Detail

searchKeys

public java.util.List<java.lang.String> searchKeys()
Description copied from interface: Index
TODO FIX COMMENT. debe trabajar sobre una lista de columnas (SearchKey) devuelve el nombre de la columna a la que apunta el indice

Specified by:
searchKeys in interface Index

name

public java.lang.String name()
Description copied from interface: Index
devuelve el nombre del indice

Specified by:
name in interface Index

getStructure

public int getStructure()
Description copied from interface: Index
devuelve el tipo de estructura del indice (HASH , BTREE o algun otro)

Specified by:
getStructure in interface Index

getTable

public Table getTable()

isUnique

public boolean isUnique()
Description copied from interface: Index
indica si el indice es unique

Specified by:
isUnique in interface Index

isClustered

public boolean isClustered()
Description copied from interface: Index
indica si el indice es clustered

Specified by:
isClustered in interface Index

getStructureIdentifier

public Value getStructureIdentifier()
Description copied from interface: Index
devuelve el tipo de estructura del indice (HASH , BTREE o algun otro)

Specified by:
getStructureIdentifier in interface Index

attach

public void attach(TableContext c)
Description copied from interface: Index
Usado para definir el esquema del indice.

Specified by:
attach in interface Index

database

protected Database database()

userContext

protected UserContext userContext()

notifyDelete

public void notifyDelete(Record r)
Specified by:
notifyDelete in interface Index

notifyUpdate

public void notifyUpdate(Record r)
Specified by:
notifyUpdate in interface Index