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:
- Serialized Form
-
-
Field Summary
-
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_EVALUATE_IN_MEMORY, EXTENSION_EXCLUDE_SUBCLASSES, EXTENSION_FLUSH_BEFORE_EXECUTION, EXTENSION_JDOQL_STRICT, EXTENSION_JPQL_STRICT, EXTENSION_LOAD_RESULTS_AT_COMMIT, EXTENSION_MULTITHREAD, EXTENSION_RESULT_CACHE_TYPE, EXTENSION_RESULT_SIZE_METHOD, EXTENSION_RESULTS_CACHED, EXTENSION_SQL_SYNTAX_CHECKS, EXTENSION_USE_FETCH_PLAN, extensions, filter, from, fromInclNo, fromInclParam, grouping, having, ignoreCache, implicitParameters, imports, inputParameters, insertFields, insertSelectQuery, LANGUAGE_JDOQL, LANGUAGE_JPQL, LANGUAGE_SQL, ordering, parameterNames, parsedImports, queryResults, range, result, resultClass, resultClassName, resultDistinct, storeMgr, subclasses, subqueries, tasks, toExclNo, toExclParam, type, unique, unmodifiable, update
-
-
Constructor Summary
Constructors Constructor Description StoredProcedureQuery(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compileInternal(Map parameterValues)
protected Object
executeQuery(Map parameters)
Method to execute the actual query.Object
getNextResults()
protected org.datanucleus.store.query.QueryResult
getResultsForResultSet(RDBMSStoreManager storeMgr, ResultSet rs, org.datanucleus.store.connection.ManagedConnection mconn)
int
getUpdateCount()
boolean
hasMoreResults()
protected Object
performExecute(Map parameters)
boolean
processesRangeInDatastoreQuery()
-
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
-
-
-
-
Constructor Detail
-
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 Detail
-
compileInternal
protected void compileInternal(Map parameterValues)
- Specified by:
compileInternal
in classorg.datanucleus.store.query.Query
-
processesRangeInDatastoreQuery
public boolean processesRangeInDatastoreQuery()
- Overrides:
processesRangeInDatastoreQuery
in classorg.datanucleus.store.query.Query
-
executeQuery
protected Object executeQuery(Map parameters)
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
protected Object performExecute(Map parameters)
- 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
public Object 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
-
-