org.hibernate.ejb
Class AbstractQueryImpl<X>
java.lang.Object
org.hibernate.ejb.AbstractQueryImpl<X>
- All Implemented Interfaces:
- Query, TypedQuery<X>
- Direct Known Subclasses:
- QueryImpl
public abstract class AbstractQueryImpl<X>
- extends Object
- implements TypedQuery<X>
Intended as a base class providing convenience in implementing both Query
and
TypedQuery
.
IMPL NOTE : This issue, and the reason for this distinction, is that criteria and hl.sql queries share no
commonality currently in Hibernate internals.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.persistence.TypedQuery |
getResultList, getSingleResult, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter |
AbstractQueryImpl
public AbstractQueryImpl(HibernateEntityManagerImplementor entityManager)
getEntityManager
protected HibernateEntityManagerImplementor getEntityManager()
internalExecuteUpdate
protected abstract int internalExecuteUpdate()
- Actually execute the update; all pre-requisites have been checked.
- Returns:
- The number of "affected rows".
executeUpdate
public int executeUpdate()
- Specified by:
executeUpdate
in interface Query
applyMaxResults
protected abstract void applyMaxResults(int maxResults)
- Apply the given max results value.
- Parameters:
maxResults
- The specified max results
setMaxResults
public TypedQuery<X> setMaxResults(int maxResult)
- Specified by:
setMaxResults
in interface Query
- Specified by:
setMaxResults
in interface TypedQuery<X>
getSpecifiedMaxResults
public int getSpecifiedMaxResults()
getMaxResults
public int getMaxResults()
- Specified by:
getMaxResults
in interface Query
applyFirstResult
protected abstract void applyFirstResult(int firstResult)
- Apply the given first-result value.
- Parameters:
firstResult
- The specified first-result value.
setFirstResult
public TypedQuery<X> setFirstResult(int firstResult)
- Specified by:
setFirstResult
in interface Query
- Specified by:
setFirstResult
in interface TypedQuery<X>
getFirstResult
public int getFirstResult()
- Specified by:
getFirstResult
in interface Query
getHints
public Map<String,Object> getHints()
- Specified by:
getHints
in interface Query
applyTimeout
protected abstract void applyTimeout(int timeout)
applyLockTimeout
protected abstract void applyLockTimeout(int timeout)
applyComment
protected abstract void applyComment(String comment)
applyFetchSize
protected abstract void applyFetchSize(int fetchSize)
applyCacheable
protected abstract void applyCacheable(boolean isCacheable)
applyCacheRegion
protected abstract void applyCacheRegion(String regionName)
applyReadOnly
protected abstract void applyReadOnly(boolean isReadOnly)
applyCacheMode
protected abstract void applyCacheMode(CacheMode cacheMode)
applyFlushMode
protected abstract void applyFlushMode(FlushMode flushMode)
canApplyLockModes
protected abstract boolean canApplyLockModes()
applyAliasSpecificLockMode
protected abstract void applyAliasSpecificLockMode(String alias,
LockMode lockMode)
setHint
public TypedQuery<X> setHint(String hintName,
Object value)
- Specified by:
setHint
in interface Query
- Specified by:
setHint
in interface TypedQuery<X>
getSupportedHints
public Set<String> getSupportedHints()
setLockMode
public abstract TypedQuery<X> setLockMode(LockModeType lockModeType)
- Specified by:
setLockMode
in interface Query
- Specified by:
setLockMode
in interface TypedQuery<X>
getLockMode
public abstract LockModeType getLockMode()
- Specified by:
getLockMode
in interface Query
setFlushMode
public TypedQuery<X> setFlushMode(FlushModeType jpaFlushMode)
- Specified by:
setFlushMode
in interface Query
- Specified by:
setFlushMode
in interface TypedQuery<X>
getSpecifiedFlushMode
protected FlushModeType getSpecifiedFlushMode()
getFlushMode
public FlushModeType getFlushMode()
- Specified by:
getFlushMode
in interface Query
registerParameterBinding
protected void registerParameterBinding(Parameter parameter,
Object value)
isBound
public boolean isBound(Parameter<?> param)
- Specified by:
isBound
in interface Query
getParameterValue
public <T> T getParameterValue(Parameter<T> param)
- Specified by:
getParameterValue
in interface Query
getParameterValue
public Object getParameterValue(String name)
- Specified by:
getParameterValue
in interface Query
getParameterValue
public Object getParameterValue(int position)
- Specified by:
getParameterValue
in interface Query
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.