Interface MongoQueryExecutor<E>
- Type Parameters:
- E- The entity type
public interface MongoQueryExecutor<E>
MongoDB specific repository that allows to use direct BSON objects.
- Since:
- 3.3
- Author:
- Denis Stepanov
- 
Method SummaryModifier and TypeMethodDescriptionlongcount(@Nullable org.bson.conversions.Bson filter) Count the records.longdeleteAll(@NonNull org.bson.conversions.Bson filter) Delete the records matching the filter.longdeleteAll(@NonNull org.bson.conversions.Bson filter, @NonNull com.mongodb.client.model.DeleteOptions options) Delete the records matching the filter.findAll(@NonNull MongoFindOptions options) Finds all results.findAll(@NonNull MongoFindOptions options, @NonNull Pageable pageable) Finds a page of records.Finds all results.findAll(@NonNull Iterable<org.bson.conversions.Bson> pipeline, @NonNull MongoAggregationOptions options) Finds all results.findAll(@Nullable org.bson.conversions.Bson filter) Finds all results.Finds a page of records.findOne(@NonNull MongoFindOptions options) Finds one result.Finds a page of records.findOne(@NonNull Iterable<org.bson.conversions.Bson> pipeline, @NonNull MongoAggregationOptions options) Finds one result.findOne(@Nullable org.bson.conversions.Bson filter) Finds one result.longupdateAll(@NonNull org.bson.conversions.Bson filter, @NonNull org.bson.conversions.Bson update) Update the records matching the filter.longupdateAll(@NonNull org.bson.conversions.Bson filter, @NonNull org.bson.conversions.Bson update, @NonNull com.mongodb.client.model.UpdateOptions options) Update the records matching the filter.
- 
Method Details- 
findOneFinds one result.- Parameters:
- filter- The filter to be applied
- Returns:
- The optional result
 
- 
findOneFinds one result.- Parameters:
- options- The options
- Returns:
- The optional result
 
- 
findAllFinds all results.- Parameters:
- filter- The filter to be applied
- Returns:
- The records
 
- 
findAllFinds all results.- Parameters:
- options- The options
- Returns:
- The records
 
- 
findAll@NonNull @NonNull Page<E> findAll(@Nullable @Nullable org.bson.conversions.Bson filter, @NonNull @NonNull Pageable pageable) Finds a page of records.- Parameters:
- filter- The filter
- pageable- The pageable
- Returns:
- The page
 
- 
findAll@NonNull @NonNull Page<E> findAll(@NonNull @NonNull MongoFindOptions options, @NonNull @NonNull Pageable pageable) Finds a page of records.- Parameters:
- options- The options
- pageable- The pageable
- Returns:
- The page
 
- 
findOneFinds a page of records.- Parameters:
- pipeline- The pipeline to be applied
- Returns:
- The optional result
 
- 
findOneOptional<E> findOne(@NonNull @NonNull Iterable<org.bson.conversions.Bson> pipeline, @NonNull @NonNull MongoAggregationOptions options) Finds one result.- Parameters:
- pipeline- The pipeline to be applied
- options- The aggregation options
- Returns:
- The optional result
 
- 
findAllFinds all results.- Parameters:
- pipeline- The pipeline to be applied
- Returns:
- The results
 
- 
findAll@NonNull @NonNull List<E> findAll(@NonNull @NonNull Iterable<org.bson.conversions.Bson> pipeline, @NonNull @NonNull MongoAggregationOptions options) Finds all results.- Parameters:
- pipeline- The pipeline to be applied
- options- The options
- Returns:
- The results
 
- 
countlong count(@Nullable @Nullable org.bson.conversions.Bson filter) Count the records.- Parameters:
- filter- The filter to be applied
- Returns:
- The count
 
- 
deleteAlllong deleteAll(@NonNull @NonNull org.bson.conversions.Bson filter) Delete the records matching the filter.- Parameters:
- filter- The filter to be applied
- Returns:
- The deleted count
 
- 
deleteAlllong deleteAll(@NonNull @NonNull org.bson.conversions.Bson filter, @NonNull @NonNull com.mongodb.client.model.DeleteOptions options) Delete the records matching the filter.- Parameters:
- filter- The filter to be applied
- options- The delete options
- Returns:
- The deleted count
 
- 
updateAlllong updateAll(@NonNull @NonNull org.bson.conversions.Bson filter, @NonNull @NonNull org.bson.conversions.Bson update) Update the records matching the filter.- Parameters:
- filter- The filter to be applied
- update- The update modification
- Returns:
- The updated count
 
- 
updateAlllong updateAll(@NonNull @NonNull org.bson.conversions.Bson filter, @NonNull @NonNull org.bson.conversions.Bson update, @NonNull @NonNull com.mongodb.client.model.UpdateOptions options) Update the records matching the filter.- Parameters:
- filter- The filter to be applied
- update- The update modification
- options- The update options
- Returns:
- The updated count
 
 
-