com.mysema.query.jdo
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.jdo.AbstractJDOQLQuery<Q>
Type Parameters:
Q -
All Implemented Interfaces:
Projectable
Direct Known Subclasses:
JDOQLQueryImpl

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

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
 boolean exists()
           
 Q from(EntityPath<?>... args)
           
 QueryMetadata getMetadata()
           
 JDOQLTemplates getTemplates()
           
 boolean isDetach()
           
 com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?>[] args)
          iterate over the results for the given projection
<RT> com.mysema.commons.lang.CloseableIterator<RT>
iterate(Expression<RT> projection)
          iterate over the results for the given projection
 List<Object[]> list(Expression<?>[] args)
          list the results for the given projection An empty list is returned for no results.
<RT> List<RT>
list(Expression<RT> expr)
          list the results for the given projection An empty list is returned for no results.
<RT> SearchResults<RT>
listResults(Expression<RT> expr)
          list the results for the given projection
protected  void logQuery(String queryString)
           
 Q setMaxFetchDepth(int depth)
           
 String toString()
           
 Object[] uniqueResult(Expression<?>[] args)
          return a unique result for the given projection or null if no result is found
<RT> RT
uniqueResult(Expression<RT> expr)
          return a unique result for the given projection or null if no result is found
 
Methods inherited from class com.mysema.query.support.ProjectableQuery
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, listDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, singleResult, singleResult, singleResult, uniqueResult, uniqueResult
 
Methods inherited from class com.mysema.query.support.QueryBase
distinct, 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()

count

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


exists

public boolean exists()
Returns:
true, if rows matching the given criteria exist, otherwise false

logQuery

protected void logQuery(String queryString)

from

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

getMetadata

public QueryMetadata getMetadata()

getTemplates

public JDOQLTemplates getTemplates()

isDetach

public boolean isDetach()

iterate

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

Returns:

iterate

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

Type Parameters:
RT - generic type of the Iterator
Returns:
an Iterator over the projection

list

public List<Object[]> list(Expression<?>[] args)
Description copied from interface: Projectable
list the results for the given projection An empty list is returned for no results.

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

list

public <RT> List<RT> list(Expression<RT> expr)
Description copied from interface: Projectable
list the results for the given projection An empty list is returned for no results.

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(Expression<RT> expr)
Description copied from interface: Projectable
list the results for the given projection

Returns:

setMaxFetchDepth

public Q setMaxFetchDepth(int depth)

toString

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

uniqueResult

@Nullable
public <RT> RT uniqueResult(Expression<RT> expr)
Description copied from interface: Projectable
return a unique result for the given projection or null if no result is found

Type Parameters:
RT - return type
Returns:
the result or null for an empty result

uniqueResult

@Nullable
public Object[] uniqueResult(Expression<?>[] args)
Description copied from interface: Projectable
return a unique result for the given projection or null if no result is found

Returns:


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