org.apache.geronimo.persistence
Class NoTxQueryWrapper

java.lang.Object
  extended by org.apache.geronimo.persistence.NoTxQueryWrapper
All Implemented Interfaces:
Query

public class NoTxQueryWrapper
extends Object
implements Query

The JtaQuery is a wrapper around a query and and entity manager that automatically closes the entity managers when the query is finished. This implementation is only for non-transaction queryies


Constructor Summary
NoTxQueryWrapper(EntityManager entityManager, Query query)
           
 
Method Summary
 int executeUpdate()
           
 List getResultList()
           
 Object getSingleResult()
           
 Query setFirstResult(int i)
           
 Query setFlushMode(FlushModeType flushModeType)
           
 Query setHint(String s, Object o)
           
 Query setMaxResults(int i)
           
 Query setParameter(int i, Calendar calendar, TemporalType temporalType)
           
 Query setParameter(int i, Date date, TemporalType temporalType)
           
 Query setParameter(int i, Object o)
           
 Query setParameter(String s, Calendar calendar, TemporalType temporalType)
           
 Query setParameter(String s, Date date, TemporalType temporalType)
           
 Query setParameter(String s, Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoTxQueryWrapper

public NoTxQueryWrapper(EntityManager entityManager,
                        Query query)
Method Detail

getResultList

public List getResultList()
Specified by:
getResultList in interface Query

getSingleResult

public Object getSingleResult()
Specified by:
getSingleResult in interface Query

executeUpdate

public int executeUpdate()
Specified by:
executeUpdate in interface Query

setMaxResults

public Query setMaxResults(int i)
Specified by:
setMaxResults in interface Query

setFirstResult

public Query setFirstResult(int i)
Specified by:
setFirstResult in interface Query

setFlushMode

public Query setFlushMode(FlushModeType flushModeType)
Specified by:
setFlushMode in interface Query

setHint

public Query setHint(String s,
                     Object o)
Specified by:
setHint in interface Query

setParameter

public Query setParameter(String s,
                          Object o)
Specified by:
setParameter in interface Query

setParameter

public Query setParameter(String s,
                          Date date,
                          TemporalType temporalType)
Specified by:
setParameter in interface Query

setParameter

public Query setParameter(String s,
                          Calendar calendar,
                          TemporalType temporalType)
Specified by:
setParameter in interface Query

setParameter

public Query setParameter(int i,
                          Object o)
Specified by:
setParameter in interface Query

setParameter

public Query setParameter(int i,
                          Date date,
                          TemporalType temporalType)
Specified by:
setParameter in interface Query

setParameter

public Query setParameter(int i,
                          Calendar calendar,
                          TemporalType temporalType)
Specified by:
setParameter in interface Query


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.