Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/
IntelliJ Plugin
/

Spring Criteria Methods to Generate Insights

When you use the following Spring Criteria method calls in your queries, the MongoDB for IntelliJ Plugin generates insights for your workspace, including insights regarding index warnings, type validation, or database reference validation. If your query contains a combination of methods the IntelliJ Plugin can generate insights from and methods that the IntelliJ Plugin cannot generate insights from, the IntelliJ Plugin does not generate any insights.

Name
Description

MongoTemplate.count()

Returns the number of documents for the given Query querying the given collection.

Maps the results of an ad-hoc query on the collection for the entity class to a List of the specified type.

Query for a list of objects of type T from the collection used by the entity class.

Map the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the specified type.

Execute an aggregation operation. The raw results will be mapped to the given entity class.

Execute an aggregation operation backed by a MongoDB AggregateIterable.

Name
Description

Sets the given cursor position on the Query instance.

Creates a new Query using the given CriteriaDefinition.

Create an independent copy of the given Query. The resulting Query is not a binary equal to the given source but semantically equal in terms of creating the same result when executed.

Static factory method to create a Criteria using the provided key.

Creates a criterion using the $in operator.

Creates a criterion using the $nin operator.

Creates a criterion using the $not meta operator which affects the clause directly following

Creates a criterion using equality.

Name
Description

Creates a new MatchOperation using the given AggregationExpression.

Creates a new ProjectionOperation including all top level fields of the given given Class.

Factory method to create a new SortOperation for the given Sort.

Creates a new GroupOperation for the given Fields.

Obtain a builder instance to create a new AddFieldsOperation. MongoDB adds a new aggregation pipeline stage $set that is an alias for $addFields.

Factory method to create a new UnwindOperation for the field with the given name.

Limits the result to the given number of elements.

Includes the given fields into the projection.

Creates a new Fields instance for Fields with the given names.

Creates a Field with the given name.

Creates a new Fields instance from the given Fields.

Create a sort specification for an ascending sort on the given fields.

Create a sort specification for a descending sort on the given fields.

Combine multiple sort specifications. If any field names are repeated, the last one takes precedence.

  • IntelliJ Insights

Back

Java Driver Methods

On this page