Annotation Interface Options


Scope Annotation
Author:
Michael Reiche
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    com.couchbase.client.java.analytics.AnalyticsScanConsistency
    Specifies a custom scan consistency for analytics queries.
    Specifies the scope name
    Specifies a custom array of distinct fields.
    int
    An optional expiry time for the document.
    Same as expiry() but allows the actual value to be set using standard Spring property sources mechanism.
    An optional time unit for the document's expiry(), if set.
    Specifies a custom projection.
    com.couchbase.client.java.query.QueryScanConsistency
    Specifies a custom scan consistency for N1QL queries.
    Specifies the scope name
    long
    An timeout for the operation.
  • Element Details

    • scope

      String scope
      Specifies the scope name
      Returns:
      the scope name configured, defaults to not DEFAULT_SCOPE.
      Default:
      "_default"
    • collection

      String collection
      Specifies the scope name
      Returns:
      the scope name configured, defaults to not DEFAULT_SCOPE.
      Default:
      "_default"
    • query

      com.couchbase.client.java.query.QueryScanConsistency query
      Specifies a custom scan consistency for N1QL queries.
      Returns:
      the scan consistency configured, defaults to not bounded.
      Default:
      NOT_BOUNDED
    • analytics

      com.couchbase.client.java.analytics.AnalyticsScanConsistency analytics
      Specifies a custom scan consistency for analytics queries.
      Returns:
      the scan consistency configured, defaults to not bounded.
      Default:
      NOT_BOUNDED
    • project

      String[] project
      Specifies a custom projection.
      Returns:
      the projection configured, defaults to an empty array (project everything).
      Default:
      {}
    • distinct

      String[] distinct
      Specifies a custom array of distinct fields.
      Returns:
      the projection configured, we need to do something tricky with the default. We need to default to
      no distinct, which is specified by a null array (an empty array means distinct on everything). We'll make an array of a single element "-" mean no distinct.
      Default:
      {"-"}
    • expiry

      int expiry
      An optional expiry time for the document. Default is no expiry. Only one of two might might be set at the same time: either expiry() or expiryExpression()
      Default:
      0
    • expiryExpression

      String expiryExpression
      Same as expiry() but allows the actual value to be set using standard Spring property sources mechanism. Only one might be set at the same time: either expiry() or expiryExpression().
      Syntax is the same as for PropertyResolver.resolveRequiredPlaceholders(String).

      The value will be recalculated for every CouchbaseTemplate save/insert/update call, thus allowing actual expiration to reflect changes on-the-fly as soon as property sources change.

      SpEL is NOT supported.
      Default:
      ""
    • expiryUnit

      TimeUnit expiryUnit
      An optional time unit for the document's expiry(), if set. Default is TimeUnit.SECONDS.
      Default:
      SECONDS
    • timeoutMs

      long timeoutMs
      An timeout for the operation. Default is no timeout.
      Default:
      0L