Class SpatialViewQuery

java.lang.Object
com.couchbase.client.java.view.SpatialViewQuery
All Implemented Interfaces:
Serializable

public class SpatialViewQuery
extends Object
implements Serializable
Fluent DSL for a Spatial View Query.
Since:
2.1.0
Author:
Michael Nitschinger
See Also:
Serialized Form
  • Method Details

    • from

      public static SpatialViewQuery from​(String design, String view)
      Creates an new SpatialViewQuery.
      Parameters:
      design - the name of the design document.
      view - the name of the view.
      Returns:
      a SpatialViewQuery DSL.
    • development

      public SpatialViewQuery development()
    • development

      public SpatialViewQuery development​(boolean development)
    • includeDocs

      public SpatialViewQuery includeDocs()
      Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.
      Returns:
      the SpatialViewQuery DSL.
    • includeDocs

      public SpatialViewQuery includeDocs​(Class<? extends Document<?>> target)
      Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.
      Parameters:
      target - the custom document type target.
      Returns:
      the SpatialViewQuery DSL.
    • includeDocs

      public SpatialViewQuery includeDocs​(boolean includeDocs)
      Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.
      Parameters:
      includeDocs - if it should be enabled or not.
      Returns:
      the SpatialViewQuery DSL.
    • includeDocs

      public SpatialViewQuery includeDocs​(boolean includeDocs, Class<? extends Document<?>> target)
      Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.
      Parameters:
      includeDocs - if it should be enabled or not.
      target - the custom document type target.
      Returns:
      the SpatialViewQuery DSL.
    • limit

      public SpatialViewQuery limit​(int limit)
      Limit the number of the returned documents to the specified number.
      Parameters:
      limit - the number of documents to return.
      Returns:
      the SpatialViewQuery object for proper chaining.
    • skip

      public SpatialViewQuery skip​(int skip)
      Skip this number of records before starting to return the results.
      Parameters:
      skip - The number of records to skip.
      Returns:
      the SpatialViewQuery object for proper chaining.
    • stale

      public SpatialViewQuery stale​(Stale stale)
      Allow the results from a stale view to be used. See the "Stale" enum for more information on the possible options. The default setting is "update_after"!
      Parameters:
      stale - Which stale mode should be used.
      Returns:
      the SpatialViewQuery object for proper chaining.
    • debug

      public SpatialViewQuery debug()
      Enabled debugging on view queries.
      Returns:
      the SpatialViewQuery object for proper chaining.
    • debug

      public SpatialViewQuery debug​(boolean debug)
    • startRange

      public SpatialViewQuery startRange​(JsonArray startRange)
    • endRange

      public SpatialViewQuery endRange​(JsonArray endRange)
    • range

      public SpatialViewQuery range​(JsonArray startRange, JsonArray endRange)
    • onError

      public SpatialViewQuery onError​(OnError onError)
      Sets the response in the event of an error. See the "OnError" enum for more details on the available options.
      Parameters:
      onError - The appropriate error handling type.
      Returns:
      the SpatialViewQuery object for proper chaining.
    • encode

      protected String encode​(String source)
      Helper method to properly encode a string. This method can be overridden if a different encoding logic needs to be used.
      Parameters:
      source - source string.
      Returns:
      encoded target string.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDesign

      public String getDesign()
    • getView

      public String getView()
    • isDevelopment

      public boolean isDevelopment()
    • isIncludeDocs

      public boolean isIncludeDocs()
    • includeDocsTarget

      public Class<? extends Document<?>> includeDocsTarget()
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object