com.mysema.query.support
Class QueryBaseWithDetach<SubType extends QueryBaseWithDetach<SubType>>

java.lang.Object
  extended by com.mysema.query.QueryBase<SubType>
      extended by com.mysema.query.support.QueryBaseWithDetach<SubType>
Type Parameters:
SubType -
All Implemented Interfaces:
Detachable
Direct Known Subclasses:
HQLSubQuery, JDOQLSubQuery, SQLSubQuery

public abstract class QueryBaseWithDetach<SubType extends QueryBaseWithDetach<SubType>>
extends QueryBase<SubType>
implements Detachable

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.QueryBase
_this
 
Constructor Summary
QueryBaseWithDetach(QueryMetadata metadata)
           
 
Method Summary
 ObjectSubQuery<Long> count()
          Return the count of matched rows as a subquery
 EBoolean exists()
           
 ListSubQuery<Object[]> list(Expr<?> first, Expr<?> second, Expr<?>... rest)
          Create a projection expression for the given projection
<RT> ListSubQuery<RT>
list(Expr<RT> projection)
          Create a projection expression for the given projection
 EBoolean notExists()
           
 ObjectSubQuery<Object[]> unique(Expr<?> first, Expr<?> second, Expr<?>... rest)
          Create a projection expression for the given projection
<RT> ObjectSubQuery<RT>
unique(Expr<RT> projection)
          Create a projection expression for the given projection
 
Methods inherited from class com.mysema.query.QueryBase
addToProjection, getMetadata, groupBy, having, limit, offset, orderBy, restrict, toString, where
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryBaseWithDetach

public QueryBaseWithDetach(QueryMetadata metadata)
Method Detail

count

public ObjectSubQuery<Long> count()
Description copied from interface: Detachable
Return the count of matched rows as a subquery

Specified by:
count in interface Detachable
Returns:

exists

public EBoolean exists()

list

public ListSubQuery<Object[]> list(Expr<?> first,
                                   Expr<?> second,
                                   Expr<?>... rest)
Description copied from interface: Detachable
Create a projection expression for the given projection

Specified by:
list in interface Detachable
rest - rest
Returns:
a List over the projection

list

public <RT> ListSubQuery<RT> list(Expr<RT> projection)
Description copied from interface: Detachable
Create a projection expression for the given projection

Specified by:
list in interface Detachable
Type Parameters:
RT - generic type of the List
Returns:
a List over the projection

notExists

public EBoolean notExists()

unique

public ObjectSubQuery<Object[]> unique(Expr<?> first,
                                       Expr<?> second,
                                       Expr<?>... rest)
Description copied from interface: Detachable
Create a projection expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public <RT> ObjectSubQuery<RT> unique(Expr<RT> projection)
Description copied from interface: Detachable
Create a projection expression for the given projection

Specified by:
unique in interface Detachable
Type Parameters:
RT - return type
Returns:
the result or null for an empty result


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