Class StoredProcedureQuery
java.lang.Object
org.datanucleus.store.query.Query
org.datanucleus.store.query.AbstractStoredProcedureQuery
org.datanucleus.store.rdbms.query.StoredProcedureQuery
- All Implemented Interfaces:
Serializable
,org.datanucleus.ExecutionContextListener
public class StoredProcedureQuery
extends org.datanucleus.store.query.AbstractStoredProcedureQuery
Query using a stored procedure.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.datanucleus.store.query.AbstractStoredProcedureQuery
org.datanucleus.store.query.AbstractStoredProcedureQuery.StoredProcedureParameter
Nested classes/interfaces inherited from class org.datanucleus.store.query.Query
org.datanucleus.store.query.Query.QueryType, org.datanucleus.store.query.Query.SubqueryDefinition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
(package private) CallableStatement
The callable statement used to execute the stored proc.Fields inherited from class org.datanucleus.store.query.AbstractStoredProcedureQuery
outputParamValues, procedureName, resultClasses, resultMetaDatas, resultSetNumber, storedProcParams
Fields inherited from class org.datanucleus.store.query.Query
candidateClass, candidateClassName, clr, compilation, ec, explicitParameters, explicitVariables, EXTENSION_CHECK_UNUSED_PARAMETERS, EXTENSION_CLOSE_RESULTS_AT_EC_CLOSE, EXTENSION_COMPILATION_CACHED, EXTENSION_COMPILE_OPTIMISE_VAR_THIS, EXTENSION_EVALUATE_IN_MEMORY, EXTENSION_EXCLUDE_SUBCLASSES, EXTENSION_FLUSH_BEFORE_EXECUTION, EXTENSION_JDOQL_ALLOW_ALL, EXTENSION_JDOQL_STRICT, EXTENSION_JPQL_ALLOW_RANGE, EXTENSION_JPQL_STRICT, EXTENSION_LOAD_RESULTS_AT_COMMIT, EXTENSION_QUERY_TYPE, EXTENSION_RESULT_CACHE_TYPE, EXTENSION_RESULT_CACHE_VALIDATE_OBJECTS, EXTENSION_RESULT_SIZE_METHOD, EXTENSION_RESULTS_CACHED, EXTENSION_SQL_ALLOW_ALL, EXTENSION_SQL_SYNTAX_CHECKS, EXTENSION_UPDATE_ALL_CANDIDATE_FIELDS, EXTENSION_USE_FETCH_PLAN, extensions, filter, from, fromInclNo, fromInclParam, grouping, having, ignoreCache, implicitParameters, imports, inputParameters, insertFields, insertSelectQuery, ordering, parameterNames, parsedImports, queryResults, range, result, resultClass, resultClassName, resultDistinct, storeMgr, subclasses, subqueries, tasks, toExclNo, toExclParam, type, unique, unmodifiable, update
-
Constructor Summary
ConstructorsConstructorDescriptionStoredProcedureQuery
(org.datanucleus.store.StoreManager storeMgr, org.datanucleus.ExecutionContext ec) StoredProcedureQuery
(org.datanucleus.store.StoreManager storeMgr, org.datanucleus.ExecutionContext ec, String procName) Constructs a new query instance for the specified stored procedure name.StoredProcedureQuery
(org.datanucleus.store.StoreManager storeMgr, org.datanucleus.ExecutionContext ec, StoredProcedureQuery query) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
compileInternal
(Map parameterValues) protected Object
executeQuery
(Map parameters) Method to execute the actual query.protected org.datanucleus.store.query.QueryResult
getResultsForResultSet
(RDBMSStoreManager storeMgr, ResultSet rs, org.datanucleus.store.connection.ManagedConnection mconn) int
boolean
protected Object
performExecute
(Map parameters) boolean
Methods inherited from class org.datanucleus.store.query.AbstractStoredProcedureQuery
getLanguage, getOutputParameterValue, getOutputParameterValue, registerParameter, registerParameter, setCandidates, setCandidates, setResultClasses, setResultMetaData
Methods inherited from class org.datanucleus.store.query.Query
addExtension, addSubquery, applyImplicitParameterValueToCompilation, applyImplicitParameterValueToSubqueries, assertIsModifiable, assertIsOpen, assertSupportsCancel, cancel, cancel, cancelTaskObject, checkForMissingParameters, checkParameterTypesAgainstCompilation, checkUnusedParameters, close, closeAll, compile, declareExplicitParameters, declareExplicitVariables, declareImports, deepFindSymbolForParameterInCompilation, deletePersistentAll, deletePersistentAll, deletePersistentAll, deregisterTask, discardCompiled, equals, execute, executeWithArray, executeWithMap, executionContextClosing, getBooleanExtensionProperty, getCandidateClass, getCandidateClassMetaData, getCandidateClassName, getCompilation, getDatastoreReadTimeoutMillis, getDatastoreWriteTimeoutMillis, getExecutionContext, getExplicitParametersDeclaration, getExplicitVariablesDeclaration, getExtension, getExtensions, getFetchPlan, getFilter, getFrom, getGrouping, getHaving, getIgnoreCache, getImplicitParameters, getImportsDeclaration, getInputParameters, getInsertFields, getInsertSelectQuery, getNativeQuery, getOrdering, getParameterMapForValues, getParsedImports, getQueryManager, getRange, getRangeFromIncl, getRangeFromInclParam, getRangeToExcl, getRangeToExclParam, getResult, getResultClass, getResultClassName, getResultDistinct, getSerializeRead, getStoreManager, getStringExtensionProperty, getSubqueryForVariable, getSupportedExtensions, getType, getUpdate, hashCode, hasSubqueryForVariable, isCompiled, isSubclasses, isUnique, isUnmodifiable, performDeletePersistentAll, prepareDatastore, registerTask, resolveClassDeclaration, setCacheResults, setCandidateClass, setCandidateClassName, setCompilation, setDatastoreReadTimeoutMillis, setDatastoreWriteTimeoutMillis, setExtensions, setFetchPlan, setFilter, setFrom, setGrouping, setHaving, setIgnoreCache, setImplicitParameter, setImplicitParameter, setInsertFields, setInsertSelectQuery, setOrdering, setRange, setRange, setResult, setResultClass, setResultClassName, setResultDistinct, setResultMetaData, setSerializeRead, setSubclasses, setType, setUnique, setUnmodifiable, setUpdate, shouldReturnSingleRow, supportsTimeout, useCaching, useFetchPlan, useResultsCaching
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
stmt
CallableStatement stmtThe callable statement used to execute the stored proc.
-
-
Constructor Details
-
StoredProcedureQuery
public StoredProcedureQuery(org.datanucleus.store.StoreManager storeMgr, org.datanucleus.ExecutionContext ec, StoredProcedureQuery query) - Parameters:
storeMgr
- StoreManagerec
- Execution Contextquery
- Existing query to base this one
-
StoredProcedureQuery
public StoredProcedureQuery(org.datanucleus.store.StoreManager storeMgr, org.datanucleus.ExecutionContext ec) - Parameters:
storeMgr
- StoreManagerec
- ExecutionContext
-
StoredProcedureQuery
public StoredProcedureQuery(org.datanucleus.store.StoreManager storeMgr, org.datanucleus.ExecutionContext ec, String procName) Constructs a new query instance for the specified stored procedure name.- Parameters:
storeMgr
- StoreManager for this queryec
- execution contextprocName
- Name of the stored procedure
-
-
Method Details
-
compileInternal
- Specified by:
compileInternal
in classorg.datanucleus.store.query.Query
-
processesRangeInDatastoreQuery
public boolean processesRangeInDatastoreQuery()- Overrides:
processesRangeInDatastoreQuery
in classorg.datanucleus.store.query.Query
-
executeQuery
Method to execute the actual query. Overrides the version in Query since that will handle result set processing and assumes that this is a normal query, which it isn't.- Overrides:
executeQuery
in classorg.datanucleus.store.query.Query
- Parameters:
parameters
- Map of parameter values keyed by parameter name- Returns:
- Boolean, which is true if there is a result set, and false if an update count.
-
performExecute
- Specified by:
performExecute
in classorg.datanucleus.store.query.Query
-
hasMoreResults
public boolean hasMoreResults()- Specified by:
hasMoreResults
in classorg.datanucleus.store.query.AbstractStoredProcedureQuery
-
getUpdateCount
public int getUpdateCount()- Specified by:
getUpdateCount
in classorg.datanucleus.store.query.AbstractStoredProcedureQuery
-
getNextResults
- Specified by:
getNextResults
in classorg.datanucleus.store.query.AbstractStoredProcedureQuery
-
getResultsForResultSet
protected org.datanucleus.store.query.QueryResult getResultsForResultSet(RDBMSStoreManager storeMgr, ResultSet rs, org.datanucleus.store.connection.ManagedConnection mconn) throws SQLException - Throws:
SQLException
-