|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileAction
In the version 1.04 of persistence,some actions on handling files were too simple to use, like querying files.So it would be changed to deal with files in the new version. More power actions will be provided ,and they can give users more help. This interface ,FileAction ,creates all the new actions on handling files.
Method Summary | |
---|---|
java.util.List<?> |
batchInsert(java.util.List<?> obj)
Insert objects into file system |
java.util.List<?> |
batchUpdate(java.lang.Object obj,
Predicate p,
boolean replaceObject)
Update objects of file system |
java.util.TreeMap<?,?> |
createIndex(java.lang.String indexName,
java.lang.Class<?> clazz,
java.lang.reflect.Field field)
Create new index which made of TreeMap. |
int |
delete(Predicate p,
java.lang.Class<?> clazz)
Delete one object of file system |
java.util.TreeMap<?,?> |
getIndex(java.lang.Class<?> clazz,
java.lang.String indexName)
Get new index which made of TreeMap. |
java.lang.Object |
insert(java.lang.Object obj)
Insert one object into file system |
java.util.List<?> |
query(Predicate p,
java.lang.Class<?> clazz)
Query. Those classed who implement this interface will set search condition by themselves.So it uses Object(common condition object) here. |
boolean |
removeIndex(java.lang.Class<?> clazz,
java.lang.String indexName)
Remove index which made of TreeMap. |
SeFileAction |
setChildFolder(java.lang.String childFolder)
Set file action. |
FileAction |
setDBFolder(java.net.URI uri)
Set root folder of file db |
java.lang.Object |
update(java.lang.Object obj,
Predicate<?> p,
boolean replaceObject)
Update one object of file system |
Method Detail |
---|
SeFileAction setChildFolder(java.lang.String childFolder)
child
- folderFileAction setDBFolder(java.net.URI uri) throws OperationsException
url
- - file URL
OperationsException
java.util.TreeMap<?,?> createIndex(java.lang.String indexName, java.lang.Class<?> clazz, java.lang.reflect.Field field) throws OperationsException
url
- - index name
OperationsException
java.util.TreeMap<?,?> getIndex(java.lang.Class<?> clazz, java.lang.String indexName) throws OperationsException
url
- - index name
OperationsException
boolean removeIndex(java.lang.Class<?> clazz, java.lang.String indexName) throws OperationsException
url
- - index name
OperationsException
java.lang.Object insert(java.lang.Object obj) throws OperationsException
obj
- Object
OperationsException
java.lang.Object update(java.lang.Object obj, Predicate<?> p, boolean replaceObject) throws OperationsException
obj
- Objectp
- Predicate Search condition objectreplaceObject
- If users want to change the whole object ,it should be true.
OperationsException
int delete(Predicate p, java.lang.Class<?> clazz) throws OperationsException
obj
- Objectclazz
- - Class of object which will be deleted
OperationsException
java.util.List<?> query(Predicate p, java.lang.Class<?> clazz) throws OperationsException
p
- - search conditionclazz
- - Class of return
OperationsException
java.util.List<?> batchInsert(java.util.List<?> obj) throws OperationsException
obj
- list of Object
OperationsException
java.util.List<?> batchUpdate(java.lang.Object obj, Predicate p, boolean replaceObject) throws OperationsException
obj
- Objectp
- Predicate Search condition objectreplaceObject
- If users want to change the whole object ,it should be true.
OperationsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |