com.ibm.websphere.ejbquery
Interface QueryLocal
-
- All Superinterfaces:
- javax.ejb.EJBLocalObject
public interface QueryLocal extends javax.ejb.EJBLocalObject
EJB Local interface for the WebSphere dynamic ejb query service. An ejb query can be executed using the executeQuery( ) method. To execute a query a number of times with different input parameters, you may use the prepareQuery( ) method and repeated calls to the executePlan( ) method.When using the local interface for the query service, any references to EJB Objects in the query statement will be to local interfaces.
For example, the ejb query statement
select object(o) from myBean o
will return references to the local interface for myBean.
The dynamic query local interface will in many cases create a demand driven result set.
QueryLocalIterator
-
-
Method Summary
Methods Modifier and Type Method and Description QueryLocalIterator
executePlan(java.lang.String queryPlan, java.lang.Object[] parameterVars)
execute a query plan that was returned by the prepareQuery method.QueryLocalIterator
executeQuery(java.lang.String queryStatement, java.lang.Object[] parameterVars, java.util.Properties queryDomain)
validate and execute an ejb query statementjava.lang.String
prepareQuery(java.lang.String queryStatement, java.lang.Object[] parameterVars, java.util.Properties queryDomain)
validate the ejb query statement and return a query plan in the form of a String that can be used with the executePlan method.
-
-
-
Method Detail
-
executePlan
QueryLocalIterator executePlan(java.lang.String queryPlan, java.lang.Object[] parameterVars) throws QueryException
execute a query plan that was returned by the prepareQuery method.- Parameters:
queryPlan
- The String returned from a prepareQuery method.parameterVars
- The values to be substituted for any query parameters in the query statement. The datatypes of the parameters must be the same as the datatypes passed in on the prepareQuery call.- Throws:
QueryException
- Indicates an invalid query plan, a server or database error occurred, or the query invoked an application method which threw an exception.
-
executeQuery
QueryLocalIterator executeQuery(java.lang.String queryStatement, java.lang.Object[] parameterVars, java.util.Properties queryDomain) throws QueryException
validate and execute an ejb query statement- Parameters:
queryStatement
-parameterVars
- The values to be substituted for any query parameters in the query statement.queryDomain
- Normally a null value. SeeQuery.executeQuery(java.lang.String, java.lang.Object[], java.util.Properties, int, int)
- Throws:
QueryException
- Indicates an invalid query plan, a server or database error occurred, or the query invoked an application method which threw an exception.
-
prepareQuery
java.lang.String prepareQuery(java.lang.String queryStatement, java.lang.Object[] parameterVars, java.util.Properties queryDomain) throws QueryException
validate the ejb query statement and return a query plan in the form of a String that can be used with the executePlan method.- Parameters:
queryStatement
-parameterVars
- The values to be substituted for any query parameters in the query statement. The datatypes of the values but not the actual values are used in validating the query.queryDomain
- Normally a null value. SeeQuery.executeQuery(java.lang.String, java.lang.Object[], java.util.Properties, int, int)
- Throws:
QueryException
- Indicates an invalid query plan, a server or database error occurred, or the query invoked an application method which threw an exception.
-
-