Class BaseQuery

java.lang.Object
com.microsoft.store.partnercenter.models.query.BaseQuery
All Implemented Interfaces:
IQuery
Direct Known Subclasses:
CountQuery, SimpleQuery

public abstract class BaseQuery
extends Object
implements IQuery
The base class which all queries should derive from. This class does not support any query capabilities except for the token by default. Therefore, implementation classes will pick and choose what to support.
  • Constructor Details

    • BaseQuery

      protected BaseQuery()
      Initializes a new instance of the BaseQuery class.
    • BaseQuery

      protected BaseQuery​(Object token)
      Initializes a new instance of the BaseQuery class.
      Parameters:
      token - The query token.
  • Method Details

    • getType

      public QueryType getType()
      Gets the query type.
      Specified by:
      getType in interface IQuery
      Returns:
      The query type.
    • getFilter

      public FieldFilter getFilter()
      Gets or sets the query filter.
      Specified by:
      getFilter in interface IQuery
      Returns:
      The query filter.
    • setFilter

      public void setFilter​(FieldFilter value)
      Description copied from interface: IQuery
      The query filter.
      Specified by:
      setFilter in interface IQuery
      Parameters:
      value - The query filter.
    • getSort

      public Sort getSort()
      Gets or sets the query sorting options.
      Specified by:
      getSort in interface IQuery
      Returns:
      The query sorting options.
    • setSort

      public void setSort​(Sort value)
      Description copied from interface: IQuery
      Sets the query sorting options.
      Specified by:
      setSort in interface IQuery
      Parameters:
      value - The query sorting options.
    • getIndex

      public int getIndex()
      Gets or sets the result starting index.
      Specified by:
      getIndex in interface IQuery
      Returns:
      The result starting index.
    • setIndex

      public void setIndex​(int value)
      Description copied from interface: IQuery
      Sets the result starting index.
      Specified by:
      setIndex in interface IQuery
      Parameters:
      value - The result starting index.
    • getPageSize

      public int getPageSize()
      Gets or sets the results page size.
      Specified by:
      getPageSize in interface IQuery
      Returns:
      The result page size.
    • setPageSize

      public void setPageSize​(int value)
      Description copied from interface: IQuery
      Sets the results page size.
      Specified by:
      setPageSize in interface IQuery
      Parameters:
      value - The results page size.
    • getToken

      public Object getToken()
      Description copied from interface: IQuery
      Gets the query token. The token may hold context used to represent current state with back end services.
      Specified by:
      getToken in interface IQuery
      Returns:
      The query token.
    • setToken

      public void setToken​(Object value)
      Description copied from interface: IQuery
      Sets the query token.
      Specified by:
      setToken in interface IQuery
      Parameters:
      value - The query token.
    • getSeekOperation

      public SeekOperation getSeekOperation()
      Gets or sets the seek operation that needs to be performed.
      Specified by:
      getSeekOperation in interface IQuery
      Returns:
      The seek operation that needs to be performed.
    • setSeekOperation

      public void setSeekOperation​(SeekOperation value)
      Description copied from interface: IQuery
      Sets the seek operation that needs to be performed.
      Specified by:
      setSeekOperation in interface IQuery
      Parameters:
      value - The seek operation that needs to be performed.