Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) 2010 Mysema Ltd.
   * All rights reserved.
   *
   */
  package com.mysema.query.jdoql.sql;
  
Base class for JDO based SQLQuery implementations

Parameters:
<T>
Author(s):
tiwe
 
 public abstract class AbstractSQLQuery<T extends AbstractSQLQuery<T>> extends ProjectableQuery<T>{
 
     private static final ENumber<IntegerCOUNT_ALL_AGG_EXPR = ONumber.create(Integer.class..);
 
     @SuppressWarnings("unchecked")
     public AbstractSQLQuery(QueryMetadata metadata) {
         super(new QueryMixin<T>(metadata));
         this..setSelf((T)this);
     }
 
     @Override
     public long count() {
         return uniqueResult();
     }
 
     public T from(Expr<?>... args) {
         return .from(args);
     }
 
     public <E> T fullJoin(ForeignKey<E> keyRelationalPath<E> entity) {
         return .innerJoin(entity).on(key.on(entity));
     }
 
     public T fullJoin(RelationalPath<?> o) {
         return .fullJoin(o);
     }
 
     public T fullJoin(SubQueryExpression<?> oPath<?> alias) {
         return .fullJoin(oalias);
     }
 
     public QueryMetadata getMetadata(){
         return .getMetadata();
     }
 
     public <E> T innerJoin(ForeignKey<E> keyRelationalPath<E> entity) {
         return .innerJoin(entity).on(key.on(entity));
     }
 
     public T innerJoin(RelationalPath<?> o) {
         return .innerJoin(o);
     }
 
     public T innerJoin(SubQueryExpression<?> oPath<?> alias) {
         return .innerJoin(oalias);
     }
 
     public <E> T join(ForeignKey<E> keyRelationalPath<E> entity) {
         return .innerJoin(entity).on(key.on(entity));
     }
 
     public T join(RelationalPath<?> o) {
         return .join(o);
     }
 
     public T join(SubQueryExpression<?> oPath<?> alias) {
         return .join(oalias);
     }
 
     public <E> T leftJoin(ForeignKey<E> keyRelationalPath<E> entity) {
         return .innerJoin(entity).on(key.on(entity));
     }
 
     public T leftJoin(RelationalPath<?> o) {
         return .leftJoin(o);
     }
 
     public T leftJoin(SubQueryExpression<?> oPath<?> alias) {
         return .leftJoin(oalias);
     }
 
     public T on(EBoolean... conditions) {
        return .on(conditions);
    }
    public <E> T rightJoin(ForeignKey<E> keyRelationalPath<E> entity) {
        return .innerJoin(entity).on(key.on(entity));
    }
    public T rightJoin(RelationalPath<?> o) {
        return .rightJoin(o);
    }
    public T rightJoin(SubQueryExpression<?> oPath<?> alias) {
        return .rightJoin(oalias);
    }
New to GrepCode? Check out our FAQ X