public interface JsonDBOperations
| Modifier and Type | Method and Description |
|---|---|
void |
addCollectionFileChangeListener(CollectionFileChangeListener listener)
adds a CollectionFileChangeListener to db.
|
void |
backup(java.lang.String backupPath)
This method backs up JSONDB collections to specified backup path
|
<T> void |
changeEncryption(ICipher newCipher)
A method that allows changing the encryption algorithm and or encryption key used.
|
<T> boolean |
collectionExists(java.lang.Class<T> entityClass)
Check to see if a collection with a name indicated by the entity class exists.
|
boolean |
collectionExists(java.lang.String collectionName)
Check to see if a collection with a given name exists.
|
<T> void |
createCollection(java.lang.Class<T> entityClass)
Create an uncapped collection with a name based on the provided entity class.
|
<T> void |
createCollection(java.lang.String collectionName)
Create an uncapped collection with the provided name.
|
<T> void |
dropCollection(java.lang.Class<T> entityClass)
Drop the collection with the name indicated by the entity class.
|
void |
dropCollection(java.lang.String collectionName)
Drop the collection with the given name.
|
<T> java.util.List<T> |
find(java.lang.String jxQuery,
java.lang.Class<T> entityClass)
Map the results of an ad-hoc query on the collection for the entity class to a List of the specified type.
|
<T> java.util.List<T> |
find(java.lang.String jxQuery,
java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator)
Map the results of an ad-hoc query on the collection for the entity class to a List of the specified type.
|
<T> java.util.List<T> |
find(java.lang.String jxQuery,
java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
Map the results of an ad-hoc query on the specified collection to a List of the specified type.
|
<T> java.util.List<T> |
find(java.lang.String jxQuery,
java.lang.String collectionName)
Map the results of an ad-hoc query on the specified collection to a List of the specified type.
|
<T> java.util.List<T> |
find(java.lang.String jxQuery,
java.lang.String collectionName,
java.util.Comparator<? super T> comparator)
Map the results of an ad-hoc query on the specified collection to a List of the specified type.
|
<T> java.util.List<T> |
find(java.lang.String jxQuery,
java.lang.String collectionName,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
Map the results of an ad-hoc query on the specified collection to a List of the specified type.
|
<T> java.util.List<T> |
findAll(java.lang.Class<T> entityClass)
Query for a list of objects of type T from the specified collection.
|
<T> java.util.List<T> |
findAll(java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator)
Query for a list of objects of type T from the specified collection.
|
<T> java.util.List<T> |
findAll(java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
Query for a list of objects of type T from the specified collection.
|
<T> java.util.List<T> |
findAll(java.lang.String collectionName)
Query for a list of objects of type T from the specified collection.
|
<T> java.util.List<T> |
findAll(java.lang.String collectionName,
java.util.Comparator<? super T> comparator)
Query for a list of objects of type T from the specified collection.
|
<T> java.util.List<T> |
findAll(java.lang.String collectionName,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
Query for a list of objects of type T from the specified collection.
|
<T> java.util.List<T> |
findAllAndModify(java.lang.String jxQuery,
Update update,
java.lang.Class<T> entityClass) |
<T> java.util.List<T> |
findAllAndModify(java.lang.String jxQuery,
Update update,
java.lang.String collectionName) |
<T> java.util.List<T> |
findAllAndRemove(java.lang.String jxQuery,
java.lang.Class<T> entityClass)
Returns and removes all documents matching the given query form the collection used to store the entityClass.
|
<T> java.util.List<T> |
findAllAndRemove(java.lang.String jxQuery,
java.lang.String collectionName)
Returns and removes all documents matching the given query form the collection used to store the entityClass.
|
<T> T |
findAndModify(java.lang.String jxQuery,
Update update,
java.lang.Class<T> entityClass)
Triggers findAndModify to apply provided Update on the first document matching Criteria of given Query.
|
<T> T |
findAndModify(java.lang.String jxQuery,
Update update,
java.lang.String collectionName)
Triggers findAndModify to apply provided Update on the first document matching Criteria of given Query.
|
<T> T |
findAndRemove(java.lang.String jxQuery,
java.lang.Class<T> entityClass)
Map the results of the jxQuery on the collection for the entity type to a single
instance of an object of the specified type.
|
<T> T |
findAndRemove(java.lang.String jxQuery,
java.lang.String collectionName)
Map the results of the jxQuery on the collection for the entity type to a single
instance of an object of the specified type.
|
<T> T |
findById(java.lang.Object id,
java.lang.Class<T> entityClass)
Returns a document with the given id mapped onto the given class.
|
<T> T |
findById(java.lang.Object id,
java.lang.String collectionName)
Returns the document with the given id from the given collection mapped onto the given target class.
|
<T> T |
findOne(java.lang.String jxQuery,
java.lang.Class<T> entityClass) |
<T> T |
findOne(java.lang.String jxQuery,
java.lang.String collectionName) |
<T> java.util.List<T> |
getCollection(java.lang.Class<T> entityClass)
Get a collection by name, creating it if it doesn't exist.
|
java.lang.String |
getCollectionName(java.lang.Class<?> entityClass)
The collection name used for the specified class by this template.
|
java.util.Set<java.lang.String> |
getCollectionNames()
A set of collection names.
|
boolean |
hasCollectionFileChangeListener()
a method to check if there are any registered CollectionFileChangeListener
|
<T> void |
insert(java.util.Collection<? extends T> batchToSave,
java.lang.Class<T> entityClass)
Insert a Collection of objects into a collection in a single batch write to the database.
|
<T> void |
insert(java.util.Collection<? extends T> batchToSave,
java.lang.String collectionName)
Insert a Collection of objects into a collection in a single batch write to the database.
|
<T> void |
insert(java.lang.Object objectToSave)
Insert the object into correct collection.
|
<T> void |
insert(java.lang.Object objectToSave,
java.lang.String collectionName)
Insert the object into the specified collection.
|
<T> boolean |
isCollectionReadonly(java.lang.Class<T> entityClass)
is a collection readonly,
A collection can be readonly if its schema version does not match the actualSchema version
|
<T> boolean |
isCollectionReadonly(java.lang.String collectionName) |
void |
reloadCollection(java.lang.String collectionName)
Reloads a particular collection from dblocation directory
|
void |
reLoadDB()
Re-load the collections from dblocation folder.
|
<T> java.util.List<T> |
remove(java.util.Collection<? extends T> batchToRemove,
java.lang.Class<T> entityClass)
Remove a Collection of objects from a collection in a single batch write to the database.
|
<T> java.util.List<T> |
remove(java.util.Collection<? extends T> batchToRemove,
java.lang.String collectionName)
Remove a Collection of objects from a collection in a single batch write to the database.
|
<T> T |
remove(java.lang.Object objectToRemove,
java.lang.Class<T> entityClass)
Remove the given object from the collection by id.
|
<T> T |
remove(java.lang.Object objectToRemove,
java.lang.String collectionName)
Remove the given object from the collection by id.
|
void |
removeCollectionFileChangeListener(CollectionFileChangeListener listener)
removes a previously added CollectionFileChangeListener
|
void |
restore(java.lang.String restorePath,
boolean merge)
This method restores JSONDB collections from specified restore path.
|
<T> void |
save(java.lang.Object objectToSave,
java.lang.Class<T> entityClass)
Save the object to the collection for the entity type of the object to save.
|
<T> void |
save(java.lang.Object objectToSave,
java.lang.String collectionName)
Save the object to the collection for the entity type of the object to save.
|
<T> void |
updateCollectionSchema(CollectionSchemaUpdate update,
java.lang.Class<T> entityClass) |
<T> void |
updateCollectionSchema(CollectionSchemaUpdate update,
java.lang.String collectionName)
Update a collection as per the specified CollectionUpdate param.
|
<T> void |
upsert(java.util.Collection<? extends T> batchToSave,
java.lang.Class<T> entityClass)
Performs an upsert.
|
<T> void |
upsert(java.util.Collection<? extends T> batchToSave,
java.lang.String collectionName)
Performs an upsert.
|
<T> void |
upsert(java.lang.Object objectToSave)
Performs an upsert.
|
<T> void |
upsert(java.lang.Object objectToSave,
java.lang.String collectionName)
Performs an upsert.
|
void reLoadDB()
void reloadCollection(java.lang.String collectionName)
collectionName - name of the collection to reloadvoid addCollectionFileChangeListener(CollectionFileChangeListener listener)
listener - actual listener to addvoid removeCollectionFileChangeListener(CollectionFileChangeListener listener)
listener - actual listener to removeboolean hasCollectionFileChangeListener()
<T> void createCollection(java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageentityClass - class that determines the collection to create<T> void createCollection(java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagecollectionName - name of the collection<T> void dropCollection(java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageentityClass - class that determines the collection to drop/delete.void dropCollection(java.lang.String collectionName)
collectionName - name of the collection to drop/delete.<T> void updateCollectionSchema(CollectionSchemaUpdate update, java.lang.Class<T> entityClass)
<T> void updateCollectionSchema(CollectionSchemaUpdate update, java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackageupdate - how to update the CollectioncollectionName - name of the collection to update schema forjava.util.Set<java.lang.String> getCollectionNames()
java.lang.String getCollectionName(java.lang.Class<?> entityClass)
entityClass - must not be null.<T> java.util.List<T> getCollection(java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageentityClass - class that determines the name of the collection<T> boolean collectionExists(java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageentityClass - class that determines the name of the collectionboolean collectionExists(java.lang.String collectionName)
collectionName - name of the collection<T> boolean isCollectionReadonly(java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageentityClass - class that determines the collection<T> boolean isCollectionReadonly(java.lang.String collectionName)
<T> java.util.List<T> find(java.lang.String jxQuery,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - a XPATH query expressionentityClass - the parameterized type of the returned list.<T> java.util.List<T> find(java.lang.String jxQuery,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - a XPATH query expressioncollectionName - name of the collection to retrieve the objects from<T> java.util.List<T> find(java.lang.String jxQuery,
java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - a XPATH query expressionentityClass - the parameterized type of the returned list.comparator - Comparator to use for sorting the objects<T> java.util.List<T> find(java.lang.String jxQuery,
java.lang.String collectionName,
java.util.Comparator<? super T> comparator)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - a XPATH query expressioncollectionName - name of the collection to retrieve the objects fromcomparator - Comparator to use for sorting the objects<T> java.util.List<T> find(java.lang.String jxQuery,
java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - a XPATH query expressionentityClass - the parameterized type of the returned list.comparator - Comparator to use for sorting the objects
Note: If sorting along with slicing is used then sorting over fields with the 'secret' anotation
will actually sort the raw encrypted field value, which will be undesirable and probably useless,
this limitation is for efficiency reasons, when slicing is enabled we defer the deep copy and
decryption of secret fields until a later stage (which happens after sorting), assuming quite
some objects may not be selected due to slicing
However if slicing is not used then the sorting will sort over unencrypted field value.slice - select the indices to return from the find_result. The behaviour of this slicing feature is similar to
the slicing feature in python or numpy, as much as possible
https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html
A slice is a string notation and the basic slice syntax is i:j:k, where i is the starting index,
j is the stopping index, and k is the step (k != 0). In other words it is start:stop:step
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "1:7:2" returns [T1, T3, T5]
i is inclusive, j is exclusive
Negative i and j are interpreted as n + i and n + j where n is the number of elements found. Negative
k makes stepping go towards smaller indices.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "-2:10" returns [T8, T9]
slice = "-3:3:-1" returns [T7, T6, T5, T4]
Assume n is the number of elements in find_result. Then, if i is not given it defaults to 0
for k>0 and n - 1 for k<0 . If j is not given it defaults to n for k>0 and -n-1 for k<0
If k is not given it defaults to 1. Note that :: is the same as : and means select all indices
from find_result.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "5:" returns [T5, T6, T7, T8, T9]
Assume n is the number of elements in find_result. Then, if j>n then it is considered as n, in case
of negative j it is considered -n.<T> java.util.List<T> find(java.lang.String jxQuery,
java.lang.String collectionName,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - a XPATH query expressioncollectionName - name of the collection to retrieve the objects fromcomparator - Comparator to use for sorting the objects
Note: If sorting along with slicing is used then sorting over fields with the 'secret' anotation
will actually sort the raw encrypted field value, which will be undesirable and probably useless,
this limitation is for efficiency reasons, when slicing is enabled we defer the deep copy and
decryption of secret fields until a later stage (which happens after sorting), assuming quite
some objects may not be selected due to slicing
However if slicing is not used then the sorting will sort over unencrypted field value.slice - select the indices to return from the find_result. The behaviour of this slicing feature is similar to
the slicing feature in python or numpy, as much as possible
https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html
A slice is a string notation and the basic slice syntax is i:j:k, where i is the starting index,
j is the stopping index, and k is the step (k != 0). In other words it is start:stop:step
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "1:7:2" returns [T1, T3, T5]
i is inclusive, j is exclusive
Negative i and j are interpreted as n + i and n + j where n is the number of elements found. Negative
k makes stepping go towards smaller indices.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "-2:10" returns [T8, T9]
slice = "-3:3:-1" returns [T7, T6, T5, T4]
Assume n is the number of elements in find_result. Then, if i is not given it defaults to 0
for k>0 and n - 1 for k<0 . If j is not given it defaults to n for k>0 and -n-1 for k<0
If k is not given it defaults to 1. Note that :: is the same as : and means select all indices
from find_result.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "5:" returns [T5, T6, T7, T8, T9]
Assume n is the number of elements in find_result. Then, if j>n then it is considered as n, in case
of negative j it is considered -n.<T> java.util.List<T> findAll(java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageentityClass - the parameterized type of the returned list.<T> java.util.List<T> findAll(java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagecollectionName - name of the collection to retrieve the objects from<T> java.util.List<T> findAll(java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator)
T - Type annotated with Document annotation
and member of the baseScanPackageentityClass - the parameterized type of the returned list.comparator - Comparator to use for sorting the objects<T> java.util.List<T> findAll(java.lang.String collectionName,
java.util.Comparator<? super T> comparator)
T - Type annotated with Document annotation
and member of the baseScanPackagecollectionName - name of the collection to retrieve the objects fromcomparator - Comparator to use for sorting the objects<T> java.util.List<T> findAll(java.lang.Class<T> entityClass,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
T - Type annotated with Document annotation and member of the baseScanPackageentityClass - the parameterized type of the returned list.comparator - Comparator to use for sorting the objects
Note: If sorting along with slicing is used then sorting over fields with the 'secret' anotation
will actually sort the raw encrypted field value, which will be undesirable and probably useless,
this limitation is for efficiency reasons, when slicing is enabled we defer the deep copy and
decryption of secret fields until a later stage (which happens after sorting), assuming quite
some objects may not be selected due to slicing
However if slicing is not used then the sorting will sort over unencrypted field value.slice - select the indices to return from the find_result. The behaviour of this slicing feature is similar to
the slicing feature in python or numpy, as much as possible
https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html
A slice is a string notation and the basic slice syntax is i:j:k, where i is the starting index,
j is the stopping index, and k is the step (k != 0). In other words it is start:stop:step
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "1:7:2" returns [T1, T3, T5]
i is inclusive, j is exclusive
Negative i and j are interpreted as n + i and n + j where n is the number of elements found. Negative
k makes stepping go towards smaller indices.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "-2:10" returns [T8, T9]
slice = "-3:3:-1" returns [T7, T6, T5, T4]
Assume n is the number of elements in find_result. Then, if i is not given it defaults to 0
for k>0 and n - 1 for k<0 . If j is not given it defaults to n for k>0 and -n-1 for k<0
If k is not given it defaults to 1. Note that :: is the same as : and means select all indices
from find_result.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "5:" returns [T5, T6, T7, T8, T9]
Assume n is the number of elements in find_result. Then, if j>n then it is considered as n, in case
of negative j it is considered -n.<T> java.util.List<T> findAll(java.lang.String collectionName,
java.util.Comparator<? super T> comparator,
java.lang.String slice)
T - Type annotated with Document annotation and member of the baseScanPackagecollectionName - name of the collection to retrieve the objects fromcomparator - Comparator to use for sorting the objects
Note: If sorting along with slicing is used then sorting over fields with the 'secret' anotation
will actually sort the raw encrypted field value, which will be undesirable and probably useless,
this limitation is for efficiency reasons, when slicing is enabled we defer the deep copy and
decryption of secret fields until a later stage (which happens after sorting), assuming quite
some objects may not be selected due to slicing
However if slicing is not used then the sorting will sort over unencrypted field value.slice - select the indices to return from the find_result. The behaviour of this slicing feature is similar to
the slicing feature in python or numpy, as much as possible
https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html
A slice is a string notation and the basic slice syntax is i:j:k, where i is the starting index,
j is the stopping index, and k is the step (k != 0). In other words it is start:stop:step
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "1:7:2" returns [T1, T3, T5]
i is inclusive, j is exclusive
Negative i and j are interpreted as n + i and n + j where n is the number of elements found. Negative
k makes stepping go towards smaller indices.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "-2:10" returns [T8, T9]
slice = "-3:3:-1" returns [T7, T6, T5, T4]
Assume n is the number of elements in find_result. Then, if i is not given it defaults to 0
for k>0 and n - 1 for k<0 . If j is not given it defaults to n for k>0 and -n-1 for k<0
If k is not given it defaults to 1. Note that :: is the same as : and means select all indices
from find_result.
Example find_result = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
slice = "5:" returns [T5, T6, T7, T8, T9]
Assume n is the number of elements in find_result. Then, if j>n then it is considered as n, in case
of negative j it is considered -n.<T> T findById(java.lang.Object id,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation and member of the baseScanPackageid - the id of the document to return.entityClass - the type the document shall be converted into.<T> T findById(java.lang.Object id,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackageid - the id of the document to returncollectionName - the collection to query for the document<T> T findOne(java.lang.String jxQuery,
java.lang.Class<T> entityClass)
<T> T findOne(java.lang.String jxQuery,
java.lang.String collectionName)
<T> void insert(java.lang.Object objectToSave)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToSave - the object to store in the collection<T> void insert(java.lang.Object objectToSave,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToSave - the object to store in the collectioncollectionName - name of the collection to store the object in<T> void insert(java.util.Collection<? extends T> batchToSave,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackagebatchToSave - the list of objects to save.entityClass - class that determines the collection to use<T> void insert(java.util.Collection<? extends T> batchToSave,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagebatchToSave - the list of objects to save.collectionName - name of the collection to store the object in<T> void save(java.lang.Object objectToSave,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToSave - the object to store in the collectionentityClass - class that determines the collection to use<T> void save(java.lang.Object objectToSave,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToSave - the object to store in the collectioncollectionName - name of the collection to store the object in<T> T remove(java.lang.Object objectToRemove,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToRemove - the object to remove from the collectionentityClass - class that determines the collection to use<T> T remove(java.lang.Object objectToRemove,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToRemove - the object to remove from the collectioncollectionName - name of the collection to remove the object from<T> java.util.List<T> remove(java.util.Collection<? extends T> batchToRemove,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackagebatchToRemove - the list of objects to remove.entityClass - class that determines the collection to use<T> java.util.List<T> remove(java.util.Collection<? extends T> batchToRemove,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagebatchToRemove - the list of objects to remove.collectionName - name of the collection to remove the objects from<T> void upsert(java.lang.Object objectToSave)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToSave - the object to update.<T> void upsert(java.lang.Object objectToSave,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackageobjectToSave - the object to update.collectionName - name of the collection to update the objects from<T> void upsert(java.util.Collection<? extends T> batchToSave,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackagebatchToSave - the list of objects to update.entityClass - class that determines the collection to use<T> void upsert(java.util.Collection<? extends T> batchToSave,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagebatchToSave - the list of objects to update.collectionName - name of the collection to update the objects from<T> T findAndRemove(java.lang.String jxQuery,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - JxPath query stringentityClass - class that determines the collection to use<T> T findAndRemove(java.lang.String jxQuery,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - JxPath query stringcollectionName - name of the collection to update the objects from<T> java.util.List<T> findAllAndRemove(java.lang.String jxQuery,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - JxPath query stringentityClass - class that determines the collection to use<T> java.util.List<T> findAllAndRemove(java.lang.String jxQuery,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - JxPath query stringcollectionName - name of the collection to update the objects from<T> T findAndModify(java.lang.String jxQuery,
Update update,
java.lang.Class<T> entityClass)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - JxPath query stringupdate - The Update operation to performentityClass - class that determines the collection to use<T> T findAndModify(java.lang.String jxQuery,
Update update,
java.lang.String collectionName)
T - Type annotated with Document annotation
and member of the baseScanPackagejxQuery - JxPath query stringupdate - The Update operation to performcollectionName - name of the collection to update the objects from<T> java.util.List<T> findAllAndModify(java.lang.String jxQuery,
Update update,
java.lang.Class<T> entityClass)
<T> java.util.List<T> findAllAndModify(java.lang.String jxQuery,
Update update,
java.lang.String collectionName)
<T> void changeEncryption(ICipher newCipher)
T - Type annotated with Document annotation
and member of the baseScanPackagenewCipher - a new cipher to use, the algorithm may be same and just the key may be newvoid backup(java.lang.String backupPath)
backupPath - location at which to backup the database contentsvoid restore(java.lang.String restorePath,
boolean merge)
restorePath - path were backup jsondb files are presentmerge - whether to merge data from restore location