@Tracked(value=TRACE) public class JdbcSqlAdapter extends ObjectAdapterActivity
| Modifier and Type | Class and Description |
|---|---|
static class |
JdbcSqlAdapter.QueryType |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
JDBC_DATASOURCE |
static java.lang.String |
PARAM_VAR |
static java.lang.String |
QUERY_TYPE |
static java.lang.String |
SQL_QUERY |
DO_LOGGING, REQUEST_VARIABLE, RESPONSE_VARIABLE| Constructor and Description |
|---|
JdbcSqlAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeConnection(java.lang.Object connection)
Close a connection opened.
|
protected java.lang.String |
getDataSource()
The JDBC DataSource name.
|
protected java.lang.Object |
getQueryParameters()
The method returns parameter values to use in the query.
|
protected JdbcSqlAdapter.QueryType |
getQueryType() |
protected java.lang.Object |
getRequestData()
Returns the parameterized SQL query to execute.
|
protected java.lang.String |
getSqlQuery() |
java.lang.Object |
invoke(java.lang.Object conn,
java.lang.Object requestData)
Invokes the JDBC Query.
|
protected boolean |
isRetryable(java.lang.Exception ex)
Override to govern retry behavior.
|
boolean |
isSynchronous()
Determine if the adapter itself is synchronous, i.e.
|
protected java.lang.Object |
openConnection()
Returns a db connection based on the configured jdbc url or datasource, which
includes the resource path.
|
directInvoke, doLogging, execute, executePostScript, executePreScript, externalRequestToString, externalResponseFromString, externalResponseToString, getAdapterInvocationErrorMessage, getPostScript, getPostScriptBindings, getPreScript, getPreScriptBindings, getResponse, getStubbedResponse, getStubRequest, getStubResponse, handleAdapterFailure, handleAdapterInvocationError, handleAdapterSuccess, isStubMode, logRequest, logRequest, logResponse, logResponseexecutecloseDatabaseAccess, createDocument, createDocument, createDocument, createDocument, doCompatibilityCodeSubstitutions, evaluateExpression, executeScript, getActivityId, getActivityInstance, getActivityInstanceId, getActivityName, getAsset, getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValueAsVariableName, getAttributeValueSmart, getDocument, getDocumentContent, getDocumentForUpdate, getEngine, getEntryCode, getExternalEventInstanceDetails, getMainProcessDefinition, getMasterRequestId, getOutputDocuments, getPackage, getParameterId, getParameters, getParameterStringValue, getParameterType, getParameterValue, getParameterValue, getParentProcessId, getPerformanceLevel, getProcessDefinition, getProcessId, getProcessInstance, getProcessInstanceId, getProcessInstanceOwner, getProcessInstanceOwnerId, getProperty, getRequiredAttribute, getRequiredVariableValue, getReturnCode, getReturnMessage, getRuntimeContext, getScriptEvaluator, getScriptExecClassName, getScriptExecutor, getValue, getValueSmart, getVariableInstance, getVariableValue, getVariableValueSmart, getWorkTransitionInstanceId, initialize, isDisabled, isLogDebugEnabled, isLogInfoEnabled, isOutputDocument, lockActivityInstance, lockProcessInstance, logdebug, logexception, loginfo, logsevere, logtag, logwarn, openDatabaseAccess, prepare, setOutputDocuments, setParameterValue, setParameterValue, setParameterValueAsDocument, setParameterValues, setProcessInstanceCompletionCode, setReturnCode, setReturnMessage, setValue, setVariableValue, setVariableValue, startTransaction, stopTransaction, translatePlaceHolder, updateDocumentContent, updateDocumentInfo, updateDocumentInfo, valueIsJavaExpression, valueIsVariablepublic static final java.lang.String JDBC_DATASOURCE
public static final java.lang.String QUERY_TYPE
public static final java.lang.String PARAM_VAR
public static final java.lang.String SQL_QUERY
public final boolean isSynchronous()
ObjectAdapterActivityisSynchronous in interface com.centurylink.mdw.activity.types.AdapterActivityisSynchronous in class ObjectAdapterActivityprotected java.lang.Object openConnection()
throws com.centurylink.mdw.connector.adapter.ConnectionException
openConnection in class ObjectAdapterActivitycom.centurylink.mdw.connector.adapter.ConnectionException - retriable connection failureprotected void closeConnection(java.lang.Object connection)
ObjectAdapterActivitycloseConnection in class ObjectAdapterActivityprotected java.lang.String getDataSource()
throws com.centurylink.mdw.config.PropertyException
com.centurylink.mdw.config.PropertyExceptionprotected JdbcSqlAdapter.QueryType getQueryType() throws com.centurylink.mdw.config.PropertyException
com.centurylink.mdw.config.PropertyExceptionprotected java.lang.String getSqlQuery()
throws com.centurylink.mdw.config.PropertyException
com.centurylink.mdw.config.PropertyExceptionpublic java.lang.Object invoke(java.lang.Object conn,
java.lang.Object requestData)
throws com.centurylink.mdw.connector.adapter.AdapterException
invoke in class ObjectAdapterActivitycom.centurylink.mdw.connector.adapter.AdapterException - Adapter exception may or
may not be retriable, which you can set in the
exception itself. Default is not retriable.protected boolean isRetryable(java.lang.Exception ex)
protected java.lang.Object getQueryParameters()
throws com.centurylink.mdw.activity.ActivityException
com.centurylink.mdw.activity.ActivityExceptionprotected java.lang.Object getRequestData()
throws com.centurylink.mdw.activity.ActivityException
getRequestData in class ObjectAdapterActivitycom.centurylink.mdw.activity.ActivityException - when the attribute cannot be
fetched for any reason