com.mysema.query.jpa
Class AbstractSQLQuery<T extends AbstractSQLQuery<T>>

java.lang.Object
  extended by com.mysema.query.support.QueryBase<Q>
      extended by com.mysema.query.support.ProjectableQuery<T>
          extended by com.mysema.query.jpa.AbstractSQLQuery<T>
Type Parameters:
T - concrete subtype
All Implemented Interfaces:
Projectable
Direct Known Subclasses:
AbstractHibernateSQLQuery, AbstractJPASQLQuery

public abstract class AbstractSQLQuery<T extends AbstractSQLQuery<T>>
extends ProjectableQuery<T>

Abstract super class for SQLQuery implementation for JPA and Hibernate

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.support.QueryBase
queryMixin
 
Constructor Summary
AbstractSQLQuery(QueryMetadata metadata)
           
 
Method Summary
 T addFlag(QueryFlag.Position position, Expression<?> flag)
           
 T addFlag(QueryFlag.Position position, String flag)
           
 T addFlag(QueryFlag.Position position, String prefix, Expression<?> expr)
           
 T addJoinFlag(String flag)
           
 T addJoinFlag(String flag, JoinFlag.Position position)
           
 long count()
          return the amount of matched rows
 boolean exists()
           
 T from(Expression<?>... args)
           
 T from(SubQueryExpression<?> subQuery, Path<?> alias)
           
<E> T
fullJoin(ForeignKey<E> key, RelationalPath<E> entity)
           
 T fullJoin(RelationalPath<?> o)
           
 T fullJoin(SubQueryExpression<?> o, Path<?> alias)
           
 QueryMetadata getMetadata()
           
<E> T
innerJoin(ForeignKey<E> key, RelationalPath<E> entity)
           
 T innerJoin(RelationalPath<?> o)
           
 T innerJoin(SubQueryExpression<?> o, Path<?> alias)
           
<E> T
join(ForeignKey<E> key, RelationalPath<E> entity)
           
 T join(RelationalPath<?> o)
           
 T join(SubQueryExpression<?> o, Path<?> alias)
           
<E> T
leftJoin(ForeignKey<E> key, RelationalPath<E> entity)
           
 T leftJoin(RelationalPath<?> o)
           
 T leftJoin(SubQueryExpression<?> o, Path<?> alias)
           
 T on(Predicate... conditions)
           
<E> T
rightJoin(ForeignKey<E> key, RelationalPath<E> entity)
           
 T rightJoin(RelationalPath<?> o)
           
 T rightJoin(SubQueryExpression<?> o, Path<?> alias)
           
 
Methods inherited from class com.mysema.query.support.ProjectableQuery
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, list, 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, toString, 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
iterate, iterate, listResults, uniqueResult, uniqueResult
 

Constructor Detail

AbstractSQLQuery

public AbstractSQLQuery(QueryMetadata metadata)
Method Detail

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

from

public T from(Expression<?>... args)

from

public T from(SubQueryExpression<?> subQuery,
              Path<?> alias)

fullJoin

public <E> T fullJoin(ForeignKey<E> key,
                      RelationalPath<E> entity)

fullJoin

public T fullJoin(RelationalPath<?> o)

fullJoin

public T fullJoin(SubQueryExpression<?> o,
                  Path<?> alias)

getMetadata

public QueryMetadata getMetadata()

innerJoin

public <E> T innerJoin(ForeignKey<E> key,
                       RelationalPath<E> entity)

innerJoin

public T innerJoin(RelationalPath<?> o)

innerJoin

public T innerJoin(SubQueryExpression<?> o,
                   Path<?> alias)

join

public <E> T join(ForeignKey<E> key,
                  RelationalPath<E> entity)

join

public T join(RelationalPath<?> o)

join

public T join(SubQueryExpression<?> o,
              Path<?> alias)

leftJoin

public <E> T leftJoin(ForeignKey<E> key,
                      RelationalPath<E> entity)

leftJoin

public T leftJoin(RelationalPath<?> o)

leftJoin

public T leftJoin(SubQueryExpression<?> o,
                  Path<?> alias)

on

public T on(Predicate... conditions)

rightJoin

public <E> T rightJoin(ForeignKey<E> key,
                       RelationalPath<E> entity)

rightJoin

public T rightJoin(RelationalPath<?> o)

rightJoin

public T rightJoin(SubQueryExpression<?> o,
                   Path<?> alias)

addJoinFlag

public T addJoinFlag(String flag)

addJoinFlag

public T addJoinFlag(String flag,
                     JoinFlag.Position position)

addFlag

public T addFlag(QueryFlag.Position position,
                 String prefix,
                 Expression<?> expr)

addFlag

public T addFlag(QueryFlag.Position position,
                 String flag)

addFlag

public T addFlag(QueryFlag.Position position,
                 Expression<?> flag)


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