Interface XPathBasicQuery

All Superinterfaces:
XPathQueryBase
All Known Subinterfaces:
XPathQuery

public interface XPathBasicQuery extends XPathQueryBase
Provides an interface to basic XPath queries.

Basic XPath queries are queries where the offset, amount, depth and sorting parameters are set directly on the interface as opposed to using the IRetrievalSchema interface with XPathSchemaQuery.

  • Method Details

    • setAmount

      XPathBasicQuery setAmount(int amount)
      Sets the maximum number of objects (=page size) to retrieve. If not set, the default is -1, which means that the amount is unlimited.
      Parameters:
      amount - the maximum number of objects
      Returns:
      the updated query instance
    • setOffset

      XPathBasicQuery setOffset(int offset)
      Sets the paging offset for object retrieval. If not set, the default is -1, which means that no offset is applied.
      Parameters:
      offset - the index of the first object to retrieve
      Returns:
      the updated query instance
    • addSort

      XPathBasicQuery addSort(String attribute, boolean ascending)
      Adds a sort direction. This affects the sort of the objects that are retrieved. When multiple sorts are added each subsequent sort objects that are equal according to the earlier values
      Parameters:
      attribute - the attribute on which should be sorted
      ascending - the direction of the sort. If this value is true it sorts from the smallest value to the largest. If it is false it sorts from the largest value to the smallest.
      Returns:
      the updated query instance
    • setDepth

      XPathBasicQuery setDepth(int depth)
      Sets the retrieval depth of this query. It determines until which level IMendixIdentifiers are resolved to IMendixObjects. If not set, the default is 0, which means that ids of associated objects are retrieved, but not the associated objects themselves.
      Parameters:
      depth - the retrieval depth
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, BigDecimal value)
      Sets a variable with a value of type BigDecimal

      Adds a BigDecimal variable In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      value - variable that represents a literal BigDecimal value
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, boolean value)
      Sets a variable with a value of type Boolean

      In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      value - variable that represents a literal Boolean value
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, double value)
      Sets a variable with a value of type Double

      In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      value - variable that represents a literal Double value
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, int value)
      Sets a variable with a value of type Integer

      In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      value - variable that represents a literal Integer value
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, long value)
      Sets a variable with a value of type Long

      In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      value - variable that represents a literal Long value
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, IMendixObject object)
      Sets a variable with a value of type IMendixObject

      In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      object - variable that represents a IMendixObject value. Will be replaced by it's identifier in the query
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, IMendixIdentifier identifier)
      Sets a variable with a value of type IMendixIdentifier

      In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      identifier - variable that represents an identifier of an object
      Returns:
      the updated query instance
    • setVariable

      XPathBasicQuery setVariable(String name, String value)
      Sets a variable with a value of type String

      In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.

      Specified by:
      setVariable in interface XPathQueryBase
      Parameters:
      name - name of variables referenced in the expression (without '$') and their values
      value - variable that represents a literal String value
      Returns:
      the updated query instance