public class EJBQueryImpl extends EJBQueryImpl implements EJBQuery
databaseQuery, entityManager, firstResultIndex, maxResults, maxRows, parameters, queryName
Modifier | Constructor and Description |
---|---|
|
EJBQueryImpl(DatabaseQuery query,
EntityManagerImpl entityManager)
Create an EJBQueryImpl with a TopLink query.
|
protected |
EJBQueryImpl(EntityManagerImpl entityManager)
Base constructor for EJBQueryImpl.
|
|
EJBQueryImpl(String ejbql,
EntityManagerImpl entityManager)
Build an EJBQueryImpl based on the given ejbql string
|
|
EJBQueryImpl(String queryDescription,
EntityManagerImpl entityManager,
boolean isNamedQuery)
Create an EJBQueryImpl with either a query name or an ejbql string
|
Modifier and Type | Method and Description |
---|---|
protected Object |
convertTemporalType(Object value,
TemporalType type)
Convert the given object to the class represented by the given temporal type.
|
EntityManager |
getEntityManager()
Return the entityManager this query is tied to.
|
Query |
setFirstResult(int startPosition)
Set the position of the first result to retrieve.
|
Query |
setFlushMode(FlushModeType flushMode)
Set the flush mode type to be used for the query execution.
|
Query |
setHint(String hintName,
Object value)
Set an implementation-specific hint.
|
Query |
setMaxResults(int maxResult)
Set the maximum number of results to retrieve.
|
Query |
setParameter(int position,
Calendar value,
TemporalType temporalType)
Bind an instance of java.util.Calendar to a positional parameter.
|
Query |
setParameter(int position,
Date value,
TemporalType temporalType)
Bind an instance of java.util.Date to a positional parameter.
|
Query |
setParameter(int position,
Object value)
Bind an argument to a positional parameter.
|
Query |
setParameter(String name,
Calendar value,
TemporalType temporalType)
Bind an instance of java.util.Calendar to a named parameter.
|
Query |
setParameter(String name,
Date value,
TemporalType temporalType)
Bind an instance of java.util.Date to a named parameter.
|
Query |
setParameter(String name,
Object value)
Bind an argument to a named parameter.
|
protected void |
throwNonUniqueResultException(String message) |
protected void |
throwNoResultException(String message) |
applyHints, buildEJBQLDatabaseQuery, buildEJBQLDatabaseQuery, buildEJBQLDatabaseQuery, buildEJBQLDatabaseQuery, buildEJBQLDatabaseQuery, buildEJBQLDatabaseQuery, buildSQLDatabaseQuery, buildSQLDatabaseQuery, buildSQLDatabaseQuery, buildSQLDatabaseQuery, buildSQLDatabaseQuery, buildSQLDatabaseQuery, executeReadQuery, executeUpdate, getActiveSession, getDatabaseQuery, getResultCollection, getResultList, getSingleResult, isFlushModeAUTO, isValidActualParameter, performPreQueryFlush, processParameters, propagateResultProperties, setAsSQLModifyQuery, setAsSQLReadQuery, setDatabaseQuery, setFirstResultInternal, setHintInternal, setMaxResultsInternal, setParameterInternal, setParameterInternal, setRollbackOnly
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatabaseQuery, getResultCollection, setDatabaseQuery
executeUpdate, getResultList, getSingleResult
protected EJBQueryImpl(EntityManagerImpl entityManager)
public EJBQueryImpl(DatabaseQuery query, EntityManagerImpl entityManager)
query
- entityManager
- public EJBQueryImpl(String ejbql, EntityManagerImpl entityManager)
ejbql
- entityManager
- public EJBQueryImpl(String queryDescription, EntityManagerImpl entityManager, boolean isNamedQuery)
queryDescription
- entityManager
- isNamedQuery
- determines whether to treat the query description as ejbql or a query nameprotected Object convertTemporalType(Object value, TemporalType type)
public EntityManager getEntityManager()
getEntityManager
in interface EJBQuery
public Query setFirstResult(int startPosition)
setFirstResult
in interface Query
start
- position of the first result, numbered from 0public Query setFlushMode(FlushModeType flushMode)
setFlushMode
in interface Query
flushMode
- public Query setHint(String hintName, Object value)
setHint
in interface Query
hintName
- value
- IllegalArgumentException
- if the second argument is not
valid for the implementationpublic Query setMaxResults(int maxResult)
setMaxResults
in interface Query
maxResult
- public Query setParameter(String name, Object value)
setParameter
in interface Query
name
- the parameter namevalue
- public Query setParameter(String name, Date value, TemporalType temporalType)
setParameter
in interface Query
name
- value
- temporalType
- public Query setParameter(String name, Calendar value, TemporalType temporalType)
setParameter
in interface Query
name
- value
- temporalType
- public Query setParameter(int position, Object value)
setParameter
in interface Query
position
- value
- public Query setParameter(int position, Date value, TemporalType temporalType)
setParameter
in interface Query
position
- value
- Query API Enterprise JavaBeans 3.0, Early Draft Entity Beans
Sun Microsystems InctemporalType
- public Query setParameter(int position, Calendar value, TemporalType temporalType)
setParameter
in interface Query
position
- value
- temporalType
- protected void throwNoResultException(String message)
throwNoResultException
in class EJBQueryImpl
protected void throwNonUniqueResultException(String message)
throwNonUniqueResultException
in class EJBQueryImpl
Copyright © 2023. All rights reserved.