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

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

public abstract class AbstractJDOQLQuery<SubType extends AbstractJDOQLQuery<SubType>>
extends QueryBaseWithProjection<SubType>
implements Projectable

Abstract base class for custom implementations of the JDOQLQuery interface.

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.QueryBase
_this
 
Constructor Summary
AbstractJDOQLQuery(QueryMetadata md, javax.jdo.PersistenceManager pm, JDOQLTemplates templates)
           
 
Method Summary
protected  SubType addToProjection(Expr<?>... o)
           
 void close()
           
 long count()
          return the amount of matched rows
 SubType from(PEntity<?>... args)
           
 Iterator<Object[]> iterate(Expr<?> e1, Expr<?> e2, Expr<?>... rest)
          iterate over the results for the given projection
<RT> Iterator<RT>
iterate(Expr<RT> projection)
          iterate over the results for the given projection
 List<Object[]> list(Expr<?> expr1, Expr<?> expr2, Expr<?>... rest)
          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
 String toString()
           
<RT> RT
uniqueResult(Expr<RT> expr)
          return a unique result for the given projection
 
Methods inherited from class com.mysema.query.support.QueryBaseWithProjection
asArray, countDistinct, iterateDistinct, iterateDistinct, listDistinct, listDistinct, listDistinctResults, map, uniqueResult
 
Methods inherited from class com.mysema.query.QueryBase
getMetadata, groupBy, having, limit, offset, orderBy, restrict, where
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.Projectable
countDistinct, iterateDistinct, iterateDistinct, listDistinct, listDistinct, listDistinctResults, map, uniqueResult
 

Constructor Detail

AbstractJDOQLQuery

public AbstractJDOQLQuery(QueryMetadata md,
                          javax.jdo.PersistenceManager pm,
                          JDOQLTemplates templates)
Method Detail

addToProjection

protected SubType addToProjection(Expr<?>... o)
Overrides:
addToProjection in class QueryBase<SubType extends AbstractJDOQLQuery<SubType>>

from

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

count

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

Specified by:
count in interface Projectable

iterate

public Iterator<Object[]> iterate(Expr<?> e1,
                                  Expr<?> e2,
                                  Expr<?>... rest)
Description copied from interface: Projectable
iterate over the results for the given projection

Specified by:
iterate in interface Projectable
Returns:
an Iterator over the projection

iterate

public <RT> Iterator<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<?> expr1,
                           Expr<?> expr2,
                           Expr<?>... rest)
Description copied from interface: Projectable
list the results for the given projection

Specified by:
list in interface Projectable
Overrides:
list in class QueryBaseWithProjection<SubType extends AbstractJDOQLQuery<SubType>>
rest - rest
Returns:
a List over the projection

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 QueryBaseWithProjection<SubType extends AbstractJDOQLQuery<SubType>>
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:

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 QueryBaseWithProjection<SubType extends AbstractJDOQLQuery<SubType>>
Type Parameters:
RT - return type
Returns:
the result or null for an empty result

close

public void close()
           throws IOException
Throws:
IOException

toString

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


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