Class StoredProcedureQueryImpl

  • All Implemented Interfaces:
    javax.persistence.Query, javax.persistence.StoredProcedureQuery

    public class StoredProcedureQueryImpl
    extends QueryImpl
    implements javax.persistence.StoredProcedureQuery
    Concrete JPA query class. The JPA query wraps a StoredProcesureQuery which is executed.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List buildResultRecords​(java.sql.ResultSet resultSet)
      Build the given result set into a list objects.
      static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingNameQuery​(java.util.List<java.lang.String> resultSetMappingNames, org.eclipse.persistence.queries.StoredProcedureCall call)
      Build a ResultSetMappingQuery from a sql result set mapping name and a stored procedure call.
      static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingNameQuery​(java.util.List<java.lang.String> resultSetMappingNames, org.eclipse.persistence.queries.StoredProcedureCall call, java.util.Map<java.lang.String,​java.lang.Object> hints, java.lang.ClassLoader classLoader, org.eclipse.persistence.internal.sessions.AbstractSession session)
      Build a ResultSetMappingQuery from a sql result set mapping name and a stored procedure call.
      static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingQuery​(java.util.List<org.eclipse.persistence.queries.SQLResultSetMapping> resultSetMappings, org.eclipse.persistence.queries.StoredProcedureCall call)
      Build a ResultSetMappingQuery from the sql result set mappings given a stored procedure call.
      static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingQuery​(java.util.List<org.eclipse.persistence.queries.SQLResultSetMapping> resultSetMappings, org.eclipse.persistence.queries.StoredProcedureCall call, java.util.Map<java.lang.String,​java.lang.Object> hints, java.lang.ClassLoader classLoader, org.eclipse.persistence.internal.sessions.AbstractSession session)
      Build a ResultSetMappingQuery from the sql result set mappings given a stored procedure call.
      static org.eclipse.persistence.queries.DatabaseQuery buildStoredProcedureQuery​(java.lang.Class resultClass, org.eclipse.persistence.queries.StoredProcedureCall call, java.util.Map<java.lang.String,​java.lang.Object> hints, java.lang.ClassLoader classLoader, org.eclipse.persistence.internal.sessions.AbstractSession session)
      Build a ReadAllQuery from a class and stored procedure call.
      static org.eclipse.persistence.queries.DatabaseQuery buildStoredProcedureQuery​(java.lang.String sqlResultSetMappingName, org.eclipse.persistence.queries.StoredProcedureCall call, java.util.Map<java.lang.String,​java.lang.Object> hints, java.lang.ClassLoader classLoader, org.eclipse.persistence.internal.sessions.AbstractSession session)
      Build a ResultSetMappingQuery from a sql result set mapping name and a stored procedure call.
      static org.eclipse.persistence.queries.DatabaseQuery buildStoredProcedureQuery​(org.eclipse.persistence.queries.StoredProcedureCall call, java.util.Map<java.lang.String,​java.lang.Object> hints, java.lang.ClassLoader classLoader, org.eclipse.persistence.internal.sessions.AbstractSession session)
      Build a DataReadQuery with the stored procedure call given.
      void close()
      Call this method to close any open connections to the database.
      boolean execute()
      Returns true if the first result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.
      int executeUpdate()
      Execute an update or delete statement (from a stored procedure query).
      void finalize()
      Finalize method in case the query is not closed.
      protected org.eclipse.persistence.queries.StoredProcedureCall getCall()
      Return the stored procedure call associated with this query.
      protected java.util.Map<java.lang.String,​javax.persistence.Parameter<?>> getInternalParameters()
      Return the internal map of parameters.
      java.lang.Object getOutputParameterValue​(int position)
      Used to retrieve the values passed back from the procedure through INOUT and OUT parameters.
      java.lang.Object getOutputParameterValue​(java.lang.String parameterName)
      Used to retrieve the values passed back from the procedure through INOUT and OUT parameters.
      java.util.List getResultList()
      Execute the query and return the query results as a List.
      protected org.eclipse.persistence.queries.ResultSetMappingQuery getResultSetMappingQuery()
      Return the ResultSetMappingQuery for this stored procedure query.
      java.lang.Object getSingleResult()
      Execute the query and return the single query result.
      int getUpdateCount()
      Returns the update count or -1 if there is no pending result or if the next result is not an update count.
      boolean hasMoreResults()
      Returns true if the next result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.
      protected boolean isValidCallableStatement()
      Returns true if the execute statement for this query is 1) not null (i.e.
      javax.persistence.StoredProcedureQuery registerStoredProcedureParameter​(int position, java.lang.Class type, javax.persistence.ParameterMode mode)
      Register a positional parameter.
      javax.persistence.StoredProcedureQuery registerStoredProcedureParameter​(java.lang.String parameterName, java.lang.Class type, javax.persistence.ParameterMode mode)
      Register a named parameter.
      StoredProcedureQueryImpl setFirstResult​(int startPosition)
      Set the position of the first result to retrieve.
      StoredProcedureQueryImpl setFlushMode​(javax.persistence.FlushModeType flushMode)
      Set the flush mode type to be used for the query execution.
      javax.persistence.StoredProcedureQuery setHint​(java.lang.String hintName, java.lang.Object value)
      Set a query property or hint.
      StoredProcedureQueryImpl setLockMode​(javax.persistence.LockModeType lockMode)
      Set the lock mode type to be used for the query execution.
      StoredProcedureQueryImpl setMaxResults​(int maxResult)
      Set the maximum number of results to retrieve.
      javax.persistence.StoredProcedureQuery setParameter​(int position, java.lang.Object value)
      Bind an argument to a positional parameter.
      javax.persistence.StoredProcedureQuery setParameter​(int position, java.util.Calendar value, javax.persistence.TemporalType temporalType)
      Bind an instance of java.util.Calendar to a positional parameter.
      javax.persistence.StoredProcedureQuery setParameter​(int position, java.util.Date value, javax.persistence.TemporalType temporalType)
      Bind an instance of java.util.Date to a positional parameter.
      javax.persistence.StoredProcedureQuery setParameter​(java.lang.String name, java.lang.Object value)
      Bind an argument to a named parameter.
      javax.persistence.StoredProcedureQuery setParameter​(java.lang.String name, java.util.Calendar value, javax.persistence.TemporalType temporalType)
      Bind an instance of java.util.Calendar to a named parameter.
      javax.persistence.StoredProcedureQuery setParameter​(java.lang.String name, java.util.Date value, javax.persistence.TemporalType temporalType)
      Bind an instance of java.util.Date to a named parameter.
      javax.persistence.StoredProcedureQuery setParameter​(javax.persistence.Parameter<java.util.Calendar> param, java.util.Calendar value, javax.persistence.TemporalType temporalType)
      Bind an instance of java.util.Calendar to a Parameter object.
      javax.persistence.StoredProcedureQuery setParameter​(javax.persistence.Parameter<java.util.Date> param, java.util.Date value, javax.persistence.TemporalType temporalType)
      Bind an instance of java.util.Date to a Parameter object.
      <T> javax.persistence.StoredProcedureQuery setParameter​(javax.persistence.Parameter<T> param, T value)
      Bind the value of a Parameter object.
      protected void setParameterInternal​(java.lang.String name, java.lang.Object value, boolean isIndex)
      Bind an argument to a named or indexed parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.persistence.Query

        getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getResultStream, isBound, unwrap
    • Field Detail

      • hasMoreResults

        protected boolean hasMoreResults
      • executeCall

        protected org.eclipse.persistence.internal.databaseaccess.DatabaseCall executeCall
      • executeStatement

        protected java.sql.Statement executeStatement
      • executeResultSetIndex

        protected int executeResultSetIndex
      • outputCursorIndex

        protected int outputCursorIndex
      • isOutputCursorResultSet

        protected boolean isOutputCursorResultSet
    • Constructor Detail

      • StoredProcedureQueryImpl

        protected StoredProcedureQueryImpl​(EntityManagerImpl entityManager)
        Base constructor for StoredProcedureQueryImpl. Initializes basic variables.
      • StoredProcedureQueryImpl

        public StoredProcedureQueryImpl​(org.eclipse.persistence.queries.DatabaseQuery query,
                                        EntityManagerImpl entityManager)
        Create an StoredProcedureQueryImpl with a DatabaseQuery.
      • StoredProcedureQueryImpl

        public StoredProcedureQueryImpl​(java.lang.String name,
                                        EntityManagerImpl entityManager)
        Create an StoredProcedureQueryImpl with a query name.
    • Method Detail

      • buildResultRecords

        protected java.util.List buildResultRecords​(java.sql.ResultSet resultSet)
        Build the given result set into a list objects. Assumes there is an execute call available and therefore should not be called unless an execute statement was issued by the user.
      • buildResultSetMappingNameQuery

        public static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingNameQuery​(java.util.List<java.lang.String> resultSetMappingNames,
                                                                                                   org.eclipse.persistence.queries.StoredProcedureCall call)
        Build a ResultSetMappingQuery from a sql result set mapping name and a stored procedure call. This is called from a named stored procedure that employs result set mapping name(s) which should be available from the session.
      • buildResultSetMappingNameQuery

        public static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingNameQuery​(java.util.List<java.lang.String> resultSetMappingNames,
                                                                                                   org.eclipse.persistence.queries.StoredProcedureCall call,
                                                                                                   java.util.Map<java.lang.String,​java.lang.Object> hints,
                                                                                                   java.lang.ClassLoader classLoader,
                                                                                                   org.eclipse.persistence.internal.sessions.AbstractSession session)
        Build a ResultSetMappingQuery from a sql result set mapping name and a stored procedure call. This is called from a named stored procedure that employs result set mapping name(s) which should be available from the session.
      • buildResultSetMappingQuery

        public static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingQuery​(java.util.List<org.eclipse.persistence.queries.SQLResultSetMapping> resultSetMappings,
                                                                                               org.eclipse.persistence.queries.StoredProcedureCall call)
        Build a ResultSetMappingQuery from the sql result set mappings given a stored procedure call. This is called from a named stored procedure query that employs result class name(s). The resultSetMappings are build from these class name(s) and are not available from the session.
      • buildResultSetMappingQuery

        public static org.eclipse.persistence.queries.DatabaseQuery buildResultSetMappingQuery​(java.util.List<org.eclipse.persistence.queries.SQLResultSetMapping> resultSetMappings,
                                                                                               org.eclipse.persistence.queries.StoredProcedureCall call,
                                                                                               java.util.Map<java.lang.String,​java.lang.Object> hints,
                                                                                               java.lang.ClassLoader classLoader,
                                                                                               org.eclipse.persistence.internal.sessions.AbstractSession session)
        Build a ResultSetMappingQuery from the sql result set mappings given a stored procedure call. This is called from a named stored procedure query that employs result class name(s). The resultSetMappings are build from these class name(s) and are not available from the session.
      • buildStoredProcedureQuery

        public static org.eclipse.persistence.queries.DatabaseQuery buildStoredProcedureQuery​(java.lang.Class resultClass,
                                                                                              org.eclipse.persistence.queries.StoredProcedureCall call,
                                                                                              java.util.Map<java.lang.String,​java.lang.Object> hints,
                                                                                              java.lang.ClassLoader classLoader,
                                                                                              org.eclipse.persistence.internal.sessions.AbstractSession session)
        Build a ReadAllQuery from a class and stored procedure call.
      • buildStoredProcedureQuery

        public static org.eclipse.persistence.queries.DatabaseQuery buildStoredProcedureQuery​(org.eclipse.persistence.queries.StoredProcedureCall call,
                                                                                              java.util.Map<java.lang.String,​java.lang.Object> hints,
                                                                                              java.lang.ClassLoader classLoader,
                                                                                              org.eclipse.persistence.internal.sessions.AbstractSession session)
        Build a DataReadQuery with the stored procedure call given.
      • buildStoredProcedureQuery

        public static org.eclipse.persistence.queries.DatabaseQuery buildStoredProcedureQuery​(java.lang.String sqlResultSetMappingName,
                                                                                              org.eclipse.persistence.queries.StoredProcedureCall call,
                                                                                              java.util.Map<java.lang.String,​java.lang.Object> hints,
                                                                                              java.lang.ClassLoader classLoader,
                                                                                              org.eclipse.persistence.internal.sessions.AbstractSession session)
        Build a ResultSetMappingQuery from a sql result set mapping name and a stored procedure call.
      • close

        public void close()
        Call this method to close any open connections to the database.
        Overrides:
        close in class QueryImpl
      • execute

        public boolean execute()
        Returns true if the first result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.
        Specified by:
        execute in interface javax.persistence.StoredProcedureQuery
        Returns:
        true if first result corresponds to result set
        Throws:
        javax.persistence.QueryTimeoutException - if the query execution exceeds the query timeout value set and only the statement is rolled back
        javax.persistence.PersistenceException - if the query execution exceeds the query timeout value set and the transaction is rolled back
      • executeUpdate

        public int executeUpdate()
        Execute an update or delete statement (from a stored procedure query).
        Specified by:
        executeUpdate in interface javax.persistence.Query
        Specified by:
        executeUpdate in interface javax.persistence.StoredProcedureQuery
        Overrides:
        executeUpdate in class QueryImpl
        Returns:
        the number of entities updated or deleted
      • finalize

        public void finalize()
        Finalize method in case the query is not closed.
        Overrides:
        finalize in class java.lang.Object
      • getCall

        protected org.eclipse.persistence.queries.StoredProcedureCall getCall()
        Return the stored procedure call associated with this query.
      • getInternalParameters

        protected java.util.Map<java.lang.String,​javax.persistence.Parameter<?>> getInternalParameters()
        Return the internal map of parameters.
        Overrides:
        getInternalParameters in class QueryImpl
      • getOutputParameterValue

        public java.lang.Object getOutputParameterValue​(int position)
        Used to retrieve the values passed back from the procedure through INOUT and OUT parameters. For portability, all results corresponding to result sets and update counts must be retrieved before the values of output parameters.
        Specified by:
        getOutputParameterValue in interface javax.persistence.StoredProcedureQuery
        Parameters:
        position - parameter position
        Returns:
        the result that is passed back through the parameter
        Throws:
        java.lang.IllegalArgumentException - if the position does not correspond to a parameter of the query or is not an INOUT or OUT parameter
      • getOutputParameterValue

        public java.lang.Object getOutputParameterValue​(java.lang.String parameterName)
        Used to retrieve the values passed back from the procedure through INOUT and OUT parameters. For portability, all results corresponding to result sets and update counts must be retrieved before the values of output parameters.
        Specified by:
        getOutputParameterValue in interface javax.persistence.StoredProcedureQuery
        Parameters:
        parameterName - name of the parameter as registered or specified in metadata
        Returns:
        the result that is passed back through the parameter
        Throws:
        java.lang.IllegalArgumentException - if the parameter name does not correspond to a parameter of the query or is not an INOUT or OUT parameter
      • getResultList

        public java.util.List getResultList()
        Execute the query and return the query results as a List.
        Specified by:
        getResultList in interface javax.persistence.Query
        Specified by:
        getResultList in interface javax.persistence.StoredProcedureQuery
        Overrides:
        getResultList in class QueryImpl
        Returns:
        a list of the results
      • getResultSetMappingQuery

        protected org.eclipse.persistence.queries.ResultSetMappingQuery getResultSetMappingQuery()
        Return the ResultSetMappingQuery for this stored procedure query. NOTE: Methods assumes associated database query is a ResultSetMappingQuery.
      • getSingleResult

        public java.lang.Object getSingleResult()
        Execute the query and return the single query result.
        Specified by:
        getSingleResult in interface javax.persistence.Query
        Specified by:
        getSingleResult in interface javax.persistence.StoredProcedureQuery
        Overrides:
        getSingleResult in class QueryImpl
        Returns:
        a single result object.
      • getUpdateCount

        public int getUpdateCount()
        Returns the update count or -1 if there is no pending result or if the next result is not an update count.
        Specified by:
        getUpdateCount in interface javax.persistence.StoredProcedureQuery
        Returns:
        update count or -1 if there is no pending result or if the next result is not an update count
        Throws:
        javax.persistence.QueryTimeoutException - if the query execution exceeds the query timeout value set and only the statement is rolled back
        javax.persistence.PersistenceException - if the query execution exceeds the query timeout value set and the transaction is rolled back
      • hasMoreResults

        public boolean hasMoreResults()
        Returns true if the next result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.
        Specified by:
        hasMoreResults in interface javax.persistence.StoredProcedureQuery
        Returns:
        true if next result corresponds to result set
        Throws:
        javax.persistence.QueryTimeoutException - if the query execution exceeds the query timeout value set and only the statement is rolled back
        javax.persistence.PersistenceException - if the query execution exceeds the query timeout value set and the transaction is rolled back
      • isValidCallableStatement

        protected boolean isValidCallableStatement()
        Returns true if the execute statement for this query is 1) not null (i.e. query has been executed and 2) is an instance of callable statement, meaning there are out parameters associated with it.
      • registerStoredProcedureParameter

        public javax.persistence.StoredProcedureQuery registerStoredProcedureParameter​(int position,
                                                                                       java.lang.Class type,
                                                                                       javax.persistence.ParameterMode mode)
        Register a positional parameter. All positional parameters must be registered.
        Specified by:
        registerStoredProcedureParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        position - parameter position
        type - type of the parameter
        mode - parameter mode
        Returns:
        the same query instance
      • registerStoredProcedureParameter

        public javax.persistence.StoredProcedureQuery registerStoredProcedureParameter​(java.lang.String parameterName,
                                                                                       java.lang.Class type,
                                                                                       javax.persistence.ParameterMode mode)
        Register a named parameter. When using parameter names, all parameters must be registered in the order in which they occur in the parameter list of the stored procedure.
        Specified by:
        registerStoredProcedureParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        parameterName - name of the parameter as registered or specified in metadata
        type - type of the parameter
        mode - parameter mode
        Returns:
        the same query instance
      • setFirstResult

        public StoredProcedureQueryImpl setFirstResult​(int startPosition)
        Set the position of the first result to retrieve.
        Specified by:
        setFirstResult in interface javax.persistence.Query
        Overrides:
        setFirstResult in class QueryImpl
        Parameters:
        startPosition - position of the first result, numbered from 0
        Returns:
        the same query instance
      • setFlushMode

        public StoredProcedureQueryImpl setFlushMode​(javax.persistence.FlushModeType flushMode)
        Set the flush mode type to be used for the query execution. The flush mode type applies to the query regardless of the flush mode type in use for the entity manager.
        Specified by:
        setFlushMode in interface javax.persistence.Query
        Specified by:
        setFlushMode in interface javax.persistence.StoredProcedureQuery
        Overrides:
        setFlushMode in class QueryImpl
        Parameters:
        flushMode - flush mode
        Returns:
        the same query instance
      • setHint

        public javax.persistence.StoredProcedureQuery setHint​(java.lang.String hintName,
                                                              java.lang.Object value)
        Set a query property or hint. The hints elements may be used to specify query properties and hints. Properties defined by this specification must be observed by the provider. Vendor-specific hints that are not recognized by a provider must be silently ignored. Portable applications should not rely on the standard timeout hint. Depending on the database in use, this hint may or may not be observed.
        Specified by:
        setHint in interface javax.persistence.Query
        Specified by:
        setHint in interface javax.persistence.StoredProcedureQuery
        Parameters:
        hintName - name of the property or hint
        value - value for the property or hint
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if the second argument is not valid for the implementation
      • setLockMode

        public StoredProcedureQueryImpl setLockMode​(javax.persistence.LockModeType lockMode)
        Set the lock mode type to be used for the query execution.
        Specified by:
        setLockMode in interface javax.persistence.Query
        Overrides:
        setLockMode in class QueryImpl
        Parameters:
        lockMode -
        Throws:
        java.lang.IllegalStateException - if not a Java Persistence query language SELECT query
      • setMaxResults

        public StoredProcedureQueryImpl setMaxResults​(int maxResult)
        Set the maximum number of results to retrieve.
        Specified by:
        setMaxResults in interface javax.persistence.Query
        Overrides:
        setMaxResults in class QueryImpl
        Parameters:
        maxResult -
        Returns:
        the same query instance
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(int position,
                                                                   java.util.Calendar value,
                                                                   javax.persistence.TemporalType temporalType)
        Bind an instance of java.util.Calendar to a positional parameter.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        position -
        value -
        temporalType -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if position does not correspond to a positional parameter of the query or if the value argument is of incorrect type
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(int position,
                                                                   java.util.Date value,
                                                                   javax.persistence.TemporalType temporalType)
        Bind an instance of java.util.Date to a positional parameter.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        position -
        value -
        temporalType -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if position does not correspond to a positional parameter of the query or if the value argument is of incorrect type
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(int position,
                                                                   java.lang.Object value)
        Bind an argument to a positional parameter.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        position -
        value -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if position does not correspond to a positional parameter of the query or if the argument is of incorrect type
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(javax.persistence.Parameter<java.util.Calendar> param,
                                                                   java.util.Calendar value,
                                                                   javax.persistence.TemporalType temporalType)
        Bind an instance of java.util.Calendar to a Parameter object.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        param -
        value -
        temporalType -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if the parameter does not correspond to a parameter of the query
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(javax.persistence.Parameter<java.util.Date> param,
                                                                   java.util.Date value,
                                                                   javax.persistence.TemporalType temporalType)
        Bind an instance of java.util.Date to a Parameter object.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        param -
        value -
        temporalType -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if the parameter does not correspond to a parameter of the query
      • setParameter

        public <T> javax.persistence.StoredProcedureQuery setParameter​(javax.persistence.Parameter<T> param,
                                                                       T value)
        Bind the value of a Parameter object.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        param -
        value -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if the parameter does not correspond to a parameter of the query
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(java.lang.String name,
                                                                   java.util.Calendar value,
                                                                   javax.persistence.TemporalType temporalType)
        Bind an instance of java.util.Calendar to a named parameter.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        name -
        value -
        temporalType -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the value argument is of incorrect type
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(java.lang.String name,
                                                                   java.util.Date value,
                                                                   javax.persistence.TemporalType temporalType)
        Bind an instance of java.util.Date to a named parameter.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        name -
        value -
        temporalType -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the value argument is of incorrect type
      • setParameter

        public javax.persistence.StoredProcedureQuery setParameter​(java.lang.String name,
                                                                   java.lang.Object value)
        Bind an argument to a named parameter.
        Specified by:
        setParameter in interface javax.persistence.Query
        Specified by:
        setParameter in interface javax.persistence.StoredProcedureQuery
        Parameters:
        name -
        value -
        Returns:
        the same query instance
        Throws:
        java.lang.IllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the argument is of incorrect type
      • setParameterInternal

        protected void setParameterInternal​(java.lang.String name,
                                            java.lang.Object value,
                                            boolean isIndex)
        Bind an argument to a named or indexed parameter.
        Overrides:
        setParameterInternal in class QueryImpl
        Parameters:
        name - the parameter name
        value - to bind
        isIndex - defines if index or named