ewe.database
Class RecordDatabaseIndex

java.lang.Object
  extended byewe.database.FoundEntriesObject
      extended byewe.database.RecordFoundEntries
          extended byewe.database.RecordDatabaseIndex
All Implemented Interfaces:
ewe.database.DatabaseIndex, DatabaseTypes, FoundEntries, HasProperties

public class RecordDatabaseIndex
extends RecordFoundEntries
implements ewe.database.DatabaseIndex


Field Summary
 String name
           
protected  PropertyList pl
           
 
Fields inherited from class ewe.database.FoundEntriesObject
addNewOnesFirst, buffer, database, dispatcher, ids, indexName, indexRecorder, isAllInclusive, lock, mySortID, needCompact, searcher, sortComparer, sortCriteria, sortState, views
 
Fields inherited from interface ewe.database.DatabaseTypes
BOOLEAN, BYTE_ARRAY, CREATED_FIELD, DATE, DATE_TIME, DECIMAL, DOUBLE, FIRST_SPECIAL_FIELD, FLAG_SYNCHRONIZED, FLAGS_FIELD, INTEGER, JAVA_OBJECT, LONG, MAX_ID, MODIFIED_BY_FIELD, MODIFIED_FIELD, NAME_FIELD, OBJECT_BYTES_FIELD, OBJECT_TEXT_FIELD, OID_FIELD, reservedFieldHeaders, reservedFieldIDs, reservedFieldNames, reservedFieldTypes, SORT_DATE_ONLY, SORT_IGNORE_CASE, SORT_TIME_ONLY, SORT_UNKNOWN_IS_GREATER_THAN_KNOWN, SORT_UNKNOWN_IS_LESS_THAN_KNOWN, STRING, TIME, TIMESTAMP
 
Constructor Summary
protected RecordDatabaseIndex(Database database, String name)
           
 
Method Summary
 boolean compact(Handle h)
          Compact the index so that it uses less space.
 FoundEntries getEntries()
          Get an ordinary FoundEntries from the entries in the index.
 String getName()
           
 PropertyList getProperties()
          Get the PropertyList object associated with this object.
 boolean needsCompacting()
          Check if the index could benefit significantly from compacting.
 int size()
          Return the number of entries in the index.
 
Methods inherited from class ewe.database.RecordFoundEntries
addEntriesFrom, clearEntries, copyEntriesFrom, doAdd, doChange, doDelete, doErase, doExclude, doInclude, doLoad, doSortMe, doStore, doStoreChange, doUpdate, indexFromFoundEntries, indexOf, readFrom, recordChange, writeTo
 
Methods inherited from class ewe.database.FoundEntriesObject
add, addData, change, checkView, copyStateFrom, delete, deleted, dispatchEvent, erase, exclude, exclude, excludeAll, filterAll, findAll, findFirst, findFirst, findInsertIndex, findLast, findLast, findRange, get, get, getCopy, getCurrentState, getData, getData, getDatabase, getEmptyView, getEntrySelector, getEventDispatcher, getFullView, getNew, getNewFoundEntries, getSortComparer, getSortCriteria, getSortEntry, getSubSet, hasChangedSince, include, includeAll, includeExclude, isAllInclusive, isSorted, searchIsCompatibleWithSortState, searchWillFilter, set, setAddNewEntriesFirst, setAllInclusive, setData, setSort, sort, sort, sort, sort, sort, sort, sortMe, store, validateEntries, writeAndReturnTrue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 
Methods inherited from interface ewe.database.FoundEntries
add, addData, change, delete, erase, exclude, exclude, excludeAll, filterAll, findAll, findFirst, findFirst, findInsertIndex, findLast, findLast, findRange, get, get, getCopy, getCurrentState, getData, getData, getDatabase, getEmptyView, getEntrySelector, getEventDispatcher, getFullView, getNew, getSortComparer, getSortCriteria, getSortEntry, getSubSet, hasChangedSince, include, includeAll, indexOf, isAllInclusive, isSorted, searchIsCompatibleWithSortState, set, setAddNewEntriesFirst, setAllInclusive, setData, sort, sort, sort, sort, sort, sort, store
 

Field Detail

name

public String name

pl

protected PropertyList pl
Constructor Detail

RecordDatabaseIndex

protected RecordDatabaseIndex(Database database,
                              String name)
Method Detail

getName

public String getName()
Specified by:
getName in interface ewe.database.DatabaseIndex

needsCompacting

public boolean needsCompacting()
                        throws IOException
Description copied from interface: ewe.database.DatabaseIndex
Check if the index could benefit significantly from compacting.

Specified by:
needsCompacting in interface ewe.database.DatabaseIndex
Returns:
true if the index could benefit significantly from compacting.
Throws:
IOException - on error.

compact

public boolean compact(Handle h)
                throws IOException
Description copied from interface: ewe.database.DatabaseIndex
Compact the index so that it uses less space. This will generally only affect its space on disk, not in memory.

Specified by:
compact in interface ewe.database.DatabaseIndex
Throws:
IOException

getProperties

public PropertyList getProperties()
Description copied from interface: HasProperties
Get the PropertyList object associated with this object.

Specified by:
getProperties in interface HasProperties

getEntries

public FoundEntries getEntries()
Description copied from interface: ewe.database.DatabaseIndex
Get an ordinary FoundEntries from the entries in the index.

Specified by:
getEntries in interface ewe.database.DatabaseIndex

size

public int size()
Return the number of entries in the index. This must match the number of entries in the Database, otherwise something is wrong.

Specified by:
size in interface FoundEntries