com.mysema.query.jdoql
Class AbstractJDOQLQuery<Q extends AbstractJDOQLQuery<Q>>

java.lang.Object
  extended by com.mysema.query.support.QueryBase<Q>
      extended by com.mysema.query.support.ProjectableQuery<Q>
          extended by com.mysema.query.jdoql.AbstractJDOQLQuery<Q>
Type Parameters:
Q -
All Implemented Interfaces:
Projectable, Closeable
Direct Known Subclasses:
JDOQLQueryImpl

public abstract class AbstractJDOQLQuery<Q extends AbstractJDOQLQuery<Q>>
extends ProjectableQuery<Q>
implements Closeable

Abstract base class for custom implementations of the JDOQLQuery interface.

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.support.QueryBase
queryMixin
 
Constructor Summary
AbstractJDOQLQuery(javax.jdo.PersistenceManager persistenceManager)
           
AbstractJDOQLQuery(javax.jdo.PersistenceManager persistenceManager, JDOQLTemplates templates, QueryMetadata metadata, boolean detach)
           
 
Method Summary
 Q addFetchGroup(String fetchGroupName)
           
 void close()
           
 long count()
          return the amount of matched rows
 Q from(PEntity<?>... args)
           
 QueryMetadata getMetadata()
           
 JDOQLTemplates getTemplates()
           
 boolean isDetach()
           
 com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expr<?>[] args)
          iterate over the results for the given projection
<RT> com.mysema.commons.lang.CloseableIterator<RT>
iterate(Expr<RT> projection)
          iterate over the results for the given projection
 List<Object[]> list(Expr<?>[] args)
          list the results for the given projection
<RT> List<RT>
list(Expr<RT> expr)
          list the results for the given projection
<RT> SearchResults<RT>
listResults(Expr<RT> expr)
          list the results for the given projection
 Q setMaxFetchDepth(int depth)
           
 String toString()
           
<RT> RT
uniqueResult(Expr<RT> expr)
          return a unique result for the given projection
 
Methods inherited from class com.mysema.query.support.ProjectableQuery
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, listDistinct, listDistinct, listDistinct, listDistinctResults, map, uniqueResult, uniqueResult
 
Methods inherited from class com.mysema.query.support.QueryBase
groupBy, having, limit, offset, orderBy, restrict, set, where
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractJDOQLQuery

public AbstractJDOQLQuery(@Nullable
                          javax.jdo.PersistenceManager persistenceManager)

AbstractJDOQLQuery

public AbstractJDOQLQuery(@Nullable
                          javax.jdo.PersistenceManager persistenceManager,
                          JDOQLTemplates templates,
                          QueryMetadata metadata,
                          boolean detach)
Method Detail

addFetchGroup

public Q addFetchGroup(String fetchGroupName)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

count

public long count()
Description copied from interface: Projectable
return the amount of matched rows

Specified by:
count in interface Projectable

from

public Q from(PEntity<?>... args)

getMetadata

public QueryMetadata getMetadata()

getTemplates

public JDOQLTemplates getTemplates()

isDetach

public boolean isDetach()

iterate

public com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expr<?>[] args)
Description copied from interface: Projectable
iterate over the results for the given projection

Specified by:
iterate in interface Projectable
Returns:

iterate

public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expr<RT> projection)
Description copied from interface: Projectable
iterate over the results for the given projection

Specified by:
iterate in interface Projectable
Type Parameters:
RT - generic type of the Iteratpr
Returns:
an Iterator over the projection

list

public List<Object[]> list(Expr<?>[] args)
Description copied from interface: Projectable
list the results for the given projection

Specified by:
list in interface Projectable
Overrides:
list in class ProjectableQuery<Q extends AbstractJDOQLQuery<Q>>
Returns:

list

public <RT> List<RT> list(Expr<RT> expr)
Description copied from interface: Projectable
list the results for the given projection

Specified by:
list in interface Projectable
Overrides:
list in class ProjectableQuery<Q extends AbstractJDOQLQuery<Q>>
Type Parameters:
RT - generic type of the List
Returns:
a List over the projection

listResults

public <RT> SearchResults<RT> listResults(Expr<RT> expr)
Description copied from interface: Projectable
list the results for the given projection

Specified by:
listResults in interface Projectable
Returns:

setMaxFetchDepth

public Q setMaxFetchDepth(int depth)

toString

public String toString()
Overrides:
toString in class QueryBase<Q extends AbstractJDOQLQuery<Q>>

uniqueResult

public <RT> RT uniqueResult(Expr<RT> expr)
Description copied from interface: Projectable
return a unique result for the given projection

Specified by:
uniqueResult in interface Projectable
Overrides:
uniqueResult in class ProjectableQuery<Q extends AbstractJDOQLQuery<Q>>
Type Parameters:
RT - return type
Returns:
the result or null for an empty result


Copyright © 2007-2010 Mysema Ltd. All Rights Reserved.