public class QueryProcessor
extends com.labvantage.sapphire.BaseAccessor
| Constructor and Description |
|---|
QueryProcessor(java.io.File rakFile,
java.lang.String connectionid)
Constructor for a client application with an existing connection
|
QueryProcessor(javax.servlet.jsp.PageContext pageContext)
Constructor for a client web application with a page Context and existing connectionid
|
QueryProcessor(java.lang.String connectionid)
Constructor for creating an accessor from components
|
QueryProcessor(java.lang.String nameserverlist,
java.lang.String connectionid)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
execPreparedUpdate(java.lang.String sql,
java.lang.Object[] bindvars)
Utility method for passing a prepared SQL along with bind variables to be executed against the database by the application server.
|
int |
execSQL(int sqlCode) |
int |
execSQL(int sqlCode,
java.lang.Object[] bindVars) |
int |
execSQL(java.lang.String sql)
Utility method for passing SQL to be executed against the database by the application server.
|
int |
getCount(java.lang.String sql)
Executes the sql the should return a single row with a single number value.
|
java.lang.String |
getKeyid1List(java.lang.String sdcid,
java.lang.String queryid)
Executes the supplied Sapphire query and returns the list of sdi(s).
|
java.lang.String |
getKeyid1List(java.lang.String sdcid,
java.lang.String queryid,
java.lang.String[] params)
Executes the supplied Sapphire query and returns the list of sdi(s).
|
java.lang.String |
getKeyid1List(java.lang.String sdcid,
java.lang.String queryid,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3,
java.lang.String param4,
java.lang.String param5)
Executes the supplied Sapphire query and returns the list of sdi(s).
|
int |
getPreparedCount(java.lang.String sql,
java.lang.Object[] params)
Executes the sql with bind variables the should return a single row with a single number value.
|
DataSet |
getPreparedSqlDataSet(int sqlCode,
java.lang.Object[] params)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getPreparedSqlDataSet(int sqlCode,
java.lang.Object[] params,
boolean extendedDataTypes)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getPreparedSqlDataSet(java.lang.String sql,
java.lang.Object[] params)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getPreparedSqlDataSet(java.lang.String sql,
java.lang.Object[] params,
boolean extendedDataTypes)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getPreparedSqlDataSet(java.lang.String name,
java.lang.String sql,
java.lang.Object[] params)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getPreparedSqlDataSet(java.lang.String name,
java.lang.String sql,
java.lang.Object[] params,
boolean extendedDataTypes)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getPreparedSqlDataSet(java.lang.String name,
java.lang.String sql,
java.lang.Object[] params,
boolean extendedDataTypes,
int queryTimeout)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getRefTypeDataSet(java.lang.String reftypeid)
Returns a dataset that contains the details of the reference values for the supplied ReferenceType.
|
java.lang.String |
getSecurityFilterWhere(java.lang.String sdcid) |
DataSet |
getSqlDataSet(int sqlCode)
Returns a sapphire.util.DataSet that reflects the resultset for the given sqlcode
|
DataSet |
getSqlDataSet(int sqlCode,
boolean extendedDataTypes)
Returns a sapphire.util.DataSet that reflects the resultset for the given sqlcode
|
DataSet |
getSqlDataSet(int sqlCode,
java.lang.Object[] bindVars)
Returns a sapphire.util.DataSet that reflects the resultset for the given sqlcode
|
DataSet |
getSqlDataSet(int sqlCode,
java.lang.Object[] bindVars,
boolean extendedDataTypes)
Returns a sapphire.util.DataSet that reflects the resultset for the given sqlcode
|
DataSet |
getSqlDataSet(java.lang.String sql)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getSqlDataSet(java.lang.String sql,
boolean extendedDataTypes)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getSqlDataSet(java.lang.String name,
java.lang.String sql)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getSqlDataSet(java.lang.String name,
java.lang.String sql,
boolean extendedDataTypes)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getSqlDataSet(java.lang.String name,
java.lang.String sql,
boolean extendedDataTypes,
int queryTimeout)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
DataSet |
getSqlDataSet(java.lang.String name,
java.lang.String sql,
boolean extendedDataTypes,
int queryTimeout,
boolean keepAlive)
Returns a sapphire.util.DataSet that reflects the resultset for the given sql
|
createRemoteAccessKey, getAttachmentManager, getAutomationManager, getConfigurationManager, getConnectionid, getErrorCodeList, getErrorCodeStack, getErrorHandler, getErrorStack, getErrorStack, getErrorString, getInfoErrorString, getLastError, getLastErrorCode, getLastErrorMessage, getLastException, getLocalAccessManager, getNameserverlist, getQueryManager, getRemoteAccessManager, getRequestManager, getStatusManager, getWebAdminManager, hasErrors, hasInfoErrors, parseServiceExceptionMsg, resetConnectionid, resetErrorStack, setConnectionDetails, setConnectionid, setError, setError, setErrorString, setInfoErrorString, setJNDIPrefix, setLocal, setLocalJNDIPrefix, setRakFilepublic QueryProcessor(java.lang.String connectionid)
connectionid - The connection to use for component callspublic QueryProcessor(java.lang.String nameserverlist,
java.lang.String connectionid)
nameserverlist - list of the application sever namesconnectionid - A valid connectionidpublic QueryProcessor(java.io.File rakFile,
java.lang.String connectionid)
rakFile - A remote access key fileconnectionid - A valid connectionidpublic QueryProcessor(javax.servlet.jsp.PageContext pageContext)
pageContext - The current page contextpublic DataSet getSqlDataSet(java.lang.String name, java.lang.String sql)
name - A name for the query that will be used to record the statisticssql - The sql to generate the datasetpublic DataSet getSqlDataSet(java.lang.String sql)
sql - The sql to generate the datasetpublic DataSet getSqlDataSet(int sqlCode)
sqlCode - Reference to the sql to generate the datasetpublic DataSet getSqlDataSet(int sqlCode, java.lang.Object[] bindVars)
sqlCode - Reference to the sql to generate the datasetbindVars - Bind variables for the sqlpublic DataSet getSqlDataSet(java.lang.String sql, boolean extendedDataTypes)
sql - The sql to generate the datasetextendedDataTypes - Whether the returned dataset will include CLOB fieldspublic DataSet getSqlDataSet(int sqlCode, boolean extendedDataTypes)
sqlCode - Reference to the sql to generate the datasetextendedDataTypes - Whether the returned dataset will include CLOB fieldspublic DataSet getSqlDataSet(int sqlCode, java.lang.Object[] bindVars, boolean extendedDataTypes)
sqlCode - Reference to the sql to generate the datasetbindVars - Bind variables for the sqlextendedDataTypes - Whether the returned dataset will include CLOB fieldspublic DataSet getSqlDataSet(java.lang.String name, java.lang.String sql, boolean extendedDataTypes)
name - A name for the query that will be used to record the statisticssql - The sql to generate the datasetextendedDataTypes - Whether the returned dataset will include CLOB fieldspublic DataSet getSqlDataSet(java.lang.String name, java.lang.String sql, boolean extendedDataTypes, int queryTimeout)
name - A name for the query that will be used to record the statisticssql - The sql to generate the datasetextendedDataTypes - Whether the returned dataset will include CLOB fieldsqueryTimeout - Specify time out in seconds to override system default query timeout. Set to zero to disable timeoutpublic DataSet getSqlDataSet(java.lang.String name, java.lang.String sql, boolean extendedDataTypes, int queryTimeout, boolean keepAlive)
name - A name for the query that will be used to record the statisticssql - The sql to generate the datasetextendedDataTypes - Whether the returned dataset will include CLOB fieldsqueryTimeout - Specify time out in seconds to override system default query timeout. Set to zero to disable timeoutkeepAlive - Set to true to keep connection alivepublic DataSet getPreparedSqlDataSet(java.lang.String sql, java.lang.Object[] params)
sql - The sql to generate the datasetparams - bind variables for each parameter in the querypublic DataSet getPreparedSqlDataSet(int sqlCode, java.lang.Object[] params)
sqlCode - Reference to the sql to generate the datasetparams - bind variables for each parameter in the querypublic DataSet getPreparedSqlDataSet(java.lang.String name, java.lang.String sql, java.lang.Object[] params)
name - A name for the query that will be used to record the statisticssql - The sql to generate the datasetparams - bind variables for each parameter in the querypublic DataSet getPreparedSqlDataSet(java.lang.String sql, java.lang.Object[] params, boolean extendedDataTypes)
sql - The sql to generate the datasetparams - bind variables for each parameter in the queryextendedDataTypes - determines in LOB columns are includedpublic DataSet getPreparedSqlDataSet(int sqlCode, java.lang.Object[] params, boolean extendedDataTypes)
sqlCode - Reference to the sql to generate the datasetparams - bind variables for each parameter in the queryextendedDataTypes - determines in LOB columns are includedpublic DataSet getPreparedSqlDataSet(java.lang.String name, java.lang.String sql, java.lang.Object[] params, boolean extendedDataTypes)
name - A name for the query that will be used to record the statisticssql - The sql to generate the datasetparams - bind variables for each parameter in the queryextendedDataTypes - true if support for clobs and blobs is requiredpublic DataSet getPreparedSqlDataSet(java.lang.String name, java.lang.String sql, java.lang.Object[] params, boolean extendedDataTypes, int queryTimeout)
name - A name for the query that will be used to record the statisticssql - The sql to generate the datasetparams - bind variables for each parameter in the queryextendedDataTypes - true if support for clobs and blobs is requiredqueryTimeout - Specify time out in seconds to override system default query timeout. Set to zero to disable timeoutpublic int getPreparedCount(java.lang.String sql,
java.lang.Object[] params)
throws SapphireException
sql - Sql of the form getCount() with bind variablesparams - array that holds bind valuesSapphireExceptionpublic int getCount(java.lang.String sql)
throws SapphireException
sql - Sql of the form getCount()SapphireExceptionpublic DataSet getRefTypeDataSet(java.lang.String reftypeid)
reftypeid - A valid Sapphire ReferenceTypepublic java.lang.String getKeyid1List(java.lang.String sdcid,
java.lang.String queryid,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3,
java.lang.String param4,
java.lang.String param5)
sdcid - A valid Sapphire SDCqueryid - A valid Sapphire Queryparam1 - Query parameter (Optional)param2 - Query parameter (Optional)param3 - Query parameter (Optional)param4 - Query parameter (Optional)param5 - Query parameter (Optional)public java.lang.String getKeyid1List(java.lang.String sdcid,
java.lang.String queryid)
sdcid - A valid Sapphire SDCqueryid - A valid Sapphire Querypublic java.lang.String getKeyid1List(java.lang.String sdcid,
java.lang.String queryid,
java.lang.String[] params)
sdcid - A valid Sapphire SDCqueryid - A valid Sapphire Queryparams - String array of query parameterspublic int execSQL(java.lang.String sql)
sql - The sql to executepublic int execPreparedUpdate(java.lang.String sql,
java.lang.Object[] bindvars)
sql - The prepared sql to executebindvars - The sql bind variable object arraypublic int execSQL(int sqlCode)
public int execSQL(int sqlCode,
java.lang.Object[] bindVars)
public java.lang.String getSecurityFilterWhere(java.lang.String sdcid)