setQueryOptions(concurrency: Integer; resourceLimitType: Integer; resourceLimitValue: Integer);
The setQueryOptions method of the JadeReportWriterReport class sets specific limits in the execution of a query when running the report.
The concurrency parameter values used to lock objects during the query process are listed in the following table.
Class Constant | Value | Concurrency Strategy | Description |
---|---|---|---|
CONCURRENCY_NONE | 1 | Nothing | Does nothing during the query evaluation |
CONCURRENCY_READ_COMMITTED | 3 | Read Committed | Resynchronizes every object that is accessed, but holds on to locks on collections |
CONCURRENCY_READ_OPTIMISTIC | 4 | Repeatable Read Optimistic | Resynchronizes every object that is accessed, locks objects needed later, and checks the edition (the default value) |
CONCURRENCY_READ_PESSIMISTIC | 5 | Repeatable Read Pessimistic | Brackets a read-only transaction to ensure that objects referenced after the start of the query and before the end of the query are the latest editions of the objects (that is, acquires an implicit shared lock on each object as it is referenced) |
The resourceLimitType and resourceLimitValue parameter values, respectively, are listed in the following table.
Class Constant | Value | Resource to Limit | Limit Value (as an Integer) |
---|---|---|---|
RESOURCE_LIMIT_NONE | 0 | No resource limits defined | Not applicable (that is, ignored), which is the default value |
RESOURCE_LIMIT_READS | 1 | Object reads from the database | Maximum number of objects to read |
RESOURCE_LIMIT_RESULTS | 2 | Result objects to add to the query result | Maximum number of result objects to add |
RESOURCE_LIMIT_TIME | 3 | Time that the query runs | Maximum number of milliseconds the report query runs |
RESOURCE_LIMIT_QUERYOPS | 4 | Query operations performed | Maximum number of query operations |
Use the getQueryOptions method to get the locking concurrency and resource limits that are to be applied at the query phase of the report run.