org.pentaho.platform.api.data
Interface IPreparedComponent

All Superinterfaces:
IAuditable, IComponent, org.pentaho.commons.connection.IDisposable, ILogger
All Known Implementing Classes:
HQLBaseComponent, HQLDataComponent, HQLLookupRule, MDXBaseComponent, MDXDataComponent, MDXLookupRule, SQLBaseComponent, SQLDataComponent, SQLDdlComponent, SQLExecute, SQLLookupRule, WebServiceLookupRule, XQueryBaseComponent, XQueryLookupRule

public interface IPreparedComponent
extends IComponent, org.pentaho.commons.connection.IDisposable

The prepared component interface extends component, allowing components to go into a prepared state vs. execute state. These components may place themselves as an output parameter, and then be used later in the action-sequence for execution of prepared statements / etc.

Author:
Will Gorman
See Also:
MDXBaseComponent, SQLBaseComponent, IPentahoResultSet

Field Summary
static String PREPARE_LATER_INTER_PREFIX
          this is an intermediate term used when resolving parameters in the executePrepared call
static String PREPARE_LATER_PLACEHOLDER
          A placeholder for template strings and potential prepared lists, so template fields can be replaced on the fly vs.
static String PREPARE_LATER_PREFIX
          this term may appear when resolving parameters "{PREPARELATER:PARAM_NAME}"
static String PREPARED_COMPONENT_NAME
          The name of the output.
static String PREPARED_OUTPUT_TYPE
          The type of the output.
 
Fields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
 
Method Summary
 void dispose()
          Disposes of resources held by the prepared component
 org.pentaho.commons.connection.IPentahoResultSet executePrepared(Map preparedParams)
          executes a prepared method that returns a result set executePrepared looks up any "PREPARELATER" params in the preparedParams map.
 org.pentaho.commons.connection.IPentahoConnection shareConnection()
          exposes the connection object for others to use.
 
Methods inherited from interface org.pentaho.platform.api.engine.IComponent
done, execute, getActionDefinition, getActionName, getComponentDefinition, getInstanceId, getMessages, getProcessId, getRuntimeContext, getSession, init, setActionDefinition, setActionName, setComponentDefinition, setComponentDefinitionMap, setInstanceId, setMessages, setProcessId, setRuntimeContext, setSession, validate
 
Methods inherited from interface org.pentaho.platform.api.engine.IAuditable
getId, getObjectName
 
Methods inherited from interface org.pentaho.platform.api.engine.ILogger
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn
 

Field Detail

PREPARE_LATER_PREFIX

static final String PREPARE_LATER_PREFIX
this term may appear when resolving parameters "{PREPARELATER:PARAM_NAME}"

See Also:
Constant Field Values

PREPARE_LATER_INTER_PREFIX

static final String PREPARE_LATER_INTER_PREFIX
this is an intermediate term used when resolving parameters in the executePrepared call

See Also:
Constant Field Values

PREPARED_COMPONENT_NAME

static final String PREPARED_COMPONENT_NAME
The name of the output. If this appears as an output of an IPreparedComponent the component should alter its behavior and go into prepared mode.

See Also:
Constant Field Values

PREPARED_OUTPUT_TYPE

static final String PREPARED_OUTPUT_TYPE
The type of the output. If this appears in an output of an IPreparedComponent the component should alter its behavior and go into prepared mode.

See Also:
Constant Field Values

PREPARE_LATER_PLACEHOLDER

static final String PREPARE_LATER_PLACEHOLDER
A placeholder for template strings and potential prepared lists, so template fields can be replaced on the fly vs. during initial setup of a prepared statement

See Also:
Constant Field Values
Method Detail

executePrepared

org.pentaho.commons.connection.IPentahoResultSet executePrepared(Map preparedParams)
executes a prepared method that returns a result set executePrepared looks up any "PREPARELATER" params in the preparedParams map.

Parameters:
preparedParams - a map of possible parameters.
Returns:
result set

shareConnection

org.pentaho.commons.connection.IPentahoConnection shareConnection()
exposes the connection object for others to use. The connection object in a prepared component is not closed until parameters are disposed at the end of an action sequence execution. Note: getConnection was already in use when naming this method.

Returns:
connection object

dispose

void dispose()
Disposes of resources held by the prepared component

Specified by:
dispose in interface org.pentaho.commons.connection.IDisposable