public class QueryImpl extends AbstractQueryImpl
CollectionFilterImpl
parameterMetadata, session
Constructor and Description |
---|
QueryImpl(String queryString,
FlushMode flushMode,
SessionImplementor session,
ParameterMetadata parameterMetadata) |
QueryImpl(String queryString,
SessionImplementor session,
ParameterMetadata parameterMetadata) |
Modifier and Type | Method and Description |
---|---|
int |
executeUpdate()
Execute the update or delete statement.
|
LockOptions |
getLockOptions()
Obtains the LockOptions in effect for this query.
|
boolean |
isSelect() |
Iterator |
iterate()
Return the query results as an Iterator.
|
List |
list()
Return the query results as a List.
|
ScrollableResults |
scroll()
Return the query results as ScrollableResults.
|
ScrollableResults |
scroll(ScrollMode scrollMode)
Return the query results as ScrollableResults.
|
Query |
setLockMode(String alias,
LockMode lockMode)
Set the LockMode to use for specific alias (as defined in the query's FROM clause).
|
Query |
setLockOptions(LockOptions lockOption)
Set the lock options for the query.
|
addQueryHint, after, applyEntityGraphQueryHint, before, determineType, determineType, determineType, determineType, determineType, expandParameterLists, getCacheMode, getCacheRegion, getComment, getFetchSize, getFirstResult, getFlushMode, getMaxResults, getNamedParameterLists, getNamedParameters, getNamedParams, getParameterMetadata, getQueryParameters, getQueryString, getReturnAliases, getReturnTypes, getRowSelection, getTimeout, getTypes, getValues, guessType, hasNamedParameters, isCacheable, isReadOnly, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCacheable, setCacheMode, setCacheRegion, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setCollectionKey, setComment, setDate, setDate, setDouble, setDouble, setEntity, setEntity, setFetchSize, setFirstResult, setFloat, setFloat, setFlushMode, setInteger, setInteger, setLocale, setLocale, setLong, setLong, setMaxResults, setOptionalEntityName, setOptionalId, setOptionalObject, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameters, setProperties, setProperties, setReadOnly, setResultTransformer, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimeout, setTimestamp, setTimestamp, toString, typeArray, uniqueResult, valueArray, verifyParameters, verifyParameters
public QueryImpl(String queryString, FlushMode flushMode, SessionImplementor session, ParameterMetadata parameterMetadata)
public QueryImpl(String queryString, SessionImplementor session, ParameterMetadata parameterMetadata)
public Iterator iterate() throws HibernateException
Query
HibernateException
public ScrollableResults scroll() throws HibernateException
Query
HibernateException
ScrollableResults
public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException
Query
scrollMode
- The scroll modeHibernateException
ScrollableResults
,
ScrollMode
public List list() throws HibernateException
Query
HibernateException
public int executeUpdate() throws HibernateException
Query
HibernateException
public Query setLockMode(String alias, LockMode lockMode)
Query
LockOptions
.
The effect of these alias-specific LockModes is somewhat dependent on the driver/database in use. Generally
speaking, for maximum portability, this method should only be used to mark that the rows corresponding to
the given alias should be included in pessimistic locking (LockMode.PESSIMISTIC_WRITE
).alias
- a query alias, or "this"
for a collection filterlockMode
- The lock mode to apply.this
, for method chainingQuery.getLockOptions()
public Query setLockOptions(LockOptions lockOption)
Query
Query.setLockMode(String, LockMode)
.lockOption
- The lock options to apply to the query.this
, for method chainingQuery.getLockOptions()
public LockOptions getLockOptions()
Query
getLockOptions
in interface Query
getLockOptions
in class AbstractQueryImpl
LockOptions
public boolean isSelect()
Copyright © 2016 JBoss by Red Hat. All rights reserved.