|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nonesole.persistence.file.operation.first.SeFileAction
public class SeFileAction
Constructor Summary | |
---|---|
SeFileAction()
|
Method Summary | |
---|---|
java.util.List<?> |
batchInsert(java.util.List<?> l)
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 |
static java.net.URI |
getConfig(java.lang.String key)
Get set which likes db folder path from config file. |
static java.net.URL |
getEnv(java.lang.String key)
Get set which likes db folder path from system env. |
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SeFileAction()
Method Detail |
---|
public static java.net.URI getConfig(java.lang.String key)
public static java.net.URL getEnv(java.lang.String key)
public java.util.List<?> batchInsert(java.util.List<?> l) throws OperationsException
FileAction
batchInsert
in interface FileAction
l
- 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 SeFileAction setChildFolder(java.lang.String childFolder)
FileAction
setChildFolder
in interface FileAction
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |