2.17.2: 2011-06-17

net.sf.basedb.core.hibernate
Class QueryWrapper

java.lang.Object
  extended by net.sf.basedb.core.hibernate.QueryWrapper
All Implemented Interfaces:
org.hibernate.Query
Direct Known Subclasses:
EntityQueryWrapper

public class QueryWrapper
extends Object
implements org.hibernate.Query

A simple wrapper around hibernate queries which simply forwards all calls to a parent query.

Version:
2.5
Author:
nicklas
Last modified
$Date: 2010-02-16 09:29:34 +0100 (Tue, 16 Feb 2010) $

Field Summary
protected  org.hibernate.Query query
           
 
Constructor Summary
QueryWrapper(org.hibernate.Query query)
           
 
Method Summary
 int executeUpdate()
           
 String[] getNamedParameters()
           
 String getQueryString()
           
 String[] getReturnAliases()
           
 org.hibernate.type.Type[] getReturnTypes()
           
 boolean isReadOnly()
           
 Iterator iterate()
           
 List list()
           
 org.hibernate.ScrollableResults scroll()
           
 org.hibernate.ScrollableResults scroll(org.hibernate.ScrollMode scrollMode)
           
 org.hibernate.Query setBigDecimal(int position, BigDecimal number)
           
 org.hibernate.Query setBigDecimal(String name, BigDecimal number)
           
 org.hibernate.Query setBigInteger(int position, BigInteger number)
           
 org.hibernate.Query setBigInteger(String name, BigInteger number)
           
 org.hibernate.Query setBinary(int position, byte[] val)
           
 org.hibernate.Query setBinary(String name, byte[] val)
           
 org.hibernate.Query setBoolean(int position, boolean val)
           
 org.hibernate.Query setBoolean(String name, boolean val)
           
 org.hibernate.Query setByte(int position, byte val)
           
 org.hibernate.Query setByte(String name, byte val)
           
 org.hibernate.Query setCacheable(boolean cacheable)
           
 org.hibernate.Query setCacheMode(org.hibernate.CacheMode cacheMode)
           
 org.hibernate.Query setCacheRegion(String cacheRegion)
           
 org.hibernate.Query setCalendar(int position, Calendar calendar)
           
 org.hibernate.Query setCalendar(String name, Calendar calendar)
           
 org.hibernate.Query setCalendarDate(int position, Calendar calendar)
           
 org.hibernate.Query setCalendarDate(String name, Calendar calendar)
           
 org.hibernate.Query setCharacter(int position, char val)
           
 org.hibernate.Query setCharacter(String name, char val)
           
 org.hibernate.Query setComment(String comment)
           
 org.hibernate.Query setDate(int position, Date date)
           
 org.hibernate.Query setDate(String name, Date date)
           
 org.hibernate.Query setDouble(int position, double val)
           
 org.hibernate.Query setDouble(String name, double val)
           
 org.hibernate.Query setEntity(int position, Object val)
           
 org.hibernate.Query setEntity(String name, Object val)
           
 org.hibernate.Query setFetchSize(int fetchSize)
           
 org.hibernate.Query setFirstResult(int firstResult)
           
 org.hibernate.Query setFloat(int position, float val)
           
 org.hibernate.Query setFloat(String name, float val)
           
 org.hibernate.Query setFlushMode(org.hibernate.FlushMode flushMode)
           
 org.hibernate.Query setInteger(int position, int val)
           
 org.hibernate.Query setInteger(String name, int val)
           
 org.hibernate.Query setLocale(int position, Locale locale)
           
 org.hibernate.Query setLocale(String name, Locale locale)
           
 org.hibernate.Query setLockMode(String alias, org.hibernate.LockMode lockMode)
           
 org.hibernate.Query setLockOptions(org.hibernate.LockOptions lockOptions)
           
 org.hibernate.Query setLong(int position, long val)
           
 org.hibernate.Query setLong(String name, long val)
           
 org.hibernate.Query setMaxResults(int maxResults)
           
 org.hibernate.Query setParameter(int position, Object val)
           
 org.hibernate.Query setParameter(int position, Object val, org.hibernate.type.Type type)
           
 org.hibernate.Query setParameter(String name, Object val)
           
 org.hibernate.Query setParameter(String name, Object val, org.hibernate.type.Type type)
           
 org.hibernate.Query setParameterList(String name, Collection vals)
           
 org.hibernate.Query setParameterList(String name, Collection vals, org.hibernate.type.Type type)
           
 org.hibernate.Query setParameterList(String name, Object[] vals)
           
 org.hibernate.Query setParameterList(String name, Object[] vals, org.hibernate.type.Type type)
           
 org.hibernate.Query setParameters(Object[] values, org.hibernate.type.Type[] types)
           
 org.hibernate.Query setProperties(Map bean)
           
 org.hibernate.Query setProperties(Object bean)
           
 org.hibernate.Query setReadOnly(boolean readOnly)
           
 org.hibernate.Query setResultTransformer(org.hibernate.transform.ResultTransformer transformer)
           
 org.hibernate.Query setSerializable(int position, Serializable val)
           
 org.hibernate.Query setSerializable(String name, Serializable val)
           
 org.hibernate.Query setShort(int position, short val)
           
 org.hibernate.Query setShort(String name, short val)
           
 org.hibernate.Query setString(int position, String val)
           
 org.hibernate.Query setString(String name, String val)
           
 org.hibernate.Query setText(int position, String val)
           
 org.hibernate.Query setText(String name, String val)
           
 org.hibernate.Query setTime(int position, Date date)
           
 org.hibernate.Query setTime(String name, Date date)
           
 org.hibernate.Query setTimeout(int timeout)
           
 org.hibernate.Query setTimestamp(int position, Date date)
           
 org.hibernate.Query setTimestamp(String name, Date date)
           
 Object uniqueResult()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

protected final org.hibernate.Query query
Constructor Detail

QueryWrapper

public QueryWrapper(org.hibernate.Query query)
Method Detail

executeUpdate

public int executeUpdate()
                  throws org.hibernate.HibernateException
Specified by:
executeUpdate in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

getNamedParameters

public String[] getNamedParameters()
                            throws org.hibernate.HibernateException
Specified by:
getNamedParameters in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

getQueryString

public String getQueryString()
Specified by:
getQueryString in interface org.hibernate.Query

getReturnAliases

public String[] getReturnAliases()
                          throws org.hibernate.HibernateException
Specified by:
getReturnAliases in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

getReturnTypes

public org.hibernate.type.Type[] getReturnTypes()
                                         throws org.hibernate.HibernateException
Specified by:
getReturnTypes in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface org.hibernate.Query

iterate

public Iterator iterate()
                 throws org.hibernate.HibernateException
Specified by:
iterate in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

list

public List list()
          throws org.hibernate.HibernateException
Specified by:
list in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

scroll

public org.hibernate.ScrollableResults scroll()
                                       throws org.hibernate.HibernateException
Specified by:
scroll in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

scroll

public org.hibernate.ScrollableResults scroll(org.hibernate.ScrollMode scrollMode)
                                       throws org.hibernate.HibernateException
Specified by:
scroll in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setBigDecimal

public org.hibernate.Query setBigDecimal(int position,
                                         BigDecimal number)
Specified by:
setBigDecimal in interface org.hibernate.Query

setBigDecimal

public org.hibernate.Query setBigDecimal(String name,
                                         BigDecimal number)
Specified by:
setBigDecimal in interface org.hibernate.Query

setBigInteger

public org.hibernate.Query setBigInteger(int position,
                                         BigInteger number)
Specified by:
setBigInteger in interface org.hibernate.Query

setBigInteger

public org.hibernate.Query setBigInteger(String name,
                                         BigInteger number)
Specified by:
setBigInteger in interface org.hibernate.Query

setBinary

public org.hibernate.Query setBinary(int position,
                                     byte[] val)
Specified by:
setBinary in interface org.hibernate.Query

setBinary

public org.hibernate.Query setBinary(String name,
                                     byte[] val)
Specified by:
setBinary in interface org.hibernate.Query

setBoolean

public org.hibernate.Query setBoolean(int position,
                                      boolean val)
Specified by:
setBoolean in interface org.hibernate.Query

setBoolean

public org.hibernate.Query setBoolean(String name,
                                      boolean val)
Specified by:
setBoolean in interface org.hibernate.Query

setByte

public org.hibernate.Query setByte(int position,
                                   byte val)
Specified by:
setByte in interface org.hibernate.Query

setByte

public org.hibernate.Query setByte(String name,
                                   byte val)
Specified by:
setByte in interface org.hibernate.Query

setCacheMode

public org.hibernate.Query setCacheMode(org.hibernate.CacheMode cacheMode)
Specified by:
setCacheMode in interface org.hibernate.Query

setCacheRegion

public org.hibernate.Query setCacheRegion(String cacheRegion)
Specified by:
setCacheRegion in interface org.hibernate.Query

setCacheable

public org.hibernate.Query setCacheable(boolean cacheable)
Specified by:
setCacheable in interface org.hibernate.Query

setCalendar

public org.hibernate.Query setCalendar(int position,
                                       Calendar calendar)
Specified by:
setCalendar in interface org.hibernate.Query

setCalendar

public org.hibernate.Query setCalendar(String name,
                                       Calendar calendar)
Specified by:
setCalendar in interface org.hibernate.Query

setCalendarDate

public org.hibernate.Query setCalendarDate(int position,
                                           Calendar calendar)
Specified by:
setCalendarDate in interface org.hibernate.Query

setCalendarDate

public org.hibernate.Query setCalendarDate(String name,
                                           Calendar calendar)
Specified by:
setCalendarDate in interface org.hibernate.Query

setCharacter

public org.hibernate.Query setCharacter(int position,
                                        char val)
Specified by:
setCharacter in interface org.hibernate.Query

setCharacter

public org.hibernate.Query setCharacter(String name,
                                        char val)
Specified by:
setCharacter in interface org.hibernate.Query

setComment

public org.hibernate.Query setComment(String comment)
Specified by:
setComment in interface org.hibernate.Query

setDate

public org.hibernate.Query setDate(int position,
                                   Date date)
Specified by:
setDate in interface org.hibernate.Query

setDate

public org.hibernate.Query setDate(String name,
                                   Date date)
Specified by:
setDate in interface org.hibernate.Query

setDouble

public org.hibernate.Query setDouble(int position,
                                     double val)
Specified by:
setDouble in interface org.hibernate.Query

setDouble

public org.hibernate.Query setDouble(String name,
                                     double val)
Specified by:
setDouble in interface org.hibernate.Query

setEntity

public org.hibernate.Query setEntity(int position,
                                     Object val)
Specified by:
setEntity in interface org.hibernate.Query

setEntity

public org.hibernate.Query setEntity(String name,
                                     Object val)
Specified by:
setEntity in interface org.hibernate.Query

setFetchSize

public org.hibernate.Query setFetchSize(int fetchSize)
Specified by:
setFetchSize in interface org.hibernate.Query

setFirstResult

public org.hibernate.Query setFirstResult(int firstResult)
Specified by:
setFirstResult in interface org.hibernate.Query

setFloat

public org.hibernate.Query setFloat(int position,
                                    float val)
Specified by:
setFloat in interface org.hibernate.Query

setFloat

public org.hibernate.Query setFloat(String name,
                                    float val)
Specified by:
setFloat in interface org.hibernate.Query

setFlushMode

public org.hibernate.Query setFlushMode(org.hibernate.FlushMode flushMode)
Specified by:
setFlushMode in interface org.hibernate.Query

setInteger

public org.hibernate.Query setInteger(int position,
                                      int val)
Specified by:
setInteger in interface org.hibernate.Query

setInteger

public org.hibernate.Query setInteger(String name,
                                      int val)
Specified by:
setInteger in interface org.hibernate.Query

setLocale

public org.hibernate.Query setLocale(int position,
                                     Locale locale)
Specified by:
setLocale in interface org.hibernate.Query

setLocale

public org.hibernate.Query setLocale(String name,
                                     Locale locale)
Specified by:
setLocale in interface org.hibernate.Query

setLockMode

public org.hibernate.Query setLockMode(String alias,
                                       org.hibernate.LockMode lockMode)
Specified by:
setLockMode in interface org.hibernate.Query

setLockOptions

public org.hibernate.Query setLockOptions(org.hibernate.LockOptions lockOptions)
Specified by:
setLockOptions in interface org.hibernate.Query

setLong

public org.hibernate.Query setLong(int position,
                                   long val)
Specified by:
setLong in interface org.hibernate.Query

setLong

public org.hibernate.Query setLong(String name,
                                   long val)
Specified by:
setLong in interface org.hibernate.Query

setMaxResults

public org.hibernate.Query setMaxResults(int maxResults)
Specified by:
setMaxResults in interface org.hibernate.Query

setParameter

public org.hibernate.Query setParameter(int position,
                                        Object val)
                                 throws org.hibernate.HibernateException
Specified by:
setParameter in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setParameter

public org.hibernate.Query setParameter(String name,
                                        Object val)
                                 throws org.hibernate.HibernateException
Specified by:
setParameter in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setParameter

public org.hibernate.Query setParameter(int position,
                                        Object val,
                                        org.hibernate.type.Type type)
Specified by:
setParameter in interface org.hibernate.Query

setParameter

public org.hibernate.Query setParameter(String name,
                                        Object val,
                                        org.hibernate.type.Type type)
Specified by:
setParameter in interface org.hibernate.Query

setParameterList

public org.hibernate.Query setParameterList(String name,
                                            Collection vals)
                                     throws org.hibernate.HibernateException
Specified by:
setParameterList in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setParameterList

public org.hibernate.Query setParameterList(String name,
                                            Object[] vals)
                                     throws org.hibernate.HibernateException
Specified by:
setParameterList in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setParameterList

public org.hibernate.Query setParameterList(String name,
                                            Collection vals,
                                            org.hibernate.type.Type type)
                                     throws org.hibernate.HibernateException
Specified by:
setParameterList in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setParameterList

public org.hibernate.Query setParameterList(String name,
                                            Object[] vals,
                                            org.hibernate.type.Type type)
                                     throws org.hibernate.HibernateException
Specified by:
setParameterList in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setParameters

public org.hibernate.Query setParameters(Object[] values,
                                         org.hibernate.type.Type[] types)
                                  throws org.hibernate.HibernateException
Specified by:
setParameters in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setProperties

public org.hibernate.Query setProperties(Object bean)
                                  throws org.hibernate.HibernateException
Specified by:
setProperties in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setProperties

public org.hibernate.Query setProperties(Map bean)
                                  throws org.hibernate.HibernateException
Specified by:
setProperties in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

setReadOnly

public org.hibernate.Query setReadOnly(boolean readOnly)
Specified by:
setReadOnly in interface org.hibernate.Query

setResultTransformer

public org.hibernate.Query setResultTransformer(org.hibernate.transform.ResultTransformer transformer)
Specified by:
setResultTransformer in interface org.hibernate.Query

setSerializable

public org.hibernate.Query setSerializable(int position,
                                           Serializable val)
Specified by:
setSerializable in interface org.hibernate.Query

setSerializable

public org.hibernate.Query setSerializable(String name,
                                           Serializable val)
Specified by:
setSerializable in interface org.hibernate.Query

setShort

public org.hibernate.Query setShort(int position,
                                    short val)
Specified by:
setShort in interface org.hibernate.Query

setShort

public org.hibernate.Query setShort(String name,
                                    short val)
Specified by:
setShort in interface org.hibernate.Query

setString

public org.hibernate.Query setString(int position,
                                     String val)
Specified by:
setString in interface org.hibernate.Query

setString

public org.hibernate.Query setString(String name,
                                     String val)
Specified by:
setString in interface org.hibernate.Query

setText

public org.hibernate.Query setText(int position,
                                   String val)
Specified by:
setText in interface org.hibernate.Query

setText

public org.hibernate.Query setText(String name,
                                   String val)
Specified by:
setText in interface org.hibernate.Query

setTime

public org.hibernate.Query setTime(int position,
                                   Date date)
Specified by:
setTime in interface org.hibernate.Query

setTime

public org.hibernate.Query setTime(String name,
                                   Date date)
Specified by:
setTime in interface org.hibernate.Query

setTimeout

public org.hibernate.Query setTimeout(int timeout)
Specified by:
setTimeout in interface org.hibernate.Query

setTimestamp

public org.hibernate.Query setTimestamp(int position,
                                        Date date)
Specified by:
setTimestamp in interface org.hibernate.Query

setTimestamp

public org.hibernate.Query setTimestamp(String name,
                                        Date date)
Specified by:
setTimestamp in interface org.hibernate.Query

uniqueResult

public Object uniqueResult()
                    throws org.hibernate.HibernateException
Specified by:
uniqueResult in interface org.hibernate.Query
Throws:
org.hibernate.HibernateException

2.17.2: 2011-06-17