|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cruxframework.crux.core.client.db.DBObject
org.cruxframework.crux.core.client.db.IDXFileStore
public class IDXFileStore
CRUX INTERNAL CLASS. DO NOT USE IT DIRECTLY.
Indexed DB implementation for FileStore Interface. Use the interface FileStore instead.
| Field Summary | |
|---|---|
protected IDXAbstractDatabase |
db
|
protected IDBObjectStore |
idbObjectStore
|
| Fields inherited from class org.cruxframework.crux.core.client.db.DBObject |
|---|
logger |
| Fields inherited from interface org.cruxframework.crux.core.client.db.FileStore |
|---|
OBJECT_STORE_NAME |
| Constructor Summary | |
|---|---|
protected |
IDXFileStore(IDXAbstractDatabase db,
IDBObjectStore idbObjectStore)
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.cruxframework.crux.core.client.db.DBObject |
|---|
reportError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final IDBObjectStore idbObjectStore
protected final IDXAbstractDatabase db
| Constructor Detail |
|---|
protected IDXFileStore(IDXAbstractDatabase db,
IDBObjectStore idbObjectStore)
| Method Detail |
|---|
public void add(Blob file,
String fileName)
FileStore
add in interface FileStorefile - file to storefileName - file name
public void put(Blob file,
String fileName)
FileStore
put in interface FileStorefile - file to storefileName - file namepublic void delete(KeyRange<String> keyRange)
FileStore
delete in interface FileStorekeyRange - an object specifying the fileNames range to exclude
public void add(Blob file,
String fileName,
DatabaseWriteCallback<String> callback)
FileStore
add in interface FileStorefile - file to storefileName - file namecallback - called when the operation complete
public void put(Blob file,
String fileName,
DatabaseWriteCallback<String> callback)
FileStore
put in interface FileStorefile - file to storefileName - file namecallback - called when the operation complete
public void get(String key,
DatabaseRetrieveCallback<Blob> callback)
FileStore
get in interface FileStorekey - the fileName used to insert the objectcallback - called when the operation complete
public void delete(String key,
DatabaseDeleteCallback callback)
FileStore
delete in interface FileStorekey - the fileName used to insert the objectcallback - called when the operation complete
public void delete(KeyRange<String> keyRange,
DatabaseDeleteCallback callback)
FileStore
delete in interface FileStorekeyRange - an object specifying the fileNames range to excludecallback - called when the operation completepublic void clear()
FileStore
clear in interface FileStorepublic void openCursor(FileStoreCursorCallback callback)
FileStoreFileCursor object, to allow iteration over the files on this store.
openCursor in interface FileStorecallback - called when the operation complete
public 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 complete
public 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)
FileStore
count in interface FileStorecallback - called when the operation complete
public void count(KeyRange<String> range,
DatabaseCountCallback callback)
FileStore
count in interface FileStorerange - an object specifying the fileNames range to countcallback - called when the operation completepublic KeyRangeFactory<String> getKeyRangeFactory()
FileStoreKeyRange objects used by this store.
getKeyRangeFactory in interface FileStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||