public abstract class RecordDatabaseObject extends DatabaseObject
DatabaseObject.MetaDatabuffer, byteArray, dataValidator, decryptor, encryptor, encryptorNotSet, entries, file, foundEntries, INDEX_FLAG_DO_REINDEX, indexFlag, intArray, lock, myLocale, now, openIndexes, openMode, openModifiers, SETFIELDS_MODE_ENSURE, SETFIELDS_MODE_OVERRIDE, SETFIELDS_MODE_SET, stream, stringCollatorCreatedSortName, FIELD_MODIFIER_INTEGER_AUTO_INCREMENT, ModifiedBySortName, ModifiedSortName, OidSortName, SYNC_SLOW, SYNC_STORE_CREATION_DATE, SYNC_STORE_MODIFICATION_DATE, SYNC_STORE_MODIFIED_BY, SyncSortNameBOOLEAN, 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, OPTION_ERROR_ON_NEED_REINDEX, PLAIN_DATE, PLAIN_TIME, 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 and Description |
|---|
RecordDatabaseObject() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doErase(DatabaseEntryObject e) |
protected abstract void |
doErase(int location,
boolean isDeleted) |
protected void |
doLoad(DatabaseEntryObject e) |
protected abstract ByteArray |
doLoad(int location,
ByteArray dest) |
protected void |
doMarkAsDeleted(DatabaseEntryObject e) |
protected abstract void |
doMarkAsDeleted(int location,
long OID,
long when) |
protected abstract int |
doSave(int location,
byte[] data,
int offset,
int length) |
protected boolean |
doStore(DatabaseEntryObject e)
Return true if the entry is a new entry, false if not.
|
Iterator |
entries()
This returns an Iterator that you can use to go through the entries in
the database.
|
protected IntArray |
getAllEntries(Handle h,
IntArray array) |
protected FoundEntries |
getAllFoundEntries(Handle h) |
protected abstract boolean |
getAllRecords(Handle h,
int[] destination,
int offset,
int reported)
Get all the records locations and place them in the destination int array.
|
protected abstract int |
getNextEntry(int prev) |
protected DatabaseEntry |
makeNewData() |
protected FoundEntries |
makeNewFoundEntries() |
protected abstract void |
removeFieldIDs(int fieldID) |
addField, addSort, addSort, addSort, addSpecialField, append, change, closeLookup, countEntries, createIndex, createIndex, deleteStream, dispatchEvent, doAppend, doEnableLookupMode, doEstimateEntriesCount, doOpenCloseLookup, doOpenIndex, doOpenIndex, doReIndex, enableLookupMode, enableSynchronization, enableSynchronization, ensureFields, ensureSorts, entries, entries, estimateEntriesCount, findField, findField, findFields, findFields, findIndex, findIndex, findOpenIndex, findSort, findSort, getCurrentState, getData, getDeletedSince, getEmptyEntries, getEntries, getEntries, getEntriesCount, getEventDispatcher, getField, getFieldHeader, getFieldName, getFields, getFieldType, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntries, getFoundEntriesForIndex, getIdentifier, getIndexes, getIndexSort, getLocale, getMetaData, getMyDatabaseEntries, getMyFoundEntries, getName, getNewData, getNewDataObject, getNewMetaData, getNewOID, getObjectClass, getProperties, getSortFields, getSortName, getSortOptions, getSorts, getStreamLength, getStringCollator, getSynchronizedTime, getTimeOfDeletion, hasChangedSince, hasDatabaseEntries, hasField, hasFoundEntries, indexBy, indexBy, indexBy, isIndexedBy, isInstanceOfDataObject, isOpenForReadWrite, load, makeNewIndex, markForReIndex, modifyField, openIndex, openLookup, openStreamForReading, openStreamForReplacing, openStreamForWriting, overrideFields, overrideSorts, overwriteMetaData, recordIndexChange, registerIndex, registerNewFoundEntries, reIndex, removeField, removeSort, save, saveIndex, setData, setDataValidator, setEncryption, setFieldHeader, setFields, setFields, setFields, setFields, setKey, setLocale, setMetaData, setObjectClass, setOptions, setPassword, setSorts, setSorts, setSorts, setStringCollator, setSynchronizedTime, toCriteria, updateTypes, useEncryption, usePasswordclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, countDeletedEntries, delete, deleteMetaData, eraseDeletedEntries, eraseDeletedEntry, getDeletedEntries, getDeletedEntry, getMetaData, getModifiedTime, metaDataLength, readMetaData, readMetaDataInt, rename, setModifiedTime, writeMetaData, writeMetaDataIntprotected abstract boolean getAllRecords(Handle h, int[] destination, int offset, int reported) throws IOException
IOExceptionprotected abstract void doMarkAsDeleted(int location,
long OID,
long when)
throws IOException
IOExceptionprotected abstract void doErase(int location,
boolean isDeleted)
throws IOException
IOExceptionprotected abstract int doSave(int location,
byte[] data,
int offset,
int length)
throws IOException
IOExceptionprotected abstract ByteArray doLoad(int location, ByteArray dest) throws IOException
IOExceptionprotected abstract void removeFieldIDs(int fieldID)
throws IOException
removeFieldIDs in class DatabaseObjectIOExceptionprotected abstract int getNextEntry(int prev)
throws IOException
IOExceptionpublic Iterator entries()
DatabaseThe getNext() method of the returned iterator may throw a DatabaseIOException if there is an IO error when retrieving the next entry.
protected DatabaseEntry makeNewData()
makeNewData in class DatabaseObjectprotected FoundEntries makeNewFoundEntries()
makeNewFoundEntries in class DatabaseObjectprotected IntArray getAllEntries(Handle h, IntArray array) throws IOException
IOExceptionprotected FoundEntries getAllFoundEntries(Handle h) throws IOException
getAllFoundEntries in class DatabaseObjectIOExceptionprotected void doMarkAsDeleted(DatabaseEntryObject e) throws IOException
doMarkAsDeleted in class DatabaseObjectIOExceptionprotected void doErase(DatabaseEntryObject e) throws IOException
doErase in class DatabaseObjectIOExceptionprotected boolean doStore(DatabaseEntryObject e) throws IOException
DatabaseObjectdoStore in class DatabaseObjectIOExceptionprotected void doLoad(DatabaseEntryObject e) throws IOException, IllegalStateException
doLoad in class DatabaseObjectIOExceptionIllegalStateException