com.bea.ld
Class QueryAttributes

java.lang.Object
  extended bycom.bea.ld.QueryAttributes
All Implemented Interfaces:
java.io.Serializable

public final class QueryAttributes
extends java.lang.Object
implements java.io.Serializable

NOTE: This class should not be considered part of the mediator API any longer. It remains in the documentation for backwards compatibility reasons; however, new code (which utilitizes the com.bea.dsp.dsmediator.client package) should not use it. Refer to RequestConfig instead.

Collection of attributes which control how a query is to be invoked.

There are two kinds of attributes - normal and feature flags.

It is important to use the correct methods for the attribute you want to modify. In particular, do not use disableFeature() to "turn off" a string-valued normal attribute; set it to null instead.

See Also:
Serialized Form

Field Summary
static java.lang.String COMPILE_ONLY
          Feature flag requesting query processor only compile the query, not execute it.
static java.lang.String DO_NOT_CACHE_QUERY_PLAN
          Feature flag requesting query processor not to cache compiled execution plan
static java.lang.String FORCE_COMPILE
          Feature flag requesting query processor recompile query, instead of using any previously-cached version.
static java.lang.String GET_CURRENT_DATA
          Feature flag requesting that cached content should be ignored, data computed and cached entries used in the current query refreshed
static java.lang.String REFRESH_CACHE_EARLY
          Integer attribute requesting that a cached data record must be valid for at least the specified number of seconds.
static java.lang.String RETURN_AUDIT_PROPERTIES
          String[] list of audit properties that would be enabled and returned if allowed.
static java.lang.String RETURN_DATA_SERVICE_AUDIT
          Feature flag requesting query processor to return all returnable audit properties collected.
static java.lang.String TIMEOUT
          Integer attribute specifying maximum time the query engine should allow for this request to complete (in milliseconds).
 
Constructor Summary
QueryAttributes()
           
 
Method Summary
 void disableFeature(java.lang.String featureName)
          Disable a specified feature flag for this query execution.
 void enableFeature(java.lang.String featureName)
          Enable a specified feature flag for this query execution.
 boolean featureEnabled(java.lang.String featureName)
          Inquire whether a particular feature is enabled or not for this query execution.
 java.lang.String getAttribute(java.lang.String attributeName)
          Retrieve a String-valued attribute.
 int getIntegerAttribute(java.lang.String attributeName)
          Retrieve an int-valued attribute.
 java.lang.String[] getStringArrayAttribute(java.lang.String attributeName)
          Retrieve a String array-valued attribute.
 void setAttribute(java.lang.String attributeName, java.lang.String attributeValue)
          Provide a String value for an attribute for this query execution.
 void setIntegerAttribute(java.lang.String attributeName, int value)
          Provide an integer value for an attribute for this query execution.
 void setStringArrayAttribute(java.lang.String attributeName, java.lang.String[] attributeValue)
          Provide a String array value for an attribute for this query execution.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPILE_ONLY

public static final java.lang.String COMPILE_ONLY
Feature flag requesting query processor only compile the query, not execute it.

See Also:
Constant Field Values

FORCE_COMPILE

public static final java.lang.String FORCE_COMPILE
Feature flag requesting query processor recompile query, instead of using any previously-cached version.

See Also:
Constant Field Values

DO_NOT_CACHE_QUERY_PLAN

public static final java.lang.String DO_NOT_CACHE_QUERY_PLAN
Feature flag requesting query processor not to cache compiled execution plan

See Also:
Constant Field Values

RETURN_AUDIT_PROPERTIES

public static final java.lang.String RETURN_AUDIT_PROPERTIES
String[] list of audit properties that would be enabled and returned if allowed.

See Also:
Constant Field Values

RETURN_DATA_SERVICE_AUDIT

public static final java.lang.String RETURN_DATA_SERVICE_AUDIT
Feature flag requesting query processor to return all returnable audit properties collected.

See Also:
Constant Field Values

GET_CURRENT_DATA

public static final java.lang.String GET_CURRENT_DATA
Feature flag requesting that cached content should be ignored, data computed and cached entries used in the current query refreshed

See Also:
Constant Field Values

REFRESH_CACHE_EARLY

public static final java.lang.String REFRESH_CACHE_EARLY
Integer attribute requesting that a cached data record must be valid for at least the specified number of seconds. This effectively shortens TTL specified for that chached value.

See Also:
Constant Field Values

TIMEOUT

public static final java.lang.String TIMEOUT
Integer attribute specifying maximum time the query engine should allow for this request to complete (in milliseconds). After this time has elapsed, the query will be terminated, much as it can be via the DSP administration console's Monitoring tab.

Note: If the request is participating in an EJB transaction, then the EJB's transaction timeout (trans-timeout-seconds in the deployment descriptor) may override this timeout if the EJB's timeout is smaller.

See Also:
Constant Field Values
Constructor Detail

QueryAttributes

public QueryAttributes()
Method Detail

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.String attributeValue)
Provide a String value for an attribute for this query execution.


setStringArrayAttribute

public void setStringArrayAttribute(java.lang.String attributeName,
                                    java.lang.String[] attributeValue)
Provide a String array value for an attribute for this query execution.


setIntegerAttribute

public void setIntegerAttribute(java.lang.String attributeName,
                                int value)
Provide an integer value for an attribute for this query execution.


enableFeature

public void enableFeature(java.lang.String featureName)
Enable a specified feature flag for this query execution.


disableFeature

public void disableFeature(java.lang.String featureName)
Disable a specified feature flag for this query execution. (All features are disabled by default until enabled by calling enableFeature().)


featureEnabled

public boolean featureEnabled(java.lang.String featureName)
Inquire whether a particular feature is enabled or not for this query execution.


getAttribute

public java.lang.String getAttribute(java.lang.String attributeName)
Retrieve a String-valued attribute. Will return null if attribute unset.


getStringArrayAttribute

public java.lang.String[] getStringArrayAttribute(java.lang.String attributeName)
Retrieve a String array-valued attribute. Will return null if attribute unset.


getIntegerAttribute

public int getIntegerAttribute(java.lang.String attributeName)
Retrieve an int-valued attribute. Will return 0 if attribute unset.



Copyright © 2006 BEA Systems Inc. All Rights Reserved.