| Modifier and Type | Field and Description |
|---|---|
| protected DatabaseQuery | databaseQuery
Wrapped native query. |
| protected EntityManagerImpl | |
| protected int | |
| protected boolean | isShared
Stores if the wrapped query is shared, and requires cloning before being changed. |
| protected LockModeType | |
| protected int | |
| protected Map | |
| protected Map | |
| protected String | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | QueryImpl(DatabaseQuery query, EntityManagerImpl entityManager)
Create an EJBQueryImpl with a DatabaseQuery. |
| Modifier and Type | Method and Description |
|---|---|
| protected static void | applyArguments(StoredProcedureCall call, DatabaseQuery query)
Define the query arguments based on the procedure call. |
| protected static DatabaseQuery | applyHints(Map<String, Object>
a list of hints to be applied to the query hints, DatabaseQuery the query to apply the hints to query, ClassLoader classLoader, AbstractSession session)Set implementation-specific hints. |
| protected void | cloneSharedQuery()
If the query was from the jpql parse cache it must be cloned before being modified. |
| public void | close()
This method should be called to close any left over open connection to the database (if there is one). |
| protected Object | Returns: an object representing the given TemporalType.Convert the given object to the class represented by the given temporal type. |
| protected Object | Returns: the results of the query executionExecute a ReadQuery by assigning the stored parameter values and running it in the database |
| public int | Returns: the number of entities updated or deletedExecute an update or delete statement. |
| protected Session | |
| public DatabaseQuery | getDatabaseQuery()
Return the wrapped |
| public DatabaseQuery | |
| protected RuntimeException | getDetailedException(DatabaseException e)
Given a DatabaseException, this method will determine if we should throw a different more specific exception like a lock timeout exception. |
| public JpaEntityManager | |
| public int | |
| public FlushModeType | |
| public Map | |
| protected Map | |
| public LockModeType | |
| public int | |
| public int | |
| public <T> Parameter | |
| public <T> Parameter | |
| public Parameter | |
| public Parameter | |
| public static String | |
| public Set | |
| public <T> T | |
| public Object | Returns: parameter valueReturn the value bound to the named parameter. |
| public Object | Returns: parameter valueReturn the value bound to the positional parameter. |
| public List | Returns: a list of the resultsExecute the query and return the query results as a List. |
| public Object | |
| public Set | |
| public boolean | |
| protected boolean | |
| protected boolean | |
| protected void | |
| protected List | |
| protected void | propagateResultProperties()
Configure the firstResult, maxRows and lock mode in the EclipseLink ReadQuery. |
| protected void | |
| protected void | |
| protected void | |
| public void | |
| public QueryImpl | Returns: the same query instanceposition of the first result, numbered from 0 startPosition)Set the position of the first result to retrieve. |
| protected void | setFirstResultInternal(int
position of the first result, numbered from 0. startPosition)Set the position of the first result to retrieve. |
| public QueryImpl | |
| protected void | |
| public QueryImpl | |
| public QueryImpl | Returns: the same query instanceSet the maximum number of results to retrieve. |
| public void | |
| protected void | |
| protected void | setParameterInternal(String
the parameter name name, Object to bind value, boolean defines if index or named isIndex)Bind an argument to a named or indexed parameter. |
| protected void | |
| protected void | |
| protected void | |
| public String | |
| public <T> T |
| databaseQuery | back to summary |
|---|---|
| protected DatabaseQuery databaseQuery Wrapped native query. The query may be | |
| entityManager | back to summary |
|---|---|
| protected EntityManagerImpl entityManager | |
| firstResultIndex | back to summary |
|---|---|
| protected int firstResultIndex | |
| isShared | back to summary |
|---|---|
| protected boolean isShared Stores if the wrapped query is shared, and requires cloning before being changed. | |
| lockMode | back to summary |
|---|---|
| protected LockModeType lockMode | |
| maxResults | back to summary |
|---|---|
| protected int maxResults | |
| parameters | back to summary |
|---|---|
| protected Map<String, Parameter<?>> parameters | |
| parameterValues | back to summary |
|---|---|
| protected Map<String, Object> parameterValues | |
| queryName | back to summary |
|---|---|
| protected String queryName | |
| UNDEFINED | back to summary |
|---|---|
| public static final int UNDEFINED | |
| QueryImpl | back to summary |
|---|---|
| protected QueryImpl(EntityManagerImpl entityManager) Base constructor for EJBQueryImpl. Initializes basic variables. | |
| QueryImpl | back to summary |
|---|---|
| public QueryImpl(DatabaseQuery query, EntityManagerImpl entityManager) Create an EJBQueryImpl with a DatabaseQuery. | |
| applyArguments | back to summary |
|---|---|
| protected static void applyArguments(StoredProcedureCall call, DatabaseQuery query) Define the query arguments based on the procedure call. | |
| applyHints | back to summary |
|---|---|
| protected static DatabaseQuery applyHints(Map<String, Object> hints, DatabaseQuery query, ClassLoader classLoader, AbstractSession session) Set implementation-specific hints.
| |
| cloneSharedQuery | back to summary |
|---|---|
| protected void cloneSharedQuery() If the query was from the jpql parse cache it must be cloned before being modified. | |
| close | back to summary |
|---|---|
| public void close() This method should be called to close any left over open connection to the database (if there is one). | |
| convertTemporalType | back to summary |
|---|---|
| protected Object convertTemporalType(Object value, TemporalType type) Convert the given object to the class represented by the given temporal type.
| |
| executeReadQuery | back to summary |
|---|---|
| protected Object executeReadQuery() Execute a ReadQuery by assigning the stored parameter values and running it in the database
| |
| executeUpdate | back to summary |
|---|---|
| public int executeUpdate() Execute an update or delete statement.
| |
| getActiveSession | back to summary |
|---|---|
| protected Session getActiveSession() | |
| getDatabaseQuery | back to summary |
|---|---|
| public DatabaseQuery getDatabaseQuery() Return the wrapped
| |
| getDatabaseQueryInternal | back to summary |
|---|---|
| public DatabaseQuery getDatabaseQueryInternal() INTERNAL: Return the cached database query for this EJBQueryImpl. If the query is a named query and it has not yet been looked up, the query will be looked up and stored as the cached query. | |
| getDetailedException | back to summary |
|---|---|
| protected RuntimeException getDetailedException(DatabaseException e) Given a DatabaseException, this method will determine if we should throw a different more specific exception like a lock timeout exception. | |
| getEntityManager | back to summary |
|---|---|
| public JpaEntityManager getEntityManager() Return the entityManager this query is tied to. | |
| getFirstResult | back to summary |
|---|---|
public int getFirstResult()
| |
| getFlushMode | back to summary |
|---|---|
public FlushModeType getFlushMode()
| |
| getHints | back to summary |
|---|---|
public Map
| |
| getInternalParameters | back to summary |
|---|---|
| protected Map Return the internal map of parameters. | |
| getLockMode | back to summary |
|---|---|
| public LockModeType getLockMode() Get the current lock mode for the query.
| |
| getMaxResults | back to summary |
|---|---|
public int getMaxResults()
| |
| getMaxResultsInternal | back to summary |
|---|---|
public int getMaxResultsInternal()
| |
| getParameter | back to summary |
|---|---|
public <T> Parameter
| |
| getParameter | back to summary |
|---|---|
public <T> Parameter
| |
| getParameter | back to summary |
|---|---|
public Parameter
| |
| getParameter | back to summary |
|---|---|
public Parameter
| |
| getParameterId | back to summary |
|---|---|
| public static String getParameterId(Parameter<T> param) Return the identifier of this parameter. This will be the name if it is set, else it will be the position | |
| getParameters | back to summary |
|---|---|
public Set
| |
| getParameterValue | back to summary |
|---|---|
public <T> T getParameterValue(Parameter<T> param)
| |
| getParameterValue | back to summary |
|---|---|
| public Object getParameterValue(String name) Return the value bound to the named parameter.
| |
| getParameterValue | back to summary |
|---|---|
| public Object getParameterValue(int position) Return the value bound to the positional parameter.
| |
| getResultList | back to summary |
|---|---|
| public List Execute the query and return the query results as a List.
| |
| getSingleResult | back to summary |
|---|---|
| public Object getSingleResult() Execute a SELECT query that returns a single untyped result.
| |
| getSupportedHints | back to summary |
|---|---|
public Set
| |
| isBound | back to summary |
|---|---|
| public boolean isBound(Parameter<?> param) Return a boolean indicating whether a value has been bound to the parameter.
| |
| isFlushModeAUTO | back to summary |
|---|---|
| protected boolean isFlushModeAUTO() Spec. 3.5.2: "FlushMode.AUTO is set on the Query object, or if the flush mode setting for the persistence context is AUTO (the default) and a flush mode setting has not been specified for the Query object, the persistence provider is responsible for ensuring that all updates to the state of all entities in the persistence context which could potentially affect the result of the query are visible to the processing of the query." | |
| isValidActualParameter | back to summary |
|---|---|
| protected boolean isValidActualParameter(Object value, Class<?> parameterType) | |
| performPreQueryFlush | back to summary |
|---|---|
| protected void performPreQueryFlush() | |
| processParameters | back to summary |
|---|---|
| protected List Internal method to add the parameters values to the query prior to execution. Returns a list of parameter values in the order the parameters are defined for the databaseQuery. | |
| propagateResultProperties | back to summary |
|---|---|
| protected void propagateResultProperties() Configure the firstResult, maxRows and lock mode in the EclipseLink ReadQuery. | |
| setAsDataModifyQuery | back to summary |
|---|---|
| protected void setAsDataModifyQuery() INTERNAL: Change the internal query to data modify query. | |
| setAsSQLModifyQuery | back to summary |
|---|---|
| protected void setAsSQLModifyQuery() Internal method to change the wrapped query to a DataModifyQuery if necessary. When created, the query is created as a DataReadQuery as it is unknown if it is a SELECT or UPDATE. Note that this prevents the original named query from every being prepared. | |
| setAsSQLReadQuery | back to summary |
|---|---|
| protected void setAsSQLReadQuery() Internal method to change the wrapped query to a DataReadQuery if necessary. This should never occur, but could possibly if the same query was executed as executeUpdate() then as getResultList(). Note that the initial conversion to modify would loose any read settings that had been set. | |
| setDatabaseQuery | back to summary |
|---|---|
| public void setDatabaseQuery(DatabaseQuery query) Replace the cached query with the given query. | |
| setFirstResult | back to summary |
|---|---|
| public QueryImpl setFirstResult(int startPosition) Set the position of the first result to retrieve.
| |
| setFirstResultInternal | back to summary |
|---|---|
| protected void setFirstResultInternal(int startPosition) Set the position of the first result to retrieve.
| |
| setFlushMode | back to summary |
|---|---|
| public QueryImpl setFlushMode(FlushModeType flushMode) Set the flush mode type to be used for the query execution. | |
| setHintInternal | back to summary |
|---|---|
| protected void setHintInternal(String hintName, Object value) Set an implementation-specific hint. If the hint name is not recognized, it is silently ignored.
| |
| setLockMode | back to summary |
|---|---|
| public QueryImpl setLockMode(LockModeType lockMode) Set the lock mode type to be used for the query execution.
| |
| setMaxResults | back to summary |
|---|---|
| public QueryImpl setMaxResults(int maxResult) Set the maximum number of results to retrieve.
| |
| setMaxResultsInternal | back to summary |
|---|---|
| public void setMaxResultsInternal(int maxResult) Set the maximum number of results to retrieve. | |
| setParameterInternal | back to summary |
|---|---|
| protected void setParameterInternal(int position, Object value) Bind an argument to a positional parameter. | |
| setParameterInternal | back to summary |
|---|---|
| protected void setParameterInternal(String name, Object value, boolean isIndex) Bind an argument to a named or indexed parameter. | |
| setRollbackOnly | back to summary |
|---|---|
| protected void setRollbackOnly() | |
| throwNonUniqueResultException | back to summary |
|---|---|
| protected void throwNonUniqueResultException(String message) | |
| throwNoResultException | back to summary |
|---|---|
| protected void throwNoResultException(String message) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| unwrap | back to summary |
|---|---|
| public <T> T unwrap(Class<T> cls) Unwrap the query into the JPA implementation classes/interfaces or the underlying native EclipseLink query.
| |