BEA Systems, Inc.


com.bea.ldi.server.common
Class QueryAttributes

java.lang.Object
  |
  +--com.bea.ldi.server.common.QueryAttributes

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

This class provides place for setting query construction and execution attributes.
The following attributes are currently supported:

See Also:
Serialized Form

Field Summary
static java.lang.String COMPILE_ONLY
          If set to "true" query will only be compiled by the server (without execution)
static java.lang.String GET_LATEST_RESULT
          If set to 'true' the query result cache is bypassed and the result is (re)computed by the query engine.
static java.lang.String GET_PLAN
          Specifies whether query result metadata will contain query execution plan (if set to "true") or not
static java.lang.String LARGE_DATA
          If this attribute is set to true the query will run in "large-data" mode
 
Constructor Summary
QueryAttributes()
          Creates new instance with the default values
QueryAttributes(java.util.Map attributes)
          Internal copying constructor.
QueryAttributes(QueryAttributes queryAttributes)
          Copying constructor.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
           
 java.util.Map getAttributes()
           
 void putAttributes(java.util.Map attributes)
          Ovewrites the attributes of this instance with the values of the valid query attributes specified in the map.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets the value of an attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LARGE_DATA

public static final java.lang.String LARGE_DATA
If this attribute is set to true the query will run in "large-data" mode

GET_PLAN

public static final java.lang.String GET_PLAN
Specifies whether query result metadata will contain query execution plan (if set to "true") or not

COMPILE_ONLY

public static final java.lang.String COMPILE_ONLY
If set to "true" query will only be compiled by the server (without execution)

GET_LATEST_RESULT

public static final java.lang.String GET_LATEST_RESULT
If set to 'true' the query result cache is bypassed and the result is (re)computed by the query engine.
Constructor Detail

QueryAttributes

public QueryAttributes()
Creates new instance with the default values

QueryAttributes

public QueryAttributes(QueryAttributes queryAttributes)
Copying constructor. Allows default attributes to be overwritten by specified queryAttributes

Parameters:
queryAttributes - The query attributes to be used for this instance.

QueryAttributes

public QueryAttributes(java.util.Map attributes)
Internal copying constructor. Allows default attributes to be overriden from specified attributes

Parameters:
attributes - a map containing the new attributes
Method Detail

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Sets the value of an attribute.

Parameters:
name - The attribute name
value - The attribute value
Throws:
java.lang.IllegalArgumentException - if name or value is invalid.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)

Parameters:
name - The attribute name
Returns:
the attribute value.

putAttributes

public void putAttributes(java.util.Map attributes)
Ovewrites the attributes of this instance with the values of the valid query attributes specified in the map.

Parameters:
attributes - The map containing the attributes to be overwritten. If it is null, it is ignored.
Throws:
java.lang.IllegalArgumentException - if a name or value in the map is invalid.

getAttributes

public java.util.Map getAttributes()

Returns:
The query attributes as an unmodifiable map

BEA Systems, Inc.

Documentation is available at
http://download.oracle.com/docs/cd/E13190_01/liquiddata/docs81