public class JDBCQueryService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
JDBCQueryService(java.lang.String astrComponentId)
Constructor for the JDBCQueryService.
|
Modifier and Type | Method and Description |
---|---|
int[] | executeBatchUpdate(java.lang.String astrQueryName, java.util.List alParametersForBatchedQueries)
This method submits a batch of commands to the database.
|
int[] | executeBatchUpdate(java.lang.String astrQueryName, java.util.List alParametersForBatchedQueries, boolean updateInWorkspace)
This method submits a batch of commands to the database.
|
int[] | executeBatchUpdateWithStatement(java.lang.String astrStatement, java.lang.String tableName, java.util.List alParametersForBatchedQueries, boolean updateInWorkspace)
This method submits a batch of commands to the database.
|
java.util.List | executeDirectSQLQuery(java.lang.String sqlQuery, java.util.Map aQueryParameters)
Executes the specified SQL statement defined in the query template and returns the result.
|
java.util.List | executeQuery(java.lang.String astrQueryName, java.util.Map aQueryParameters)
Executes the specified SQL statement defined in the query template and returns the result.
|
java.util.List | executeQuery(java.lang.String astrQueryName, java.util.Map aQueryParameters, int startPageNumber, int numberOfPage)
Executes the specified SQL statement defined in the query template and returns the result.
|
java.util.List | executeQuery(java.lang.String astrQueryName, java.util.Map aQueryParameters, int startPageNumber, int numberOfPage, int maxRows)
Executes the specified SQL statement defined in the query template and returns the result.
|
int | executeSQLUpdate(java.lang.String aSQLQuery, java.util.Map aQueryParameters, java.lang.Long anOptCounter, java.lang.String[] arrTableNames)
This method executes the insert, update or delete SQL statement defined in the SQL input parameter.
|
int | executeUpdate(java.lang.String astrQueryName, java.util.Map aQueryParameters)
This method executes the insert, update or delete SQL statement defined in a query template file.
|
int | executeUpdate(java.lang.String astrQueryName, java.util.Map aQueryParameters, java.lang.Long anOptCounter)
This method executes the insert, update or delete SQL statement defined in a query template file.
|
java.sql.Timestamp | getCurrentTimestamp()
Gets the current timestamp according to the Commerce Server database.
|
java.util.List | myExecuteQuery()
This method is intended to be used internally by this class.
|
void | setConnection(java.sql.Connection aConnection)
Passes a database connection to be used by this class.
|
public static final java.lang.String COPYRIGHT
public JDBCQueryService(java.lang.String astrComponentId)
public int executeUpdate(java.lang.String astrQueryName, java.util.Map aQueryParameters) throws java.sql.SQLException, QueryServiceApplicationException
public int executeUpdate(java.lang.String astrQueryName, java.util.Map aQueryParameters, java.lang.Long anOptCounter) throws java.sql.SQLException, QueryServiceApplicationException
public int executeSQLUpdate(java.lang.String aSQLQuery, java.util.Map aQueryParameters, java.lang.Long anOptCounter, java.lang.String[] arrTableNames) throws java.sql.SQLException, QueryServiceApplicationException
public int[] executeBatchUpdate(java.lang.String astrQueryName, java.util.List alParametersForBatchedQueries) throws java.sql.SQLException, java.sql.BatchUpdateException, QueryServiceApplicationException
public int[] executeBatchUpdate(java.lang.String astrQueryName, java.util.List alParametersForBatchedQueries, boolean updateInWorkspace) throws java.sql.SQLException, java.sql.BatchUpdateException, QueryServiceApplicationException
public int[] executeBatchUpdateWithStatement(java.lang.String astrStatement, java.lang.String tableName, java.util.List alParametersForBatchedQueries, boolean updateInWorkspace) throws java.sql.SQLException, java.sql.BatchUpdateException, QueryServiceApplicationException
public java.util.List executeQuery(java.lang.String astrQueryName, java.util.Map aQueryParameters) throws java.sql.SQLException, QueryServiceApplicationException
public java.util.List executeDirectSQLQuery(java.lang.String sqlQuery, java.util.Map aQueryParameters) throws java.sql.SQLException, QueryServiceApplicationException
public java.util.List executeQuery(java.lang.String astrQueryName, java.util.Map aQueryParameters, int startPageNumber, int numberOfPage) throws java.sql.SQLException, QueryServiceApplicationException
The totalNumber is a Integer value that should be got by list.get(0)
The records list is a List object that should be got by list.get(1), each element in the records list is a record of the result set. Each record is a HashMap where the key is the column name and the value is the column value. An empty list is returned if no records are returned from the query.
public java.util.List executeQuery(java.lang.String astrQueryName, java.util.Map aQueryParameters, int startPageNumber, int numberOfPage, int maxRows) throws java.sql.SQLException, QueryServiceApplicationException
The totalNumber is a Integer value that should be got by list.get(0)
The records list is a List object that should be got by list.get(1), each element in the records list is a record of the result set. Each record is a HashMap where the key is the column name and the value is the column value. An empty list is returned if no records are returned from the query.
public final java.util.List myExecuteQuery() throws java.sql.SQLException
public java.sql.Timestamp getCurrentTimestamp() throws javax.naming.NamingException, java.sql.SQLException
public void setConnection(java.sql.Connection aConnection)