|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nonesole.persistence.file.operation.first.SingletonSeFileAction
public class SingletonSeFileAction
This class implements FileAction interface.It is Serialization Object Operation.
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. |
static SingletonSeFileAction |
self()
|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SingletonSeFileAction self()
public java.util.List<?> batchInsert(java.util.List<?> obj) throws OperationsException
FileAction
batchInsert
in interface FileAction
obj
- list of Object
OperationsException
public java.util.List<?> batchUpdate(java.lang.Object obj, Predicate p, boolean replaceObject) throws OperationsException
FileAction
batchUpdate
in interface FileAction
obj
- Objectp
- Predicate Search condition objectreplaceObject
- If users want to change the whole object ,it should be true.
OperationsException
public int delete(Predicate p, java.lang.Class<?> clazz) throws OperationsException
FileAction
delete
in interface FileAction
clazz
- - Class of object which will be deleted
OperationsException
public java.lang.Object insert(java.lang.Object obj) throws OperationsException
FileAction
insert
in interface FileAction
obj
- Object
OperationsException
public java.util.List<?> query(Predicate p, java.lang.Class<?> clazz) throws OperationsException
FileAction
query
in interface FileAction
p
- - search conditionclazz
- - Class of return
OperationsException
public FileAction setDBFolder(java.net.URI uri) throws OperationsException
FileAction
setDBFolder
in interface FileAction
OperationsException
public java.lang.Object update(java.lang.Object obj, Predicate<?> p, boolean replaceObject) throws OperationsException
FileAction
update
in interface FileAction
obj
- Objectp
- Predicate Search condition objectreplaceObject
- If users want to change the whole object ,it should be true.
OperationsException
public java.util.TreeMap<?,?> createIndex(java.lang.String indexName, java.lang.Class<?> clazz, java.lang.reflect.Field field) throws OperationsException
FileAction
createIndex
in interface FileAction
OperationsException
public java.util.TreeMap<?,?> getIndex(java.lang.Class<?> clazz, java.lang.String indexName) throws OperationsException
FileAction
getIndex
in interface FileAction
OperationsException
public boolean removeIndex(java.lang.Class<?> clazz, java.lang.String indexName) throws OperationsException
FileAction
removeIndex
in interface FileAction
OperationsException
public SeFileAction setChildFolder(java.lang.String childFolder)
FileAction
setChildFolder
in interface FileAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |