com.metamatrix.jdbc.api
Interface Statement

All Superinterfaces:
java.sql.Statement, java.sql.Wrapper

public interface Statement
extends java.sql.Statement

The MetaMatrix-specific interface for executing statements against the MetaMatrix server. This interface provides methods in addition to the standard JDBC methods.


Field Summary
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Method Summary
 void attachStylesheet(java.io.Reader reader)
          Attach a stylesheet to be applied on the server for XML queries executed with this Statement.
 void clearStylesheet()
          Clear any previously attached stylesheet for this Statement object.
 java.util.Collection getAnnotations()
          Get collection of annotations from the query planner from the last command executed on the Statement, if annotations were requested.
 java.lang.String getDebugLog()
          Obtain the query planner debug log from the last command executed on this Statement, if it was requested with OPTION DEBUG.
 java.lang.String getExecutionProperty(java.lang.String name)
          Get the MetaMatrix-specific execution property value.
 PlanNode getPlanDescription()
          Obtain the query plan object representation from the last command executed on this Statement, if a query plan was requested in the command.
 java.lang.String getRequestIdentifier()
          Get ID for last execution which can be used for matching up executions on the client side with executions in the server logs and MetaMatrix console.
 void setExecutionProperty(java.lang.String name, java.lang.String value)
          Set the MetaMatrix-specific execution property value.
 void setPayload(java.io.Serializable payload)
          Set the per-statement security payload.
 
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Method Detail

getExecutionProperty

java.lang.String getExecutionProperty(java.lang.String name)
Get the MetaMatrix-specific execution property value.

Parameters:
name - Execution property name
Returns:
Execution property value or null if not set

setExecutionProperty

void setExecutionProperty(java.lang.String name,
                          java.lang.String value)
Set the MetaMatrix-specific execution property value.

Parameters:
name - Execution property name
value - Execution property value

getPlanDescription

PlanNode getPlanDescription()
Obtain the query plan object representation from the last command executed on this Statement, if a query plan was requested in the command. If no plan was requested, this method will return null.

Returns:
PlanNode representing the root of the query plan

getDebugLog

java.lang.String getDebugLog()
Obtain the query planner debug log from the last command executed on this Statement, if it was requested with OPTION DEBUG. If no debug output was requested, this method will return null.

Returns:
Debug log or null if no log exists

getAnnotations

java.util.Collection getAnnotations()
Get collection of annotations from the query planner from the last command executed on the Statement, if annotations were requested. If no annotation was requested, this method will return null

Returns:
Collection of Annotations

attachStylesheet

void attachStylesheet(java.io.Reader reader)
                      throws java.io.IOException
Attach a stylesheet to be applied on the server for XML queries executed with this Statement.

Parameters:
reader - Reader for reading a stylesheet in XML
Throws:
java.io.IOException - If an error occurs reading the stylesheet

clearStylesheet

void clearStylesheet()
Clear any previously attached stylesheet for this Statement object.


getRequestIdentifier

java.lang.String getRequestIdentifier()
Get ID for last execution which can be used for matching up executions on the client side with executions in the server logs and MetaMatrix console.

Returns:
String identifier for the last execution

setPayload

void setPayload(java.io.Serializable payload)
Set the per-statement security payload. This optional payload will accompany each request to the data source(s) so that the connector will have access to it.
Once the payload is set, it will be used for each statment execution until it is set to null, a new payload is set on the statement or the statement is closed.

To remove an existing payload from a statement, call this method with a null argument.

The execution payload differs from the Trusted Payload in that it is set on the Statement and so may not be constant over the Connection lifecycle and may be changed upon each statement execution. The Execution Payload is not authenticated or validated by the MetaMatrix system.

Given that the Execution Payload is not authenticated by the MetaMatrix system, connector writers are responsible for ensuring its validity. This can possibly be accomplished by comparing it against the Trusted Payload.

Parameters:
payload - The payload that is to accompany requests executed from this statement.
Since:
4.2


Copyright © 2009. All Rights Reserved.