com.mysema.query.hql
Class HQLGrammar

java.lang.Object
  extended by com.mysema.query.hql.HQLGrammar

public class HQLGrammar
extends Object

HQLGrammar provides factory methods for HQL specific operations elements.

Version:
$Id$
Author:
tiwe

Constructor Summary
HQLGrammar()
           
 
Method Summary
static
<D> Expr<D>
all(ECollection<?,D> col)
           
static
<D> Expr<D>
any(ECollection<?,D> col)
           
static
<A extends Comparable<? super A>>
EComparable<A>
avg(ECollection<?,A> col)
           
static
<A extends Comparable<? super A>>
EComparable<A>
max(ECollection<?,A> left)
           
static
<A extends Comparable<? super A>>
EComparable<A>
min(ECollection<?,A> left)
           
static
<D> Expr<D>
some(ECollection<?,D> col)
           
static
<D extends Number & Comparable<? super D>>
ENumber<?>
sum(Expr<D> left)
          SUM returns Long when applied to state-fields of integral types (other than BigInteger); Double when applied to state-fields of floating point types; BigInteger when applied to state-fields of type BigInteger; and BigDecimal when applied to state-fields of type BigDecimal.
static
<D extends Number & Comparable<? super D>>
ENumber<Double>
sumAsDouble(Expr<D> left)
           
static
<D extends Number & Comparable<? super D>>
ENumber<Long>
sumAsLong(Expr<D> left)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HQLGrammar

public HQLGrammar()
Method Detail

all

public static <D> Expr<D> all(ECollection<?,D> col)
Type Parameters:
D -
Parameters:
col -
Returns:

any

public static <D> Expr<D> any(ECollection<?,D> col)
Type Parameters:
D -
Parameters:
col -
Returns:

avg

public static <A extends Comparable<? super A>> EComparable<A> avg(ECollection<?,A> col)
Type Parameters:
A -
Parameters:
col -
Returns:

max

public static <A extends Comparable<? super A>> EComparable<A> max(ECollection<?,A> left)
Type Parameters:
A -
Parameters:
left -
Returns:

min

public static <A extends Comparable<? super A>> EComparable<A> min(ECollection<?,A> left)
Type Parameters:
A -
Parameters:
left -
Returns:

some

public static <D> Expr<D> some(ECollection<?,D> col)
Type Parameters:
D -
Parameters:
col -
Returns:

sum

public static <D extends Number & Comparable<? super D>> ENumber<?> sum(Expr<D> left)
SUM returns Long when applied to state-fields of integral types (other than BigInteger); Double when applied to state-fields of floating point types; BigInteger when applied to state-fields of type BigInteger; and BigDecimal when applied to state-fields of type BigDecimal.


sumAsLong

public static <D extends Number & Comparable<? super D>> ENumber<Long> sumAsLong(Expr<D> left)
Type Parameters:
D -
Parameters:
left -
Returns:

sumAsDouble

public static <D extends Number & Comparable<? super D>> ENumber<Double> sumAsDouble(Expr<D> left)
Type Parameters:
D -
Parameters:
left -
Returns:


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