com.mysema.query.support
Class DetachableQuery<Q extends DetachableQuery<Q>>

java.lang.Object
  extended by com.mysema.query.support.QueryBase<Q>
      extended by com.mysema.query.support.DetachableQuery<Q>
Type Parameters:
Q - concrete subtype
All Implemented Interfaces:
Detachable
Direct Known Subclasses:
AbstractJDOQLSubQuery, AbstractJPQLSubQuery, AbstractSQLSubQuery

public class DetachableQuery<Q extends DetachableQuery<Q>>
extends QueryBase<Q>
implements Detachable

DetachableQuery is a base class for queries which implement the Query and Detachable interfaces

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.support.QueryBase
queryMixin
 
Constructor Summary
DetachableQuery(QueryMixin<Q> queryMixin)
           
 
Method Summary
 NumberSubQuery<Long> count()
          Return the count of matched rows as a sub query
 BooleanExpression exists()
          Create an exists(this) expression
 ListSubQuery<Object[]> list(Expression<?>[] args)
          Create a projection expression for the given projection
 ListSubQuery<Object[]> list(Expression<?> first, Expression<?> second, Expression<?>... rest)
          Create a projection expression for the given projection
<RT> ListSubQuery<RT>
list(Expression<RT> projection)
          Create a projection expression for the given projection
 ListSubQuery<Object[]> list(Object... args)
          Create a projection expression for the given projection Non expression arguments are converted into constant expressions
 BooleanExpression notExists()
          Create an not exists(this) expression
<RT extends Comparable<?>>
ComparableSubQuery<RT>
unique(ComparableExpression<RT> projection)
          Create a subquery expression for the given projection
<RT extends Comparable<?>>
DateSubQuery<RT>
unique(DateExpression<RT> projection)
          Create a subquery expression for the given projection
<RT extends Comparable<?>>
DateTimeSubQuery<RT>
unique(DateTimeExpression<RT> projection)
          Create a subquery expression for the given projection
 SimpleSubQuery<Object[]> unique(Expression<?>[] args)
          Create a projection expression for the given projection
 SimpleSubQuery<Object[]> unique(Expression<?> first, Expression<?> second, Expression<?>... rest)
          Create a projection expression for the given projection
<RT> SimpleSubQuery<RT>
unique(Expression<RT> projection)
          Create a subquery expression for the given projection
<RT extends Number & Comparable<?>>
NumberSubQuery<RT>
unique(NumberExpression<RT> projection)
          Create a subquery expression for the given projection
 SimpleSubQuery<Object[]> unique(Object... args)
          Create a projection expression for the given projection Non expression arguments are converted into constant expressions
 BooleanSubQuery unique(Predicate projection)
          Create a subquery expression for the given projection
 StringSubQuery unique(StringExpression projection)
          Create a subquery expression for the given projection
<RT extends Comparable<?>>
TimeSubQuery<RT>
unique(TimeExpression<RT> projection)
          Create a subquery expression for the given projection
 
Methods inherited from class com.mysema.query.support.QueryBase
distinct, groupBy, having, limit, offset, orderBy, restrict, set, toString, where
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DetachableQuery

public DetachableQuery(QueryMixin<Q> queryMixin)
Method Detail

count

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

Specified by:
count in interface Detachable
Returns:

exists

public BooleanExpression exists()
Description copied from interface: Detachable
Create an exists(this) expression

Specified by:
exists in interface Detachable
Returns:

list

public ListSubQuery<Object[]> list(Expression<?> first,
                                   Expression<?> second,
                                   Expression<?>... 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 ListSubQuery<Object[]> list(Expression<?>[] args)
Description copied from interface: Detachable
Create a projection expression for the given projection

Specified by:
list in interface Detachable
Returns:

list

public <RT> ListSubQuery<RT> list(Expression<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

list

public ListSubQuery<Object[]> list(Object... args)
Description copied from interface: Detachable
Create a projection expression for the given projection Non expression arguments are converted into constant expressions

Specified by:
list in interface Detachable
Returns:

notExists

public BooleanExpression notExists()
Description copied from interface: Detachable
Create an not exists(this) expression

Specified by:
notExists in interface Detachable
Returns:

unique

public <RT extends Comparable<?>> ComparableSubQuery<RT> unique(ComparableExpression<RT> projection)
Description copied from interface: Detachable
Create a subquery expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public <RT extends Comparable<?>> DateSubQuery<RT> unique(DateExpression<RT> projection)
Description copied from interface: Detachable
Create a subquery expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public <RT extends Comparable<?>> DateTimeSubQuery<RT> unique(DateTimeExpression<RT> projection)
Description copied from interface: Detachable
Create a subquery expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

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

Specified by:
unique in interface Detachable
Returns:

unique

public SimpleSubQuery<Object[]> unique(Expression<?>[] args)
Description copied from interface: Detachable
Create a projection expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public <RT> SimpleSubQuery<RT> unique(Expression<RT> projection)
Description copied from interface: Detachable
Create a subquery 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

unique

public <RT extends Number & Comparable<?>> NumberSubQuery<RT> unique(NumberExpression<RT> projection)
Description copied from interface: Detachable
Create a subquery expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public BooleanSubQuery unique(Predicate projection)
Description copied from interface: Detachable
Create a subquery expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public StringSubQuery unique(StringExpression projection)
Description copied from interface: Detachable
Create a subquery expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public <RT extends Comparable<?>> TimeSubQuery<RT> unique(TimeExpression<RT> projection)
Description copied from interface: Detachable
Create a subquery expression for the given projection

Specified by:
unique in interface Detachable
Returns:

unique

public SimpleSubQuery<Object[]> unique(Object... args)
Description copied from interface: Detachable
Create a projection expression for the given projection Non expression arguments are converted into constant expressions

Specified by:
unique in interface Detachable
Returns:


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