ewe.database
Class RecordFoundEntries
java.lang.Object
ewe.database.FoundEntriesObject
ewe.database.RecordFoundEntries
- All Implemented Interfaces:
- DatabaseTypes, FoundEntries
- Direct Known Subclasses:
- RecordDatabaseIndex
- public class RecordFoundEntries
- extends FoundEntriesObject
| 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 |
|
Method Summary |
protected void |
addEntriesFrom(FoundEntriesObject from,
int start,
int length)
|
protected void |
clearEntries()
|
protected void |
copyEntriesFrom(FoundEntriesObject from,
int start,
int length)
|
protected int |
doAdd(DatabaseEntryObject entry)
|
protected int |
doChange(int index,
DatabaseEntryObject entry)
|
protected void |
doDelete(int index,
DatabaseEntryObject entry)
|
protected void |
doErase(int index,
DatabaseEntryObject entry)
|
protected void |
doExclude(int index)
|
protected int |
doInclude(DatabaseEntryObject entry)
|
protected void |
doLoad(int index,
DatabaseEntryObject data)
|
protected boolean |
doSortMe(Handle h,
Comparer comparer)
|
protected int |
doStore(int index,
DatabaseEntryObject entry)
|
protected int |
doStoreChange(int index,
DatabaseEntryObject entry,
boolean isStore)
|
protected void |
doUpdate(int index,
DatabaseEntryObject entry)
|
protected void |
indexFromFoundEntries(FoundEntries entries)
|
int |
indexOf(DatabaseEntry entry)
Return the index of the entry in the FoundEntries object. |
protected boolean |
readFrom(InputStream stream,
Handle h,
int size)
|
protected void |
recordChange(int oldIndex,
int newIndex,
DatabaseEntry e)
If new Index is -1 the entry at oldIndex was deleted and the entry e will be null. |
protected boolean |
writeTo(OutputStream stream,
Handle h)
Write the FoundEntries to an OutputStream and put in the returnValue of the Handle,
an ewe.sys.Long object holding the number of bytes written. |
| 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, size, sort, sort, sort, sort, sort, sort, sortMe, store, validateEntries, writeAndReturnTrue |
RecordFoundEntries
protected RecordFoundEntries(Database database)
copyEntriesFrom
protected void copyEntriesFrom(FoundEntriesObject from,
int start,
int length)
- Specified by:
copyEntriesFrom in class FoundEntriesObject
clearEntries
protected void clearEntries()
- Specified by:
clearEntries in class FoundEntriesObject
addEntriesFrom
protected void addEntriesFrom(FoundEntriesObject from,
int start,
int length)
- Specified by:
addEntriesFrom in class FoundEntriesObject
doChange
protected int doChange(int index,
DatabaseEntryObject entry)
throws IOException
- Specified by:
doChange in class FoundEntriesObject
- Throws:
IOException
doStore
protected int doStore(int index,
DatabaseEntryObject entry)
throws IOException
- Specified by:
doStore in class FoundEntriesObject
- Throws:
IOException
doStoreChange
protected int doStoreChange(int index,
DatabaseEntryObject entry,
boolean isStore)
throws IOException
- Throws:
IOException
doAdd
protected int doAdd(DatabaseEntryObject entry)
throws IOException
- Specified by:
doAdd in class FoundEntriesObject
- Throws:
IOException
doDelete
protected void doDelete(int index,
DatabaseEntryObject entry)
throws IOException
- Specified by:
doDelete in class FoundEntriesObject
- Throws:
IOException
doErase
protected void doErase(int index,
DatabaseEntryObject entry)
throws IOException
- Specified by:
doErase in class FoundEntriesObject
- Throws:
IOException
doInclude
protected int doInclude(DatabaseEntryObject entry)
throws IllegalArgumentException,
IOException
- Specified by:
doInclude in class FoundEntriesObject
- Throws:
IllegalArgumentException
IOException
doUpdate
protected void doUpdate(int index,
DatabaseEntryObject entry)
throws IOException
- Specified by:
doUpdate in class FoundEntriesObject
- Throws:
IOException
doExclude
protected void doExclude(int index)
- Specified by:
doExclude in class FoundEntriesObject
doLoad
protected void doLoad(int index,
DatabaseEntryObject data)
throws IOException
- Specified by:
doLoad in class FoundEntriesObject
- Throws:
IOException
indexOf
public int indexOf(DatabaseEntry entry)
- Description copied from interface:
FoundEntries
- Return the index of the entry in the FoundEntries object.
- Parameters:
entry - the entry to look for.
- Returns:
- the index of the entry or -1 if it is not found.
doSortMe
protected boolean doSortMe(Handle h,
Comparer comparer)
throws IOException
- Specified by:
doSortMe in class FoundEntriesObject
- Throws:
IOException
recordChange
protected void recordChange(int oldIndex,
int newIndex,
DatabaseEntry e)
throws IOException
- Description copied from class:
FoundEntriesObject
- If new Index is -1 the entry at oldIndex was deleted and the entry e will be null.
If oldIndex was
-1, then this is the addition of a new entry. Otherwise this indicates
the repositioning of an entry.
- Overrides:
recordChange in class FoundEntriesObject
- Throws:
IOException
writeTo
protected boolean writeTo(OutputStream stream,
Handle h)
throws IOException
- Write the FoundEntries to an OutputStream and put in the returnValue of the Handle,
an ewe.sys.Long object holding the number of bytes written. If stream is null then set the
returnValue of the Handle to be an ewe.sys.Long object that holds the number of bytes needed.
- Specified by:
writeTo in class FoundEntriesObject
- Throws:
IOException
readFrom
protected boolean readFrom(InputStream stream,
Handle h,
int size)
throws IOException
- Specified by:
readFrom in class FoundEntriesObject
- Throws:
IOException
indexFromFoundEntries
protected void indexFromFoundEntries(FoundEntries entries)
- Specified by:
indexFromFoundEntries in class FoundEntriesObject