| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.platform.engine.core.system.PentahoBase
org.pentaho.platform.engine.services.PentahoMessenger
org.pentaho.platform.engine.services.solution.ComponentBase
org.pentaho.platform.plugin.action.sql.SQLBaseComponent
public abstract class SQLBaseComponent
SQLBaseComponent is the base class for SQLExecute and SQLLookupRule. it does the majority of work when interacting with Pentaho's BI Platform, including implementing the necessary component features. It also implements IDataComponent and IPreparedComponent.
SQLExecute, 
SQLLookupRule, 
Serialized Form| Field Summary | |
|---|---|
static String | 
PREPARE_PARAMETER_PREFIX
 | 
| Fields inherited from class org.pentaho.platform.engine.services.solution.ComponentBase | 
|---|
COMPONENT_EXECUTE_FAIL, MISSING_SESSION | 
| Fields inherited from class org.pentaho.platform.engine.core.system.PentahoBase | 
|---|
EMPTYLOGID, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR | 
| Fields inherited from interface org.pentaho.platform.api.data.IPreparedComponent | 
|---|
PREPARE_LATER_INTER_PREFIX, PREPARE_LATER_PLACEHOLDER, PREPARE_LATER_PREFIX, PREPARED_COMPONENT_NAME, PREPARED_OUTPUT_TYPE | 
| 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 | 
| Constructor Summary | |
|---|---|
SQLBaseComponent()
 | 
|
| Method Summary | |
|---|---|
 void | 
dispose()
dispose of the resultset, and if the owner, dispose of the connection.  | 
 void | 
done()
nothing to do in done call from runtime context.  | 
 org.pentaho.commons.connection.IPentahoResultSet | 
doQuery(SQLConnection sqlConnection,
        String query,
        boolean forwardOnlyResultset)
 | 
 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 | 
getDatasourceConnection()
attempt to aquire a connection.  | 
abstract  org.apache.commons.logging.Log | 
getLogger()
 | 
 int | 
getMaxRows()
 | 
 String | 
getQuery()
 | 
 int | 
getQueryTimeout()
 | 
 boolean | 
getReadOnly()
 | 
abstract  String | 
getResultOutputName()
 | 
 org.pentaho.commons.connection.IPentahoResultSet | 
getResultSet()
returns the result set object  | 
 boolean | 
init()
nothing is done in the init function  | 
 int | 
resolveParameter(String template,
                 String parameter,
                 Matcher parameterMatcher,
                 int copyStart,
                 StringBuffer results)
This method is called when TemplateUtil.applyTemplate() encounters a parameter.  | 
 void | 
setMaxRows(int value)
 | 
 void | 
setQueryTimeout(int timeInSec)
 | 
 void | 
setReadOnly(boolean value)
 | 
 org.pentaho.commons.connection.IPentahoConnection | 
shareConnection()
return this class's connection.  | 
 boolean | 
validateAction()
validates the action.  | 
abstract  boolean | 
validateSystemSettings()
 | 
| Methods inherited from class org.pentaho.platform.engine.services.solution.ComponentBase | 
|---|
createFeedbackParameter, createFeedbackParameter, createNewInstance, execute, getActionDefinition, getActionName, getActionTitle, getComponentDefinition, getComponentDefinition, getId, getInitFailMessage, getInitOk, getInstanceId, getLogId, getObjectName, getProcessId, getResourceAsString, getRuntimeContext, getSession, inputMissingError, outputMissingError, promptNeeded, promptNow, resourceComponentSettingError, resourceMissingError, setActionDefinition, setActionName, setComponentDefinition, setComponentDefinitionMap, setInstanceId, setProcessId, setRuntimeContext, setSession, validate | 
| Methods inherited from class org.pentaho.platform.engine.services.PentahoMessenger | 
|---|
debug, debug, error, error, error, fatal, fatal, getMessages, getUserString, info, info, setMessages, trace, trace, warn, warn | 
| Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase | 
|---|
genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, setLoggingLevel, setLogId | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.pentaho.platform.api.engine.IComponent | 
|---|
execute, getActionDefinition, getActionName, getComponentDefinition, getInstanceId, getMessages, getProcessId, getRuntimeContext, getSession, 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 | 
|---|
public static final String PREPARE_PARAMETER_PREFIX
| Constructor Detail | 
|---|
public SQLBaseComponent()
| Method Detail | 
|---|
public abstract boolean validateSystemSettings()
public abstract String getResultOutputName()
public abstract org.apache.commons.logging.Log getLogger()
getLogger in class PentahoBasepublic org.pentaho.commons.connection.IPentahoResultSet getResultSet()
getResultSet in interface IDataComponentpublic boolean validateAction()
public void done()
done in interface IComponentdone in class ComponentBasepublic org.pentaho.commons.connection.IPentahoResultSet executePrepared(Map preparedParams)
executePrepared in interface IPreparedComponentpreparedParams - a map of possible parameters.
public org.pentaho.commons.connection.IPentahoResultSet doQuery(SQLConnection sqlConnection,
                                                                String query,
                                                                boolean forwardOnlyResultset)
                                                         throws Exception
Exceptionpublic void dispose()
dispose in interface org.pentaho.commons.connection.IDisposabledispose in interface IDataComponentdispose in interface IPreparedComponent
public int resolveParameter(String template,
                            String parameter,
                            Matcher parameterMatcher,
                            int copyStart,
                            StringBuffer results)
resolveParameter in interface IParameterResolverresolveParameter in class ComponentBasetemplate - the source stringparameter - the parameter valueparameterMatcher - the regex parameter matchercopyStart - the start of the copyresults - the output result
public org.pentaho.commons.connection.IPentahoConnection getDatasourceConnection()
public org.pentaho.commons.connection.IPentahoConnection shareConnection()
shareConnection in interface IPreparedComponentpublic boolean init()
init in interface IComponentinit in class ComponentBasepublic int getQueryTimeout()
public void setQueryTimeout(int timeInSec)
public int getMaxRows()
public void setMaxRows(int value)
public String getQuery()
public void setReadOnly(boolean value)
public boolean getReadOnly()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||