Annotation Interface MongoUpdateReturningQuery


@Retention(RUNTIME) @Target(METHOD) @Documented public @interface MongoUpdateReturningQuery
Defines a custom MongoDB single-document update query that returns a document result.

This annotation marks the method as an update-returning operation and supports projection and returned-document state selection.

Since:
5.0.0
Author:
radovanradic
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The custom MongoDB update document.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The array filters.
    The custom collation represented in JSON.
    The custom MongoDB filter.
    The custom fields projection represented in JSON.
    com.mongodb.client.model.ReturnDocument
    Controls whether MongoDB returns the document state before or after the update.
    The custom sort represented in JSON.
  • Element Details

    • update

      String update
      The custom MongoDB update document.
      Returns:
      The update JSON
    • filter

      @AliasFor(member="value", annotation=MongoFilter.class) String filter
      The custom MongoDB filter.
      Returns:
      The filter JSON
      Default:
      ""
    • collation

      @AliasFor(member="value", annotation=MongoCollation.class) String collation
      The custom collation represented in JSON.
      Returns:
      The collation JSON
      Default:
      ""
    • project

      @AliasFor(member="value", annotation=MongoProjection.class) String project
      The custom fields projection represented in JSON.
      Returns:
      The projection JSON
      Default:
      ""
    • sort

      @AliasFor(member="value", annotation=MongoSort.class) String sort
      The custom sort represented in JSON.
      Returns:
      The sort JSON
      Default:
      ""
    • arrayFilters

      @AliasFor(member="arrayFilters", annotation=MongoUpdateOptions.class) String[] arrayFilters
      The array filters.
      Returns:
      The array filters
      Default:
      {}
    • returnDocument

      com.mongodb.client.model.ReturnDocument returnDocument
      Controls whether MongoDB returns the document state before or after the update.
      Returns:
      The requested returned document state
      Default:
      BEFORE