public interface Query
Modifier and Type | Method and Description |
---|---|
int |
executeUpdate()
An update or delete query.
|
int |
getFirstResult()
The first to retrieve.
|
FlushModeType |
getFlushMode()
Gets the flush type.
|
java.util.Map<java.lang.String,java.lang.Object> |
getHints()
Returns the implementation-specific hints
|
LockModeType |
getLockMode()
Gets the lock type.
|
int |
getMaxResults()
The maximum number of results to retrieve.
|
Parameter<?> |
getParameter(int pos) |
<T> Parameter<T> |
getParameter(int position,
java.lang.Class<T> type) |
Parameter<?> |
getParameter(java.lang.String name) |
<T> Parameter<T> |
getParameter(java.lang.String name,
java.lang.Class<T> type) |
java.util.Set<Parameter<?>> |
getParameters() |
java.lang.Object |
getParameterValue(int position) |
<T> T |
getParameterValue(Parameter<T> param) |
java.lang.Object |
getParameterValue(java.lang.String name) |
java.util.List |
getResultList()
Executes a SELECT and return the results as a list.
|
java.lang.Object |
getSingleResult()
Returns the single result of a query.
|
boolean |
isBound(Parameter<?> param) |
Query |
setFirstResult(int startPosition)
Sets the first result.
|
Query |
setFlushMode(FlushModeType flushMode)
Sets the flush type.
|
Query |
setHint(java.lang.String hintName,
java.lang.Object value)
An implementation-specific hint.
|
Query |
setLockMode(LockModeType lockMode)
Sets the lock type.
|
Query |
setMaxResults(int maxResult)
The maximum number of results to retrieve.
|
Query |
setParameter(int pos,
java.util.Calendar date,
TemporalType type)
Sets a calendar parameter.
|
Query |
setParameter(int pos,
java.util.Date date,
TemporalType type)
Sets a date parameter.
|
Query |
setParameter(int pos,
java.lang.Object value)
Binds a position parameter.
|
Query |
setParameter(Parameter<java.util.Calendar> param,
java.util.Calendar date,
TemporalType type)
Sets a calendar parameter.
|
Query |
setParameter(Parameter<java.util.Date> param,
java.util.Date value,
TemporalType temporalType)
Sets a date parameter.
|
<T> Query |
setParameter(Parameter<T> param,
T value)
Binds a named parameter.
|
Query |
setParameter(java.lang.String name,
java.util.Calendar date,
TemporalType type)
Sets a calendar parameter.
|
Query |
setParameter(java.lang.String name,
java.util.Date date,
TemporalType type)
Sets a date parameter.
|
Query |
setParameter(java.lang.String name,
java.lang.Object value)
Binds a position parameter.
|
<T> T |
unwrap(java.lang.Class<T> cl) |
java.util.List getResultList()
java.lang.Object getSingleResult()
int executeUpdate()
Query setMaxResults(int maxResult)
int getMaxResults()
Query setFirstResult(int startPosition)
int getFirstResult()
Query setHint(java.lang.String hintName, java.lang.Object value)
java.util.Map<java.lang.String,java.lang.Object> getHints()
Query setParameter(Parameter<java.util.Calendar> param, java.util.Calendar date, TemporalType type)
Query setParameter(Parameter<java.util.Date> param, java.util.Date value, TemporalType temporalType)
Query setParameter(java.lang.String name, java.lang.Object value)
Query setParameter(int pos, java.lang.Object value)
Query setParameter(java.lang.String name, java.util.Calendar date, TemporalType type)
Query setParameter(java.lang.String name, java.util.Date date, TemporalType type)
Query setParameter(int pos, java.util.Date date, TemporalType type)
Query setParameter(int pos, java.util.Calendar date, TemporalType type)
java.util.Set<Parameter<?>> getParameters()
Parameter<?> getParameter(java.lang.String name)
<T> Parameter<T> getParameter(java.lang.String name, java.lang.Class<T> type)
Parameter<?> getParameter(int pos)
<T> Parameter<T> getParameter(int position, java.lang.Class<T> type)
boolean isBound(Parameter<?> param)
<T> T getParameterValue(Parameter<T> param)
java.lang.Object getParameterValue(java.lang.String name)
java.lang.Object getParameterValue(int position)
Query setFlushMode(FlushModeType flushMode)
FlushModeType getFlushMode()
Query setLockMode(LockModeType lockMode)
LockModeType getLockMode()
<T> T unwrap(java.lang.Class<T> cl)