Modifier and Type | Method and Description |
---|---|
protected java.sql.ResultSet |
executeQuery()
Executes the query returning a result set.
|
int |
executeUpdate()
Execute an update or delete.
|
int |
getFirstResult()
The first to retrieve.
|
FlushModeType |
getFlushMode()
Gets the flush type.
|
java.util.Map |
getHints()
Returns the implementation-specific hints
|
LockModeType |
getLockMode()
Gets the lock type.
|
int |
getMaxResults()
The maximum number of results to retrieve.
|
java.util.Map |
getNamedParameters()
Returns the named parameters as a map
|
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 |
getPositionalParameters()
Returns the positional parameters as a list
|
java.util.List |
getResultList()
Execute the query and return as a List.
|
java.lang.Object |
getSingleResult()
Returns a single result.
|
java.util.Set<java.lang.String> |
getSupportedHints()
Returns the supported hints
|
boolean |
isBound(Parameter<?> param) |
Query |
setDouble(int index,
double value)
Sets an indexed parameter.
|
Query |
setFirstResult(int startPosition)
Sets the position of the first result.
|
Query |
setFlushMode(FlushModeType mode)
Sets the flush mode type.
|
Query |
setHint(java.lang.String hintName,
java.lang.Object value)
Sets a hint.
|
Query |
setLockMode(LockModeType lockMode)
Sets the lock type.
|
Query |
setMaxResults(int maxResults)
Sets the maximum result returned.
|
protected void |
setNativeSql(java.lang.String sql)
Sets the sql for native queries.
|
Query |
setParameter(int index,
java.util.Calendar value,
TemporalType type)
Sets a calendar parameter.
|
Query |
setParameter(int index,
java.util.Date value,
TemporalType type)
Sets a date parameter.
|
Query |
setParameter(int index,
java.lang.Object value)
Sets an indexed 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 value,
TemporalType type)
Sets a calendar parameter.
|
Query |
setParameter(java.lang.String name,
java.util.Date value,
TemporalType type)
Sets a date parameter.
|
Query |
setParameter(java.lang.String name,
java.lang.Object value)
Sets a named parameter.
|
protected void |
setSqlResultSetMapping(SqlResultSetMappingConfig map)
Sets the sql result set mapping for native queries.
|
<T> T |
unwrap(java.lang.Class<T> cl) |
public java.util.List getResultList()
getResultList
in interface Query
public java.lang.Object getSingleResult()
getSingleResult
in interface Query
public int executeUpdate()
executeUpdate
in interface Query
protected java.sql.ResultSet executeQuery() throws java.sql.SQLException
java.sql.SQLException
public Query setMaxResults(int maxResults)
setMaxResults
in interface Query
public Query setFirstResult(int startPosition)
setFirstResult
in interface Query
public Query setHint(java.lang.String hintName, java.lang.Object value)
public Query setParameter(java.lang.String name, java.lang.Object value)
setParameter
in interface Query
public Query setParameter(java.lang.String name, java.util.Date value, TemporalType type)
setParameter
in interface Query
public Query setParameter(java.lang.String name, java.util.Calendar value, TemporalType type)
setParameter
in interface Query
public Query setParameter(int index, java.lang.Object value)
setParameter
in interface Query
public Query setParameter(int index, java.util.Date value, TemporalType type)
setParameter
in interface Query
public Query setParameter(int index, java.util.Calendar value, TemporalType type)
setParameter
in interface Query
public Query setFlushMode(FlushModeType mode)
setFlushMode
in interface Query
public Query setDouble(int index, double value)
protected void setNativeSql(java.lang.String sql) throws java.sql.SQLException
java.sql.SQLException
protected void setSqlResultSetMapping(SqlResultSetMappingConfig map)
public int getMaxResults()
getMaxResults
in interface Query
public int getFirstResult()
getFirstResult
in interface Query
public java.util.Map getHints()
public java.util.Set<java.lang.String> getSupportedHints()
public java.util.Map getNamedParameters()
public java.util.List getPositionalParameters()
public FlushModeType getFlushMode()
getFlushMode
in interface Query
public Query setLockMode(LockModeType lockMode)
setLockMode
in interface Query
public LockModeType getLockMode()
getLockMode
in interface Query
public Parameter<?> getParameter(java.lang.String name)
getParameter
in interface Query
public <T> Parameter<T> getParameter(java.lang.String name, java.lang.Class<T> type)
getParameter
in interface Query
public Parameter<?> getParameter(int pos)
getParameter
in interface Query
public <T> Parameter<T> getParameter(int position, java.lang.Class<T> type)
getParameter
in interface Query
public <T> T getParameterValue(Parameter<T> param)
getParameterValue
in interface Query
public java.lang.Object getParameterValue(java.lang.String name)
getParameterValue
in interface Query
public java.lang.Object getParameterValue(int position)
getParameterValue
in interface Query
public java.util.Set<Parameter<?>> getParameters()
getParameters
in interface Query
public <T> Query setParameter(Parameter<T> param, T value)
Query
setParameter
in interface Query
public Query setParameter(Parameter<java.util.Calendar> param, java.util.Calendar date, TemporalType type)
Query
setParameter
in interface Query
public Query setParameter(Parameter<java.util.Date> param, java.util.Date value, TemporalType temporalType)
Query
setParameter
in interface Query