Annotation Interface TimeSeries


@Inherited @Retention(RUNTIME) @Target(TYPE) public @interface TimeSeries
Identifies a domain object to be persisted to a MongoDB Time Series collection.
Since:
3.3
Author:
Christoph Strobl
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of the property which contains the date in each time series document.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defines the collation to apply when executing a query or creating indexes.
    The collection the document representing the entity is supposed to be stored in.
    Select the granularity parameter to define how data in the time series collection is organized.
    The name of the field which contains metadata in each time series document.
  • Element Details

    • timeField

      String timeField
      Name of the property which contains the date in each time series document.
      Translation of property names to annotated fieldnames will be considered during the mapping process.
      Returns:
      never null.
    • collection

      The collection the document representing the entity is supposed to be stored in. If not configured, a default collection name will be derived from the type's name. The attribute supports SpEL expressions to dynamically calculate the collection based on a per operation basis.
      Returns:
      the name of the collection to be used.
      See Also:
      Default:
      ""
    • metaField

      String metaField
      The name of the field which contains metadata in each time series document. Should not be the id nor timeField() nor point to an array or Collection.
      Translation of property names to annotated fieldnames will be considered during the mapping process.
      Returns:
      empty String by default.
      Default:
      ""
    • granularity

      Granularity granularity
      Select the granularity parameter to define how data in the time series collection is organized.
      Returns:
      server default by default.
      Default:
      DEFAULT
    • collation

      Defines the collation to apply when executing a query or creating indexes.
      Returns:
      an empty String by default.
      See Also:
      Default:
      ""