com.mysema.query.support
Class ProjectableAdapter

java.lang.Object
  extended by com.mysema.query.support.ProjectableAdapter
All Implemented Interfaces:
Projectable
Direct Known Subclasses:
CustomQueryable

public class ProjectableAdapter
extends Object
implements Projectable

ProjectableAdapter is an adapter implementation for the Projectable interface

Version:
$Id$
Author:
tiwe

Field Summary
protected  Projectable projectable
           
 
Constructor Summary
ProjectableAdapter(Projectable projectable)
           
 
Method Summary
 long count()
          return the amount of matched rows
 long countDistinct()
          return the amount of distinct matched rows
 Iterator<Object[]> iterate(Expr<?>[] args)
          iterate over the results for the given projection
 Iterator<Object[]> iterate(Expr<?> first, Expr<?> second, Expr<?>... rest)
          iterate over the results for the given projection
<RT> Iterator<RT>
iterate(Expr<RT> projection)
          iterate over the results for the given projection
 Iterator<Object[]> iterateDistinct(Expr<?>[] args)
          iterate over the distinct results for the given projection
 Iterator<Object[]> iterateDistinct(Expr<?> first, Expr<?> second, Expr<?>... rest)
          iterate over the distinct results for the given projection
<RT> Iterator<RT>
iterateDistinct(Expr<RT> projection)
          iterate over the distinct results for the given projection
 List<Object[]> list(Expr<?>[] args)
          list the results for the given projection
 List<Object[]> list(Expr<?> first, Expr<?> second, Expr<?>... rest)
          list the results for the given projection
<RT> List<RT>
list(Expr<RT> projection)
          list the results for the given projection
 List<Object[]> listDistinct(Expr<?>[] args)
          list the distinct results for the given projection
 List<Object[]> listDistinct(Expr<?> first, Expr<?> second, Expr<?>... rest)
          list the distinct results for the given projection
<RT> List<RT>
listDistinct(Expr<RT> projection)
          list the distinct results for the given projection
<RT> SearchResults<RT>
listDistinctResults(Expr<RT> expr)
          list the distinct results for the given projection
<RT> SearchResults<RT>
listResults(Expr<RT> expr)
          list the results for the given projection
<K,V> Map<K,V>
map(Expr<K> key, Expr<V> value)
          return the given projection as a Map instance using key and value for Map population
 String toString()
           
 Object[] uniqueResult(Expr<?>[] args)
          return a unique result for the given projection
 Object[] uniqueResult(Expr<?> first, Expr<?> second, Expr<?>... rest)
          return a unique result for the given projection
<RT> RT
uniqueResult(Expr<RT> expr)
          return a unique result for the given projection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

projectable

protected final Projectable projectable
Constructor Detail

ProjectableAdapter

public ProjectableAdapter(Projectable projectable)
Method Detail

count

public long count()
Description copied from interface: Projectable
return the amount of matched rows

Specified by:
count in interface Projectable

countDistinct

public long countDistinct()
Description copied from interface: Projectable
return the amount of distinct matched rows

Specified by:
countDistinct in interface Projectable

iterate

public Iterator<Object[]> iterate(Expr<?> first,
                                  Expr<?> second,
                                  Expr<?>... rest)
Description copied from interface: Projectable
iterate over the results for the given projection

Specified by:
iterate in interface Projectable
Returns:
an Iterator over the projection

iterate

public Iterator<Object[]> iterate(Expr<?>[] args)
Description copied from interface: Projectable
iterate over the results for the given projection

Specified by:
iterate in interface Projectable
Returns:

iterate

public <RT> Iterator<RT> iterate(Expr<RT> projection)
Description copied from interface: Projectable
iterate over the results for the given projection

Specified by:
iterate in interface Projectable
Type Parameters:
RT - generic type of the Iteratpr
Returns:
an Iterator over the projection

iterateDistinct

public Iterator<Object[]> iterateDistinct(Expr<?> first,
                                          Expr<?> second,
                                          Expr<?>... rest)
Description copied from interface: Projectable
iterate over the distinct results for the given projection

Specified by:
iterateDistinct in interface Projectable
Returns:
an Iterator over the projection

iterateDistinct

public Iterator<Object[]> iterateDistinct(Expr<?>[] args)
Description copied from interface: Projectable
iterate over the distinct results for the given projection

Specified by:
iterateDistinct in interface Projectable
Returns:

iterateDistinct

public <RT> Iterator<RT> iterateDistinct(Expr<RT> projection)
Description copied from interface: Projectable
iterate over the distinct results for the given projection

Specified by:
iterateDistinct in interface Projectable
Type Parameters:
RT - generic type of the Iteratpr
Returns:
an Iterator over the projection

list

public List<Object[]> list(Expr<?> first,
                           Expr<?> second,
                           Expr<?>... rest)
Description copied from interface: Projectable
list the results for the given projection

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

list

public List<Object[]> list(Expr<?>[] args)
Description copied from interface: Projectable
list the results for the given projection

Specified by:
list in interface Projectable
Returns:

list

public <RT> List<RT> list(Expr<RT> projection)
Description copied from interface: Projectable
list the results for the given projection

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

listDistinct

public List<Object[]> listDistinct(Expr<?> first,
                                   Expr<?> second,
                                   Expr<?>... rest)
Description copied from interface: Projectable
list the distinct results for the given projection

Specified by:
listDistinct in interface Projectable
rest - rest
Returns:
a List over the projection

listDistinct

public List<Object[]> listDistinct(Expr<?>[] args)
Description copied from interface: Projectable
list the distinct results for the given projection

Specified by:
listDistinct in interface Projectable
Returns:

listDistinct

public <RT> List<RT> listDistinct(Expr<RT> projection)
Description copied from interface: Projectable
list the distinct results for the given projection

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

listDistinctResults

public <RT> SearchResults<RT> listDistinctResults(Expr<RT> expr)
Description copied from interface: Projectable
list the distinct results for the given projection

Specified by:
listDistinctResults in interface Projectable
Returns:

listResults

public <RT> SearchResults<RT> listResults(Expr<RT> expr)
Description copied from interface: Projectable
list the results for the given projection

Specified by:
listResults in interface Projectable
Returns:

map

public <K,V> Map<K,V> map(Expr<K> key,
                          Expr<V> value)
Description copied from interface: Projectable
return the given projection as a Map instance using key and value for Map population

Specified by:
map in interface Projectable
Returns:

toString

public String toString()
Overrides:
toString in class Object

uniqueResult

public Object[] uniqueResult(Expr<?> first,
                             Expr<?> second,
                             Expr<?>... rest)
Description copied from interface: Projectable
return a unique result for the given projection

Specified by:
uniqueResult in interface Projectable
Returns:

uniqueResult

public Object[] uniqueResult(Expr<?>[] args)
Description copied from interface: Projectable
return a unique result for the given projection

Specified by:
uniqueResult in interface Projectable
Returns:

uniqueResult

public <RT> RT uniqueResult(Expr<RT> expr)
Description copied from interface: Projectable
return a unique result for the given projection

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


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