Package de.caluga.morphium.query
Class Query<T>
java.lang.Object
de.caluga.morphium.query.Query<T>
- All Implemented Interfaces:
Cloneable
User: Stpehan Bösebeck
Date: 26.03.12
Time: 22:14
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProjection(Enum f, String projectOperator) addProjection(String f, String projectOperator) asIterable(int windowSize) asIterable(int windowSize, Class<? extends QueryIterator<T>> it) asIterable(QueryIterator<T> ret) asList()voidasList(AsyncOperationCallback<T> callback) clone()complexQuery(Map<String, Object> query) Deprecated.complexQuery(Map<String, Object> query, String sort, int skip, int limit) use rawQuery() insteadDeprecated.longcomplexQueryCount(Map<String, Object> query) complexQueryOne(Map<String, Object> query) longcountAll()voidvoidvoidvoiddec(Enum field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoiddec(Enum field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoiddec(Enum field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoiddec(Enum field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoiddec(String field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoiddec(String field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoiddec(String field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoiddec(String field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voiddelete()findOneAndUpdate(Map<String, Object> update) findOneAndUpdateEnums(Map<Enum, Object> update) get()voidget(AsyncOperationCallback<T> callback) intDeprecated.voidgetById(Object id, AsyncOperationCallback<T> callback) Deprecated.getDB()intgetLimit()intintgetSkip()getSort()String[]getTags()getType()getWhere()<R> List<R>idList()voididList(AsyncOperationCallback<T> callback) voidvoidvoidinc(Enum field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoidinc(Enum field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoidinc(Enum field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoidinc(Enum field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoidinc(String field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoidinc(String field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoidinc(String field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidvoidinc(String field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) booleanlimit(int i) matchesJsonSchema(String schemaDef) matchesJsonSchema(Map<String, Object> schemaDef) voidoverrideDB(String overrideDB) voidvoidvoidpull(Enum field, Expr value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpull(Enum field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpull(String field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpullAll(Enum field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpullAll(String field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpush(Enum field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpush(String field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpushAll(Enum field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidvoidpushAll(String field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) q()voidvoidvoidset(Enum field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidset(Enum field, Object value, AsyncOperationCallback<T> cb) voidvoidvoidset(String field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) voidset(String field, Object value, AsyncOperationCallback<T> cb) voidvoidvoidvoidvoidsetAutoValuesEnabled(boolean autoValuesEnabled) setBatchSize(int batchSize) setCollation(Collation collation) voidvoidvoidvoidvoidsetExecutor(ThreadPoolExecutor executor) voidsetProjection(Enum... fl) setProjection(String... fl) voidsetReadPreferenceLevel(ReadPreferenceLevel readPreferenceLevel) voidskip(int i) this does not check for existence of the Field!voidtail(int batchSize, int maxWait, AsyncOperationCallback<T> cb) do a tail querytext(Query.TextSearchLanguages lang, boolean caseSensitive, boolean diacriticSensitive, String... text) text(Query.TextSearchLanguages lang, String... text) text(String metaScoreField, Query.TextSearchLanguages lang, boolean caseSensitive, boolean diacriticSensitive, String... text) text(String metaScoreField, Query.TextSearchLanguages lang, String... text) textSearch(Query.TextSearchLanguages lang, String... texts) Deprecated.textSearch(String... texts) Deprecated.toString()
-
Constructor Details
-
Query
-
Query
-
-
Method Details
-
getBatchSize
public int getBatchSize() -
setBatchSize
-
getCollation
-
setCollation
-
getDB
-
overrideDB
-
getTags
-
addTag
-
disableAutoValues
-
enableAutoValues
-
isAutoValuesEnabled
public boolean isAutoValuesEnabled() -
setAutoValuesEnabled
-
getServer
-
getExecutor
-
setExecutor
-
getWhere
-
getMorphium
-
setMorphium
-
getReadPreferenceLevel
-
setReadPreferenceLevel
-
q
-
complexQuery
Deprecated.use rawQuery instead- Parameters:
query-- Returns:
-
complexQuery
use rawQuery() instead- Parameters:
query-sort-skip-limit-- Returns:
-
findOneAndDelete
-
findOneAndUpdate
-
findOneAndUpdateEnums
-
getARHelper
-
setARHelper
-
complexQueryCount
-
rawQuery
-
complexQuery
@Deprecated public List<T> complexQuery(Map<String, Object> query, Map<String, Integer> sort, int skip, int limit) Deprecated.use rawQuery to set query, and standard API- Parameters:
query- - query to be sentsort-skip- - amount to skiplimit- - maximium number of results- Returns:
-
getFieldListForQuery
-
distinct
-
complexQueryOne
-
complexQueryOne
-
complexQueryOne
-
getLimit
public int getLimit() -
getSkip
public int getSkip() -
getSort
-
addChild
-
where
-
f
-
f
-
f
-
f
-
or
-
or
-
nor
-
limit
-
skip
-
sort
this does not check for existence of the Field! Key in the map can be any text- Parameters:
n-- Returns:
-
sortEnum
-
sort
-
sort
-
countAll
-
countAll
public long countAll() -
toQueryObject
-
expr
-
matchesJsonSchema
-
matchesJsonSchema
- Throws:
org.json.simple.parser.ParseException
-
getType
-
setType
-
asList
-
asMapList
-
asMapIterable
-
asList
-
asIterable
-
asIterable
-
asIterable
-
getCursor
- Throws:
MorphiumDriverException
-
asIterable
-
getById
Deprecated. -
getById
Deprecated. -
get
-
get
-
idList
-
idList
-
clone
-
delete
public void delete() -
set
public void set(String field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
set
public void set(Enum field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
setEnum
public void setEnum(Map<Enum, Object> map, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
set
public void set(Map<String, Object> map, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
set
-
set
-
setEnum
-
set
-
set
-
set
-
setEnum
-
set
-
set
-
set
-
setEnum
-
set
-
push
-
push
-
push
public void push(String field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
push
public void push(Enum field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pushAll
-
pushAll
-
pushAll
public void pushAll(String field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pushAll
public void pushAll(Enum field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pullAll
-
pullAll
-
pullAll
public void pullAll(String field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pullAll
public void pullAll(Enum field, List value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pull
-
pull
-
pull
public void pull(String field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pull
public void pull(Enum field, Object value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pull
public void pull(Enum field, Expr value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
pull
-
pull
-
inc
public void inc(String field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
-
inc
-
inc
-
inc
-
inc
public void inc(String field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
-
inc
-
inc
-
inc
-
inc
public void inc(Enum field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
public void inc(Enum field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
public void inc(Enum field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
public void inc(Enum field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
public void inc(String field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
-
inc
-
inc
-
inc
-
inc
public void inc(String field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
inc
-
inc
-
inc
-
inc
-
dec
-
dec
-
dec
-
dec
-
dec
public void dec(Enum field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
public void dec(String field, Integer value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
public void dec(Enum field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
public void dec(String field, Double value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
public void dec(Enum field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
public void dec(String field, Long value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
public void dec(Enum field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
public void dec(String field, Number value, boolean upsert, boolean multiple, AsyncOperationCallback<T> cb) -
dec
-
dec
-
dec
-
dec
-
dec
-
dec
-
dec
-
dec
-
dec
-
dec
-
dec
-
dec
-
getNumberOfPendingRequests
public int getNumberOfPendingRequests() -
getCollectionName
-
setCollectionName
-
text
-
text
-
text
public Query<T> text(Query.TextSearchLanguages lang, boolean caseSensitive, boolean diacriticSensitive, String... text) -
text
public Query<T> text(String metaScoreField, Query.TextSearchLanguages lang, boolean caseSensitive, boolean diacriticSensitive, String... text) -
text
-
textSearch
Deprecated. -
textSearch
Deprecated. -
setProjection
-
setProjection
-
addProjection
-
addProjection
-
addProjection
-
addProjection
-
hideFieldInProjection
-
tail
do a tail query- Parameters:
batchSize- - determins how much data is read in one stepmaxWait- - how long to wait _at most_ for data, throws Exception otherwisecb- - the callback being called for _every single document_ - the entity field is filled, lists will be null
-
hideFieldInProjection
-
toString
-
getFindCmd
-