com.worklight.jsonstore.api

Class JSONStoreFindOptions

  • java.lang.Object
    • com.worklight.jsonstore.api.JSONStoreFindOptions


  • public final class JSONStoreFindOptions
    extends java.lang.Object
    Options that are used to modify the find operation in JSONStoreCollection.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addSearchFilter(java.lang.String new_filter)
      Add a search filter to the existing list of search fields.
      java.lang.Integer getLimit()
      Get the maximum number of results as configured.
      java.lang.Integer getOffset()
      Get the offset index of the results as configured.
      void includeDeletedDocuments(boolean include)
      Modify the flag to include deleted documents or to not include deleted documents.
      void setLimit(java.lang.Integer limit)
      Specify the maximum number of results to be returned.
      void setOffset(java.lang.Integer offset)
      Set the offset of which results will begin.
      void setSearchFilters(java.util.List filters)
      Set the search fields to be returned on the results of the find operation.
      boolean shouldIncludeDeletedDocuments()
      Retrieve the flag that determines if the result should include deleted documents or not include deleted documents.
      void sortBySearchFieldAscending(java.lang.String search_field)
      Add a new search field by which the results will be sorted.
      void sortBySearchFieldDescending(java.lang.String search_field)
      Add a new search field by which the results will be sorted.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JSONStoreFindOptions

        public JSONStoreFindOptions()
    • Method Detail

      • setLimit

        public void setLimit(java.lang.Integer limit)
        Specify the maximum number of results to be returned.
        Parameters:
        limit -
      • getLimit

        public java.lang.Integer getLimit()
        Get the maximum number of results as configured.
        Returns:
        The configured maximum number of results that are returned.
      • setOffset

        public void setOffset(java.lang.Integer offset)
        Set the offset of which results will begin.
        Parameters:
        offset - The index at where the documents returned will begin.
      • getOffset

        public java.lang.Integer getOffset()
        Get the offset index of the results as configured.
        Returns:
        The index at where the documents returned will begin.
      • sortBySearchFieldAscending

        public void sortBySearchFieldAscending(java.lang.String search_field)
        Add a new search field by which the results will be sorted. The search field will sort the results in a ascending manner against the search field. Note that it will be sorted in the order that they were added. For example, if you add searchField1 and then searchField2, it will sort according to searchField1, and then any ties will be sorted according to searchField2.
        Parameters:
        search_field - The search field that is used for a ascending sort.
      • sortBySearchFieldDescending

        public void sortBySearchFieldDescending(java.lang.String search_field)
        Add a new search field by which the results will be sorted. The search field will sort the results in a descending manner against the search field. Please note that it will be sorted in the order that they were added. For example, if you add searchField1 and then searchField2, it will sort according to searchField1, and then any ties will be sorted according to searchField2.
        Parameters:
        search_field - The search field that is used for a descending sort.
      • setSearchFilters

        public void setSearchFilters(java.util.List filters)
        Set the search fields to be returned on the results of the find operation.
        Parameters:
        filters - array of Strings with the names of the search fields or additional search fields that will be returned.
      • addSearchFilter

        public void addSearchFilter(java.lang.String new_filter)
        Add a search filter to the existing list of search fields.
        Parameters:
        new_filter - Add a new search field that must be included in the find results.
      • includeDeletedDocuments

        public void includeDeletedDocuments(boolean include)
        Modify the flag to include deleted documents or to not include deleted documents.
        Parameters:
        include - When true, documents marked 'deleted' will be included in the find.
      • shouldIncludeDeletedDocuments

        public boolean shouldIncludeDeletedDocuments()
        Retrieve the flag that determines if the result should include deleted documents or not include deleted documents.
        Returns:
        True if configured to include documents marked 'deleted' in the find.


© Copyright IBM Corp. 2006, 2015. All Rights Reserved.