Annotation Interface ViewIndexed


@Target(TYPE) @Retention(RUNTIME) @Deprecated public @interface ViewIndexed
Deprecated.
This annotation is targeted at Repository interfaces, indicating that the framework should ensure a View is present when the repository is instantiated.

The view must at least be described as a design document name and view name. Default map function will filter documents on the type associated to the repository, and default reduce function is "_count".

One can specify a custom reduce function as well as a non-default map function.

Author:
Simon Baslé
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Deprecated.
    The design document in which to create/look for the view.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Deprecated.
    The map function to use (default is empty, which will trigger a default map function filtering on the repository's associated entity type).
    Deprecated.
    The reduce function to use (default is built in "_count" reduce function).
    Deprecated.
    The name of the view, defaults to "all" (which is what CRUD methods expect by default).
  • Element Details

    • designDoc

      String designDoc
      Deprecated.
      The design document in which to create/look for the view. Usually to create the backing view for CRUD methods, the expected designDoc value is the entity's simple class name, with a lowercase first letter (eg. a UserInfo repository would expect a design document named "userInfo").
    • viewName

      String viewName
      Deprecated.
      The name of the view, defaults to "all" (which is what CRUD methods expect by default).
      Default:
      "all"
    • mapFunction

      String mapFunction
      Deprecated.
      The map function to use (default is empty, which will trigger a default map function filtering on the repository's associated entity type).
      Default:
      ""
    • reduceFunction

      String reduceFunction
      Deprecated.
      The reduce function to use (default is built in "_count" reduce function).
      Default:
      "_count"