org.chromattic.api.query
Interface QueryBuilder<O>


public interface QueryBuilder<O>

The query builder allows to create queries.

Version:
$Revision$
Author:
Julien Viet

Method Summary
 Query<O> get()
          Compute and returns the ObjectQuery for this builder.
 QueryBuilder<O> orderBy(java.lang.String orderByProperty)
          Set the order by clause of the query with Ordering.ASC.
 QueryBuilder<O> orderBy(java.lang.String orderByProperty, Ordering orderBy)
          Set the order by clause of the query.
 QueryBuilder<O> where(java.lang.String where)
          Set the where clause of the query.
 

Method Detail

where

QueryBuilder<O> where(java.lang.String where)
                      throws java.lang.NullPointerException

Set the where clause of the query.

Parameters:
where - the where clause
Returns:
this builder
Throws:
java.lang.NullPointerException - if the argument is null

orderBy

QueryBuilder<O> orderBy(java.lang.String orderByProperty)
                        throws java.lang.NullPointerException

Set the order by clause of the query with Ordering.ASC.

Parameters:
orderByProperty - the used for ordering
Returns:
this builder
Throws:
java.lang.NullPointerException - if the argument is null

orderBy

QueryBuilder<O> orderBy(java.lang.String orderByProperty,
                        Ordering orderBy)
                        throws java.lang.NullPointerException

Set the order by clause of the query.

Parameters:
orderByProperty - the used for ordering
orderBy - define the order (ASC or DESC)
Returns:
this builder
Throws:
java.lang.NullPointerException - if the argument is null

get

Query<O> get()
             throws java.lang.IllegalStateException

Compute and returns the ObjectQuery for this builder.

Returns:
this object query
Throws:
java.lang.IllegalStateException - if the builder cannot build the query


Copyright © 2012 eXo Platform SAS. All Rights Reserved.