public final class AsyncMongoCollectionExecutor extends Object
MongoCollectionExecutor
.Modifier and Type | Method and Description |
---|---|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
aggregate(Class<T> targetClass,
List<? extends org.bson.conversions.Bson> pipeline)
Aggregate.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> |
aggregate(List<? extends org.bson.conversions.Bson> pipeline)
Aggregate.
|
com.landawn.abacus.util.ContinuableFuture<Integer> |
bulkInsert(Collection<?> entities)
Bulk insert.
|
com.landawn.abacus.util.ContinuableFuture<Integer> |
bulkInsert(Collection<?> entities,
com.mongodb.client.model.BulkWriteOptions options)
Bulk insert.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.bulk.BulkWriteResult> |
bulkWrite(List<? extends com.mongodb.client.model.WriteModel<? extends org.bson.Document>> requests)
Bulk write.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.bulk.BulkWriteResult> |
bulkWrite(List<? extends com.mongodb.client.model.WriteModel<? extends org.bson.Document>> requests,
com.mongodb.client.model.BulkWriteOptions options)
Bulk write.
|
com.landawn.abacus.util.ContinuableFuture<Long> |
count()
Count.
|
com.landawn.abacus.util.ContinuableFuture<Long> |
count(org.bson.conversions.Bson filter)
Count.
|
com.landawn.abacus.util.ContinuableFuture<Long> |
count(org.bson.conversions.Bson filter,
com.mongodb.client.model.CountOptions options)
Count.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> |
delete(org.bson.types.ObjectId objectId)
Delete.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> |
delete(String objectId)
Delete.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> |
deleteAll(org.bson.conversions.Bson filter)
Delete all.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> |
deleteAll(org.bson.conversions.Bson filter,
com.mongodb.client.model.DeleteOptions options)
Delete all.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> |
deleteOne(org.bson.conversions.Bson filter)
Delete one.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> |
deleteOne(org.bson.conversions.Bson filter,
com.mongodb.client.model.DeleteOptions options)
Delete one.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
distinct(Class<T> targetClass,
String fieldName)
Distinct.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
distinct(Class<T> targetClass,
String fieldName,
org.bson.conversions.Bson filter)
Distinct.
|
com.landawn.abacus.util.ContinuableFuture<Boolean> |
exists(org.bson.conversions.Bson filter)
Exists.
|
com.landawn.abacus.util.ContinuableFuture<Boolean> |
exists(org.bson.types.ObjectId objectId)
Exists.
|
com.landawn.abacus.util.ContinuableFuture<Boolean> |
exists(String objectId)
Exists.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<org.bson.Document>> |
findFirst(org.bson.conversions.Bson filter)
Find first.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
findFirst(Class<T> targetClass,
org.bson.conversions.Bson filter)
Find first.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
findFirst(Class<T> targetClass,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
org.bson.conversions.Bson projection)
Find first.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
findFirst(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter)
Find first.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
findFirst(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort)
Find first.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
get(Class<T> targetClass,
org.bson.types.ObjectId objectId)
Gets the.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
get(Class<T> targetClass,
org.bson.types.ObjectId objectId,
Collection<String> selectPropNames)
Gets the.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
get(Class<T> targetClass,
String objectId)
Gets the.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> |
get(Class<T> targetClass,
String objectId,
Collection<String> selectPropNames)
Gets the.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<org.bson.Document>> |
get(org.bson.types.ObjectId objectId)
Gets the.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<org.bson.Document>> |
get(String objectId)
Gets the.
|
<T> com.landawn.abacus.util.ContinuableFuture<T> |
gett(Class<T> targetClass,
org.bson.types.ObjectId objectId)
Gets the t.
|
<T> com.landawn.abacus.util.ContinuableFuture<T> |
gett(Class<T> targetClass,
org.bson.types.ObjectId objectId,
Collection<String> selectPropNames)
Gets the t.
|
<T> com.landawn.abacus.util.ContinuableFuture<T> |
gett(Class<T> targetClass,
String objectId)
Gets the t.
|
<T> com.landawn.abacus.util.ContinuableFuture<T> |
gett(Class<T> targetClass,
String objectId,
Collection<String> selectPropNames)
Gets the t.
|
com.landawn.abacus.util.ContinuableFuture<org.bson.Document> |
gett(org.bson.types.ObjectId objectId)
Gets the t.
|
com.landawn.abacus.util.ContinuableFuture<org.bson.Document> |
gett(String objectId)
Gets the t.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> |
groupBy(Collection<String> fieldNames)
Group by.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> |
groupBy(String fieldName)
Group by.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> |
groupByAndCount(Collection<String> fieldNames)
Group by and count.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> |
groupByAndCount(String fieldName)
Group by and count.
|
com.landawn.abacus.util.ContinuableFuture<Void> |
insert(Object obj)
Insert.
|
com.landawn.abacus.util.ContinuableFuture<Void> |
insert(Object obj,
com.mongodb.client.model.InsertOneOptions options)
Insert.
|
com.landawn.abacus.util.ContinuableFuture<Void> |
insertAll(Collection<?> objList)
Insert all.
|
com.landawn.abacus.util.ContinuableFuture<Void> |
insertAll(Collection<?> objList,
com.mongodb.client.model.InsertManyOptions options)
Insert all.
|
com.landawn.abacus.util.ContinuableFuture<List<org.bson.Document>> |
list(org.bson.conversions.Bson filter)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<List<T>> |
list(Class<T> targetClass,
org.bson.conversions.Bson filter)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<List<T>> |
list(Class<T> targetClass,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
org.bson.conversions.Bson projection)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<List<T>> |
list(Class<T> targetClass,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
org.bson.conversions.Bson projection,
int offset,
int count)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<List<T>> |
list(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<List<T>> |
list(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<List<T>> |
list(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
int offset,
int count)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<List<T>> |
list(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
int offset,
int count)
List.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
mapReduce(Class<T> targetClass,
String mapFunction,
String reduceFunction)
Map reduce.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> |
mapReduce(String mapFunction,
String reduceFunction)
Map reduce.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(org.bson.conversions.Bson filter)
Query.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(Class<T> targetClass,
org.bson.conversions.Bson filter)
Query.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(Class<T> targetClass,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
org.bson.conversions.Bson projection)
Query.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(Class<T> targetClass,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
org.bson.conversions.Bson projection,
int offset,
int count)
Query.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter)
Query.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort)
Query.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
int offset,
int count)
Query.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> |
query(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
int offset,
int count)
Query.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalBoolean> |
queryForBoolean(String propName,
org.bson.conversions.Bson filter)
Query for boolean.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalByte> |
queryForByte(String propName,
org.bson.conversions.Bson filter)
Query for byte.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalChar> |
queryForChar(String propName,
org.bson.conversions.Bson filter)
Query for char.
|
<T extends Date> |
queryForDate(Class<T> targetClass,
String propName,
org.bson.conversions.Bson filter)
Query for date.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<Date>> |
queryForDate(String propName,
org.bson.conversions.Bson filter)
Query for date.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalDouble> |
queryForDouble(String propName,
org.bson.conversions.Bson filter)
Query for double.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalFloat> |
queryForFloat(String propName,
org.bson.conversions.Bson filter)
Query for float.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalInt> |
queryForInt(String propName,
org.bson.conversions.Bson filter)
Query for int.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalLong> |
queryForLong(String propName,
org.bson.conversions.Bson filter)
Query for long.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalShort> |
queryForShort(String propName,
org.bson.conversions.Bson filter)
Query for short.
|
<V> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<V>> |
queryForSingleResult(Class<V> targetClass,
String propName,
org.bson.conversions.Bson filter)
Query for single result.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<String>> |
queryForString(String propName,
org.bson.conversions.Bson filter)
Query for string.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
replace(org.bson.types.ObjectId objectId,
Object replacement)
Replace.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
replace(String objectId,
Object replacement)
Replace.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
replaceOne(org.bson.conversions.Bson filter,
Object replacement)
Replace one.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
replaceOne(org.bson.conversions.Bson filter,
Object replacement,
com.mongodb.client.model.ReplaceOptions options)
Replace one.
|
com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> |
stream(org.bson.conversions.Bson filter)
Stream.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
stream(Class<T> targetClass,
org.bson.conversions.Bson filter)
Stream.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
stream(Class<T> targetClass,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
org.bson.conversions.Bson projection)
Stream.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
stream(Class<T> targetClass,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
org.bson.conversions.Bson projection,
int offset,
int count)
Stream.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
stream(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter)
Stream.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
stream(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort)
Stream.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
stream(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
org.bson.conversions.Bson sort,
int offset,
int count)
Stream.
|
<T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> |
stream(Class<T> targetClass,
Collection<String> selectPropNames,
org.bson.conversions.Bson filter,
int offset,
int count)
Stream.
|
MongoCollectionExecutor |
sync()
Sync.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
update(org.bson.types.ObjectId objectId,
Object update)
Update.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
update(String objectId,
Object update)
Update.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
updateAll(org.bson.conversions.Bson filter,
Object update)
Update all.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
updateAll(org.bson.conversions.Bson filter,
Object update,
com.mongodb.client.model.UpdateOptions options)
Update all.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
updateOne(org.bson.conversions.Bson filter,
Object update)
Update one.
|
com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> |
updateOne(org.bson.conversions.Bson filter,
Object update,
com.mongodb.client.model.UpdateOptions options)
Update one.
|
public MongoCollectionExecutor sync()
public com.landawn.abacus.util.ContinuableFuture<Boolean> exists(String objectId)
objectId
- the object idpublic com.landawn.abacus.util.ContinuableFuture<Boolean> exists(org.bson.types.ObjectId objectId)
objectId
- the object idpublic com.landawn.abacus.util.ContinuableFuture<Boolean> exists(org.bson.conversions.Bson filter)
filter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<Long> count()
public com.landawn.abacus.util.ContinuableFuture<Long> count(org.bson.conversions.Bson filter)
filter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<Long> count(org.bson.conversions.Bson filter, com.mongodb.client.model.CountOptions options)
filter
- the filteroptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<org.bson.Document>> get(String objectId)
objectId
- the object idpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<org.bson.Document>> get(org.bson.types.ObjectId objectId)
objectId
- the object idpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> get(Class<T> targetClass, String objectId)
T
- the generic typetargetClass
- the target classobjectId
- the object idpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> get(Class<T> targetClass, org.bson.types.ObjectId objectId)
T
- the generic typetargetClass
- the target classobjectId
- the object idpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> get(Class<T> targetClass, String objectId, Collection<String> selectPropNames)
T
- the generic typetargetClass
- the target classobjectId
- the object idselectPropNames
- the select prop namespublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> get(Class<T> targetClass, org.bson.types.ObjectId objectId, Collection<String> selectPropNames)
T
- the generic typetargetClass
- the target classobjectId
- the object idselectPropNames
- the select prop namespublic com.landawn.abacus.util.ContinuableFuture<org.bson.Document> gett(String objectId)
objectId
- the object idpublic com.landawn.abacus.util.ContinuableFuture<org.bson.Document> gett(org.bson.types.ObjectId objectId)
objectId
- the object idpublic <T> com.landawn.abacus.util.ContinuableFuture<T> gett(Class<T> targetClass, String objectId)
T
- the generic typetargetClass
- the target classobjectId
- the object idpublic <T> com.landawn.abacus.util.ContinuableFuture<T> gett(Class<T> targetClass, org.bson.types.ObjectId objectId)
T
- the generic typetargetClass
- the target classobjectId
- the object idpublic <T> com.landawn.abacus.util.ContinuableFuture<T> gett(Class<T> targetClass, String objectId, Collection<String> selectPropNames)
T
- the generic typetargetClass
- the target classobjectId
- the object idselectPropNames
- the select prop namespublic <T> com.landawn.abacus.util.ContinuableFuture<T> gett(Class<T> targetClass, org.bson.types.ObjectId objectId, Collection<String> selectPropNames)
T
- the generic typetargetClass
- the target classobjectId
- the object idselectPropNames
- the select prop namespublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<org.bson.Document>> findFirst(org.bson.conversions.Bson filter)
filter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> findFirst(Class<T> targetClass, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> findFirst(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> findFirst(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filtersort
- the sortpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> findFirst(Class<T> targetClass, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, org.bson.conversions.Bson projection)
T
- the generic typetargetClass
- the target classfilter
- the filtersort
- the sortprojection
- the projectionpublic com.landawn.abacus.util.ContinuableFuture<List<org.bson.Document>> list(org.bson.conversions.Bson filter)
filter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<List<T>> list(Class<T> targetClass, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<List<T>> list(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<List<T>> list(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, int offset, int count)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filteroffset
- the offsetcount
- the countpublic <T> com.landawn.abacus.util.ContinuableFuture<List<T>> list(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filtersort
- the sortpublic <T> com.landawn.abacus.util.ContinuableFuture<List<T>> list(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, int offset, int count)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filtersort
- the sortoffset
- the offsetcount
- the countpublic <T> com.landawn.abacus.util.ContinuableFuture<List<T>> list(Class<T> targetClass, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, org.bson.conversions.Bson projection)
T
- the generic typetargetClass
- the target classfilter
- the filtersort
- the sortprojection
- the projectionpublic <T> com.landawn.abacus.util.ContinuableFuture<List<T>> list(Class<T> targetClass, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, org.bson.conversions.Bson projection, int offset, int count)
T
- the generic typetargetClass
- the target classfilter
- the filtersort
- the sortprojection
- the projectionoffset
- the offsetcount
- the countpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalBoolean> queryForBoolean(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalChar> queryForChar(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalByte> queryForByte(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalShort> queryForShort(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalInt> queryForInt(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalLong> queryForLong(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalFloat> queryForFloat(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalDouble> queryForDouble(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<String>> queryForString(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<Date>> queryForDate(String propName, org.bson.conversions.Bson filter)
propName
- the prop namefilter
- the filterpublic <T extends Date> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<T>> queryForDate(Class<T> targetClass, String propName, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classpropName
- the prop namefilter
- the filterpublic <V> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<V>> queryForSingleResult(Class<V> targetClass, String propName, org.bson.conversions.Bson filter)
V
- the value typetargetClass
- the target classpropName
- the prop namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(org.bson.conversions.Bson filter)
filter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(Class<T> targetClass, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, int offset, int count)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filteroffset
- the offsetcount
- the countpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filtersort
- the sortpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, int offset, int count)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filtersort
- the sortoffset
- the offsetcount
- the countpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(Class<T> targetClass, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, org.bson.conversions.Bson projection)
T
- the generic typetargetClass
- the target classfilter
- the filtersort
- the sortprojection
- the projectionpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> query(Class<T> targetClass, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, org.bson.conversions.Bson projection, int offset, int count)
T
- the generic typetargetClass
- the target classfilter
- the filtersort
- the sortprojection
- the projectionoffset
- the offsetcount
- the countpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> stream(org.bson.conversions.Bson filter)
filter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> stream(Class<T> targetClass, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> stream(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filterpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> stream(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, int offset, int count)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filteroffset
- the offsetcount
- the countpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> stream(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filtersort
- the sortpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> stream(Class<T> targetClass, Collection<String> selectPropNames, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, int offset, int count)
T
- the generic typetargetClass
- the target classselectPropNames
- the select prop namesfilter
- the filtersort
- the sortoffset
- the offsetcount
- the countpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> stream(Class<T> targetClass, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, org.bson.conversions.Bson projection)
T
- the generic typetargetClass
- the target classfilter
- the filtersort
- the sortprojection
- the projectionpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> stream(Class<T> targetClass, org.bson.conversions.Bson filter, org.bson.conversions.Bson sort, org.bson.conversions.Bson projection, int offset, int count)
T
- the generic typetargetClass
- the target classfilter
- the filtersort
- the sortprojection
- the projectionoffset
- the offsetcount
- the countpublic com.landawn.abacus.util.ContinuableFuture<Void> insert(Object obj)
obj
- the objpublic com.landawn.abacus.util.ContinuableFuture<Void> insert(Object obj, com.mongodb.client.model.InsertOneOptions options)
obj
- the objoptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<Void> insertAll(Collection<?> objList)
objList
- the obj listpublic com.landawn.abacus.util.ContinuableFuture<Void> insertAll(Collection<?> objList, com.mongodb.client.model.InsertManyOptions options)
objList
- the obj listoptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> update(String objectId, Object update)
objectId
- the object idupdate
- the updatepublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> update(org.bson.types.ObjectId objectId, Object update)
objectId
- the object idupdate
- the updatepublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> updateOne(org.bson.conversions.Bson filter, Object update)
filter
- the filterupdate
- the updatepublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> updateOne(org.bson.conversions.Bson filter, Object update, com.mongodb.client.model.UpdateOptions options)
filter
- the filterupdate
- the updateoptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> updateAll(org.bson.conversions.Bson filter, Object update)
filter
- the filterupdate
- the updatepublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> updateAll(org.bson.conversions.Bson filter, Object update, com.mongodb.client.model.UpdateOptions options)
filter
- the filterupdate
- the updateoptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> replace(String objectId, Object replacement)
objectId
- the object idreplacement
- the replacementpublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> replace(org.bson.types.ObjectId objectId, Object replacement)
objectId
- the object idreplacement
- the replacementpublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> replaceOne(org.bson.conversions.Bson filter, Object replacement)
filter
- the filterreplacement
- the replacementpublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.UpdateResult> replaceOne(org.bson.conversions.Bson filter, Object replacement, com.mongodb.client.model.ReplaceOptions options)
filter
- the filterreplacement
- the replacementoptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> delete(String objectId)
objectId
- the object idpublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> delete(org.bson.types.ObjectId objectId)
objectId
- the object idpublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> deleteOne(org.bson.conversions.Bson filter)
filter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> deleteOne(org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
filter
- the filteroptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> deleteAll(org.bson.conversions.Bson filter)
filter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.client.result.DeleteResult> deleteAll(org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
filter
- the filteroptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<Integer> bulkInsert(Collection<?> entities)
entities
- the entitiespublic com.landawn.abacus.util.ContinuableFuture<Integer> bulkInsert(Collection<?> entities, com.mongodb.client.model.BulkWriteOptions options)
entities
- the entitiesoptions
- the optionspublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.bulk.BulkWriteResult> bulkWrite(List<? extends com.mongodb.client.model.WriteModel<? extends org.bson.Document>> requests)
requests
- the requestspublic com.landawn.abacus.util.ContinuableFuture<com.mongodb.bulk.BulkWriteResult> bulkWrite(List<? extends com.mongodb.client.model.WriteModel<? extends org.bson.Document>> requests, com.mongodb.client.model.BulkWriteOptions options)
requests
- the requestsoptions
- the optionspublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> distinct(Class<T> targetClass, String fieldName)
T
- the generic typetargetClass
- the target classfieldName
- the field namepublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> distinct(Class<T> targetClass, String fieldName, org.bson.conversions.Bson filter)
T
- the generic typetargetClass
- the target classfieldName
- the field namefilter
- the filterpublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> aggregate(List<? extends org.bson.conversions.Bson> pipeline)
pipeline
- the pipelinepublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> aggregate(Class<T> targetClass, List<? extends org.bson.conversions.Bson> pipeline)
T
- the generic typetargetClass
- the target classpipeline
- the pipelinepublic com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> mapReduce(String mapFunction, String reduceFunction)
mapFunction
- the map functionreduceFunction
- the reduce functionpublic <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> mapReduce(Class<T> targetClass, String mapFunction, String reduceFunction)
T
- the generic typetargetClass
- the target classmapFunction
- the map functionreduceFunction
- the reduce function@Beta public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> groupBy(String fieldName)
fieldName
- the field name@Beta public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> groupBy(Collection<String> fieldNames)
fieldNames
- the field names@Beta public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> groupByAndCount(String fieldName)
fieldName
- the field name@Beta public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<org.bson.Document>> groupByAndCount(Collection<String> fieldNames)
fieldNames
- the field namesCopyright © 2019. All rights reserved.