com.ibm.openpages.api.query

Interface IQuery



  • public interface IQuery
    An object that represents a query to execute. To execute the query and retrieve the results, call fetchRows(). Use the provided setter methods on this interface to set optional parameters for the query including: the Reporting Period, the maximum rows to return, the page size for paging, whether to honor primary associations, and whether to compare strings using case insensitivity.
    • Method Detail

      • getMaxRows

        int getMaxRows()
        Specifies the maximum number of rows to return as part of the ITabularResultSet. A value of zero means that all rows that match the query will be returned.
        Returns:
        the maximum number of rows to return as part of the ITabularResultSet. A value of zero means that all rows that match the query will be returned.
      • setMaxRows

        void setMaxRows(int maxRows)
        Sets the maximum number of rows to return as part of the ITabularResultSet. A value of zero means that all rows that match the query will be returned.
        Parameters:
        maxRows - the maximum number of rows to return as part of the ITabularResultSet. A value of zero means that all rows that match the query will be returned.
      • getPageSize

        int getPageSize()
        Returns the page size. The default value is 50. A value of zero means that there is no pagination.
        Returns:
        the page size value
      • setHonorPrimary

        void setHonorPrimary(boolean honorPrimary)
        Specifies whether primary associations are honored. If primary associations are honored, then joins will only use primary associations for parents or children; not secondary associations.
        Parameters:
        honorPrimary - set to true to honor primary associations; otherwise, set to false
      • getHonorPrimary

        boolean getHonorPrimary()
        Returns true to honor primary association; otherwise, false is returned.
        Returns:
        true if primary association is honored; otherwise, false is returned.
      • setPageSize

        void setPageSize(int pageSize)
        Sets the page size to use for the result set.
        Parameters:
        pageSize - the page size. A page size of 0 means all results.
      • fetchRows

        ITabularResultSet fetchRows(int skipCount)
        Retrieves the results in a tabular format.
        Parameters:
        skipCount - the number of records to skip. Use the value zero to start at beginning of the result set.
        Returns:
        the tabular result set at the skip count position.
      • bindParameter

        void bindParameter(int parameterIndex,
                           ParameterValue value)
        Binds input parameters to query. This requires that the statement use the ? for input parameters in the WHERE clause.
        Parameters:
        parameterIndex - the index of the parameter. This value starts at 1.
        value - the input parameter value to bind with the statement.
      • setCaseInsensitive

        void setCaseInsensitive(boolean caseInsensitive)
        Specifies whether Query is applying case insensitive or case sensitive comparisons. Case Insensitive affects all the IN and basic comparison operators (=,<>,etc.) for String data type, LIKE operator for String and Long String data types. Note that the CONTAINS() function operator for Long String data types is always case insensitive. Default for caseInsensitive is false.
        Parameters:
        caseInsensitive - set to true to perform case insensitive comparison; otherwise, set to false
      • getCaseInsensitive

        boolean getCaseInsensitive()
        Returns true when case insensitive comparison is done; otherwise, false is returned. Case Insensitive affects all the IN and basic comparison operators (=,<>,etc.) for String data type, LIKE operator for String and Long String data types. Note that the CONTAINS() function operator for Long String data types is always case insensitive. Default for caseInsensitive is false.
        Returns:
        true if case insensitive comparison is done; otherwise, false is returned.

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2019. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.