ewe.database
Class RecordDatabaseObject
java.lang.Object
ewe.database.DatabaseObject
ewe.database.RecordDatabaseObject
- All Implemented Interfaces:
- Database, DatabaseTypes, HasProperties
- Direct Known Subclasses:
- RecordFile
- public abstract class RecordDatabaseObject
- extends DatabaseObject
| Fields inherited from class ewe.database.DatabaseObject |
buffer, 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 |
| 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 |
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)
|
| Methods inherited from class ewe.database.DatabaseObject |
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, getNewData, getNewDataObject, getNewMetaData, getNewOID, getObjectClass, getProperties, getSortFields, getSortName, getSortOptions, getSorts, getStreamLength, 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, setLocale, setMetaData, setObjectClass, setPassword, setSorts, setSorts, setSorts, setSynchronizedTime, toCriteria, updateTypes, useEncryption, usePassword |
| Methods inherited from interface ewe.database.Database |
close, countDeletedEntries, delete, deleteMetaData, eraseDeletedEntries, eraseDeletedEntry, getDeletedEntries, getDeletedEntry, getMetaData, getModifiedTime, metaDataLength, readMetaData, readMetaDataInt, rename, setModifiedTime, writeMetaData, writeMetaDataInt |
RecordDatabaseObject
public RecordDatabaseObject()
getAllRecords
protected abstract boolean getAllRecords(Handle h,
int[] destination,
int offset,
int reported)
throws IOException
- Get all the records locations and place them in the destination int array.
- Throws:
IOException
doMarkAsDeleted
protected abstract void doMarkAsDeleted(int location,
long OID,
long when)
throws IOException
- Throws:
IOException
doErase
protected abstract void doErase(int location,
boolean isDeleted)
throws IOException
- Throws:
IOException
doSave
protected abstract int doSave(int location,
byte[] data,
int offset,
int length)
throws IOException
- Throws:
IOException
doLoad
protected abstract ByteArray doLoad(int location,
ByteArray dest)
throws IOException
- Throws:
IOException
removeFieldIDs
protected abstract void removeFieldIDs(int fieldID)
throws IOException
- Specified by:
removeFieldIDs in class DatabaseObject
- Throws:
IOException
getNextEntry
protected abstract int getNextEntry(int prev)
throws IOException
- Throws:
IOException
entries
public Iterator entries()
- Description copied from interface:
Database
- This returns an Iterator that you can use to go through the entries in
the database.
The getNext() method of the returned iterator may throw a DatabaseIOException
if there is an IO error when retrieving the next entry.
makeNewData
protected DatabaseEntry makeNewData()
- Specified by:
makeNewData in class DatabaseObject
makeNewFoundEntries
protected FoundEntries makeNewFoundEntries()
- Specified by:
makeNewFoundEntries in class DatabaseObject
getAllEntries
protected IntArray getAllEntries(Handle h,
IntArray array)
throws IOException
- Throws:
IOException
getAllFoundEntries
protected FoundEntries getAllFoundEntries(Handle h)
throws IOException
- Specified by:
getAllFoundEntries in class DatabaseObject
- Throws:
IOException
doMarkAsDeleted
protected void doMarkAsDeleted(DatabaseEntryObject e)
throws IOException
- Specified by:
doMarkAsDeleted in class DatabaseObject
- Throws:
IOException
doErase
protected void doErase(DatabaseEntryObject e)
throws IOException
- Specified by:
doErase in class DatabaseObject
- Throws:
IOException
doStore
protected boolean doStore(DatabaseEntryObject e)
throws IOException
- Description copied from class:
DatabaseObject
- Return true if the entry is a new entry, false if not.
- Specified by:
doStore in class DatabaseObject
- Throws:
IOException
doLoad
protected void doLoad(DatabaseEntryObject e)
throws IOException,
IllegalStateException
- Specified by:
doLoad in class DatabaseObject
- Throws:
IOException
IllegalStateException