com.atlassian.confluence.api.impl.pagination
Class PaginationQueryImpl<F,T>

java.lang.Object
  extended by com.atlassian.confluence.api.impl.pagination.PaginationQueryImpl<F,T>
All Implemented Interfaces:
PaginationQuery<F,T>

public class PaginationQueryImpl<F,T>
extends Object
implements PaginationQuery<F,T>


Constructor Summary
PaginationQueryImpl()
           
 
Method Summary
 com.google.common.base.Function<F,T> getModelConverter()
           
 List<com.google.common.base.Predicate<F>> getPredicates()
           
static
<T> PaginationQuery<T,T>
newIdentityQuery()
          Constructs a PaginationQuery that does not perform model conversion.
static
<T> PaginationQuery<T,T>
newIdentityQuery(Class<T> clazz)
          An alternate form of newIdentityQuery that accepts a Class to piggy-back type token T from.
static
<F,T> PaginationQuery<F,T>
newQuery()
          Constructs a new PaginationQuery with no predicates or model converter.
static
<F,T> PaginationQuery<F,T>
newQuery(com.google.common.base.Function<F,T> modelConverter)
          Constructs a new PaginationQuery with a given model converter.
 PaginationQuery<F,T> withModelConverter(com.google.common.base.Function<F,T> modelConverter)
          Specifies the model converter Function that should be applied to results.
 PaginationQuery<F,T> withPredicate(com.google.common.base.Predicate<F> predicate)
          Adds a Predicate used to filter the raw database type results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaginationQueryImpl

public PaginationQueryImpl()
Method Detail

withPredicate

public PaginationQuery<F,T> withPredicate(com.google.common.base.Predicate<F> predicate)
Description copied from interface: PaginationQuery
Adds a Predicate used to filter the raw database type results. Predicates are additive and combined with an AND boolean operation. NOTE: for now, Predicates *should not* be treated as a Query DSL. These Predicates should only be used to perform filtering of database results that cannot be expressed in a database query proper.

Specified by:
withPredicate in interface PaginationQuery<F,T>

withModelConverter

public PaginationQuery<F,T> withModelConverter(com.google.common.base.Function<F,T> modelConverter)
Description copied from interface: PaginationQuery
Specifies the model converter Function that should be applied to results. For efficiency, models are only converted once they satisfy all Predicates.

Specified by:
withModelConverter in interface PaginationQuery<F,T>

getPredicates

public List<com.google.common.base.Predicate<F>> getPredicates()
Specified by:
getPredicates in interface PaginationQuery<F,T>

getModelConverter

public com.google.common.base.Function<F,T> getModelConverter()
Specified by:
getModelConverter in interface PaginationQuery<F,T>

newQuery

public static <F,T> PaginationQuery<F,T> newQuery()
Constructs a new PaginationQuery with no predicates or model converter.

Type Parameters:
F -
T -
Returns:

newQuery

public static <F,T> PaginationQuery<F,T> newQuery(com.google.common.base.Function<F,T> modelConverter)
Constructs a new PaginationQuery with a given model converter.

Type Parameters:
F -
T -
Returns:

newIdentityQuery

public static <T> PaginationQuery<T,T> newIdentityQuery()
Constructs a PaginationQuery that does not perform model conversion. On the result set. You should only be using this if you're sure you should be using it.

Type Parameters:
T -
Returns:

newIdentityQuery

public static <T> PaginationQuery<T,T> newIdentityQuery(Class<T> clazz)
An alternate form of newIdentityQuery that accepts a Class to piggy-back type token T from. This is syntactic sugar to make available newIdentityQuery(Foo.class) instead of PaginationQueryImpl.newIdentityQuery()

Parameters:
clazz -
Returns:


Copyright © 2003–2015 Atlassian. All rights reserved.