| Modifier and Type | Field and Description |
|---|---|
protected IDXAbstractDatabase |
db |
protected IDBObjectStore |
idbObjectStore |
OBJECT_STORE_NAME| Modifier | Constructor and Description |
|---|---|
protected |
IDXFileStore(IDXAbstractDatabase db,
IDBObjectStore idbObjectStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Blob file,
String fileName)
Insert a new file into the database.
|
void |
add(Blob file,
String fileName,
DatabaseWriteCallback<String> callback)
Insert a new file into the database.
|
void |
clear()
Removes all files from the database FileStore
|
void |
count(DatabaseCountCallback callback)
Check the number of files on the fileStore
|
void |
count(KeyRange<String> range,
DatabaseCountCallback callback)
Check the number of files on the fileStore
|
void |
delete(KeyRange<String> keyRange)
Remove a range of files from the database
|
void |
delete(KeyRange<String> keyRange,
DatabaseDeleteCallback callback)
Remove a range of files from the database
|
void |
delete(String key,
DatabaseDeleteCallback callback)
Remove the file from the database
|
void |
get(String key,
DatabaseRetrieveCallback<Blob> callback)
Retrieve a file from the database.
|
KeyRangeFactory<String> |
getKeyRangeFactory()
Creates a factory for
KeyRange objects used by this store. |
void |
openCursor(FileStoreCursorCallback callback)
Open a
FileCursor object, to allow iteration over the files on this store. |
void |
openCursor(KeyRange<String> keyRange,
Cursor.CursorDirection direction,
FileStoreCursorCallback callback)
Open a
FileCursor object, to allow iteration over the files on this store. |
void |
openCursor(KeyRange<String> keyRange,
FileStoreCursorCallback callback)
Open a
FileCursor object, to allow iteration over the files on this store. |
void |
put(Blob file,
String fileName)
If database already contains a file stored with the given fileName, update the file stored.
|
void |
put(Blob file,
String fileName,
DatabaseWriteCallback<String> callback)
If database already contains a file stored with the given fileName, update the file stored.
|
reportErrorprotected final IDBObjectStore idbObjectStore
protected final IDXAbstractDatabase db
protected IDXFileStore(IDXAbstractDatabase db, IDBObjectStore idbObjectStore)
public void add(Blob file, String fileName)
FileStorepublic void put(Blob file, String fileName)
FileStorepublic void delete(KeyRange<String> keyRange)
FileStorepublic void add(Blob file, String fileName, DatabaseWriteCallback<String> callback)
FileStorepublic void put(Blob file, String fileName, DatabaseWriteCallback<String> callback)
FileStorepublic void get(String key, DatabaseRetrieveCallback<Blob> callback)
FileStorepublic void delete(String key, DatabaseDeleteCallback callback)
FileStorepublic void delete(KeyRange<String> keyRange, DatabaseDeleteCallback callback)
FileStorepublic void clear()
FileStorepublic void openCursor(FileStoreCursorCallback callback)
FileStoreFileCursor object, to allow iteration over the files on this store.openCursor in interface FileStorecallback - called when the operation completepublic void openCursor(KeyRange<String> keyRange, FileStoreCursorCallback callback)
FileStoreFileCursor object, to allow iteration over the files on this store.openCursor in interface FileStorekeyRange - an object specifying the fileNames range to appear on iterationcallback - called when the operation completepublic void openCursor(KeyRange<String> keyRange, Cursor.CursorDirection direction, FileStoreCursorCallback callback)
FileStoreFileCursor object, to allow iteration over the files on this store.openCursor in interface FileStorekeyRange - an object specifying the fileNames range to appear on iterationdirection - specifies the cursor iteration directioncallback - called when the operation completepublic void count(DatabaseCountCallback callback)
FileStorepublic void count(KeyRange<String> range, DatabaseCountCallback callback)
FileStorepublic KeyRangeFactory<String> getKeyRangeFactory()
FileStoreKeyRange objects used by this store.getKeyRangeFactory in interface FileStoreCopyright © 2015. All rights reserved.