com.ibm.openpages.api.trigger.events

## Class QueryEvent

- java.lang.Object
- - com.ibm.openpages.api.trigger.events.AbstractEvent
  - - com.ibm.openpages.api.trigger.events.QueryEvent

-     public class QueryEvent
      extends AbstractEvent

  Represents the event type for GRC API's IQueryService query operations. The available information in this event are the SQL statement to be executed, the starting row index for the row results to be fetched, and the query options: max rows, honor primary, page size and reporting period.

  See Also:
    `TriggerEventType.QUERY_OBJECTS`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryEvent(TriggerEventType triggerEventType, java.lang.String sqlQuery, int startIndex, com.ibm.openpages.service.query.QueryOptions queryOptions, TriggerPositionType position, Context context)` Constructor with query event parameters.
    `QueryEvent(TriggerPositionType position, Context context)` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.ibm.openpages.service.query.QueryOptions` | `getQueryOptions()` Returns the query options for this event.
    `java.lang.String` | `getSqlQuery()` Returns query syntax SQL query for this event as produced by the user.
    `int` | `getStartIndex()` Returns the starting row index for this event.

    - ### Methods inherited from class com.ibm.openpages.api.trigger.events.AbstractEvent

      `getContext, getPosition, getTriggerEventType, hasOuterCreateWithRelationsEvent`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### QueryEvent

          public QueryEvent(TriggerPositionType position,
                            Context context)

      Default constructor.
      Parameters:
        `position` - either pre or post
        `context` - the Context for the API

    - #### QueryEvent

          public QueryEvent(TriggerEventType triggerEventType,
                            java.lang.String sqlQuery,
                            int startIndex,
                            com.ibm.openpages.service.query.QueryOptions queryOptions,
                            TriggerPositionType position,
                            Context context)

      Constructor with query event parameters.
      Parameters:
        `triggerEventType` - QUERY_OBJECTS event type
        `sqlQuery` - SQL query
        `startIndex` - starting row index
        `queryOptions` - query options
        `position` - either pre or post
        `context` - the Context for the API

  - ### Method Detail

    - #### getSqlQuery

          public java.lang.String getSqlQuery()

      Returns query syntax SQL query for this event as produced by the user.
      Returns:
        query syntax SQL

    - #### getStartIndex

          public int getStartIndex()

      Returns the starting row index for this event.
      Returns:
        the starting row index

    - #### getQueryOptions

          public com.ibm.openpages.service.query.QueryOptions getQueryOptions()

      Returns the query options for this event. The options to query provide: max rows, honor primary, page size and reporting period.
      Returns:
        the query options for this event.

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