net.conquiris.lucene.search
Class SortBuilder

java.lang.Object
  extended by net.conquiris.lucene.search.SortBuilder
All Implemented Interfaces:
Builder<Sort>

public final class SortBuilder
extends Object
implements Builder<Sort>

Sort building class. The comparators provided as arguments MUST support null values.

Author:
Andres Rodriguez

Method Summary
 SortBuilder add(BooleanSchemaItem field)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(BooleanSchemaItem field, boolean reverse)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(DoubleSchemaItem field)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(DoubleSchemaItem field, boolean reverse)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(DoubleSchemaItem field, Comparator<Double> comparator)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(DoubleSchemaItem field, Comparator<Double> comparator, boolean reverse)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(DoubleSchemaItem field, double... values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(DoubleSchemaItem field, Iterable<Double> values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(DoubleSchemaItem field, Iterable<Double> values, boolean reverse)
          Adds a sort field specified by the provided value list.
 SortBuilder add(FloatSchemaItem field)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(FloatSchemaItem field, boolean reverse)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(FloatSchemaItem field, Comparator<Float> comparator)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(FloatSchemaItem field, Comparator<Float> comparator, boolean reverse)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(FloatSchemaItem field, float... values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(FloatSchemaItem field, Iterable<Float> values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(FloatSchemaItem field, Iterable<Float> values, boolean reverse)
          Adds a sort field specified by the provided value list.
 SortBuilder add(InstantSchemaItem field)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(InstantSchemaItem field, boolean reverse)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(IntegerSchemaItem field)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(IntegerSchemaItem field, boolean reverse)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(IntegerSchemaItem field, Comparator<Integer> comparator)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(IntegerSchemaItem field, Comparator<Integer> comparator, boolean reverse)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(IntegerSchemaItem field, int... values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(IntegerSchemaItem field, Iterable<Integer> values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(IntegerSchemaItem field, Iterable<Integer> values, boolean reverse)
          Adds a sort field specified by the provided value list.
 SortBuilder add(Iterable<? extends SortField> fields)
          Adds some sort fields.
 SortBuilder add(LongSchemaItem field)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(LongSchemaItem field, boolean reverse)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(LongSchemaItem field, Comparator<Long> comparator)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(LongSchemaItem field, Comparator<Long> comparator, boolean reverse)
          Adds a sort field specified by the provided comparator.
 SortBuilder add(LongSchemaItem field, Iterable<Long> values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(LongSchemaItem field, Iterable<Long> values, boolean reverse)
          Adds a sort field specified by the provided value list.
 SortBuilder add(LongSchemaItem field, long... values)
          Adds a sort field specified by the provided value list.
 SortBuilder add(SortField... fields)
          Adds some sort fields.
 SortBuilder add(SortField field)
          Adds a sort field.
 SortBuilder add(TextSchemaItem field)
          Adds a sort by terms in the field specified by the provided schema item.
 SortBuilder add(TextSchemaItem field, boolean reverse)
          Adds a sort by terms in the field specified by the provided schema item.
 Sort build()
          Creates the sort specification.
static SortField field(BooleanSchemaItem field)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(BooleanSchemaItem field, boolean reverse)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(DoubleSchemaItem field)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(DoubleSchemaItem field, boolean reverse)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(DoubleSchemaItem field, Comparator<Double> comparator)
          Creates a sort field specified by the provided comparator.
static SortField field(DoubleSchemaItem field, Comparator<Double> comparator, boolean reverse)
          Creates a sort field specified by the provided comparator.
static SortField field(DoubleSchemaItem field, double... values)
          Creates a sort field specified by the provided value list.
static SortField field(DoubleSchemaItem field, Iterable<Double> values)
          Creates a sort field specified by the provided value list.
static SortField field(DoubleSchemaItem field, Iterable<Double> values, boolean reverse)
          Creates a sort field specified by the provided value list.
static SortField field(FloatSchemaItem field)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(FloatSchemaItem field, boolean reverse)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(FloatSchemaItem field, Comparator<Float> comparator)
          Creates a sort field specified by the provided comparator.
static SortField field(FloatSchemaItem field, Comparator<Float> comparator, boolean reverse)
          Creates a sort field specified by the provided comparator.
static SortField field(FloatSchemaItem field, float... values)
          Creates a sort field specified by the provided value list.
static SortField field(FloatSchemaItem field, Iterable<Float> values)
          Creates a sort field specified by the provided value list.
static SortField field(FloatSchemaItem field, Iterable<Float> values, boolean reverse)
          Creates a sort field specified by the provided value list.
static SortField field(InstantSchemaItem field)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(InstantSchemaItem field, boolean reverse)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(IntegerSchemaItem field)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(IntegerSchemaItem field, boolean reverse)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(IntegerSchemaItem field, Comparator<Integer> comparator)
          Creates a sort field specified by the provided comparator.
static SortField field(IntegerSchemaItem field, Comparator<Integer> comparator, boolean reverse)
          Creates a sort field specified by the provided comparator.
static SortField field(IntegerSchemaItem field, int... values)
          Creates a sort field specified by the provided value list.
static SortField field(IntegerSchemaItem field, Iterable<Integer> values)
          Creates a sort field specified by the provided value list.
static SortField field(IntegerSchemaItem field, Iterable<Integer> values, boolean reverse)
          Creates a sort field specified by the provided value list.
static SortField field(LongSchemaItem field)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(LongSchemaItem field, boolean reverse)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(LongSchemaItem field, Comparator<Long> comparator)
          Creates a sort field specified by the provided comparator.
static SortField field(LongSchemaItem field, Comparator<Long> comparator, boolean reverse)
          Creates a sort field specified by the provided comparator.
static SortField field(LongSchemaItem field, Iterable<Long> values)
          Creates a sort field specified by the provided value list.
static SortField field(LongSchemaItem field, Iterable<Long> values, boolean reverse)
          Creates a sort field specified by the provided value list.
static SortField field(LongSchemaItem field, long... values)
          Creates a sort field specified by the provided value list.
static SortField field(TextSchemaItem field)
          Creates a sort by terms in the field specified by the provided schema item.
static SortField field(TextSchemaItem field, boolean reverse)
          Creates a sort by terms in the field specified by the provided schema item.
static SortBuilder newBuilder()
          Creates a new builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newBuilder

public static SortBuilder newBuilder()
Creates a new builder.


field

public static SortField field(TextSchemaItem field,
                              boolean reverse)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(TextSchemaItem field)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(IntegerSchemaItem field,
                              boolean reverse)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(IntegerSchemaItem field)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(LongSchemaItem field,
                              boolean reverse)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(LongSchemaItem field)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(FloatSchemaItem field,
                              boolean reverse)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(FloatSchemaItem field)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(DoubleSchemaItem field,
                              boolean reverse)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(DoubleSchemaItem field)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(BooleanSchemaItem field,
                              boolean reverse)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(BooleanSchemaItem field)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(InstantSchemaItem field,
                              boolean reverse)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(InstantSchemaItem field)
Creates a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(IntegerSchemaItem field,
                              Comparator<Integer> comparator,
                              boolean reverse)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(IntegerSchemaItem field,
                              Comparator<Integer> comparator)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(IntegerSchemaItem field,
                              Iterable<Integer> values,
                              boolean reverse)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(IntegerSchemaItem field,
                              Iterable<Integer> values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(IntegerSchemaItem field,
                              int... values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(LongSchemaItem field,
                              Comparator<Long> comparator,
                              boolean reverse)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(LongSchemaItem field,
                              Comparator<Long> comparator)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(LongSchemaItem field,
                              Iterable<Long> values,
                              boolean reverse)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(LongSchemaItem field,
                              Iterable<Long> values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(LongSchemaItem field,
                              long... values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(FloatSchemaItem field,
                              Comparator<Float> comparator,
                              boolean reverse)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(FloatSchemaItem field,
                              Comparator<Float> comparator)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(FloatSchemaItem field,
                              Iterable<Float> values,
                              boolean reverse)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(FloatSchemaItem field,
                              Iterable<Float> values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(FloatSchemaItem field,
                              float... values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(DoubleSchemaItem field,
                              Comparator<Double> comparator,
                              boolean reverse)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(DoubleSchemaItem field,
                              Comparator<Double> comparator)
Creates a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(DoubleSchemaItem field,
                              Iterable<Double> values,
                              boolean reverse)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(DoubleSchemaItem field,
                              Iterable<Double> values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

field

public static SortField field(DoubleSchemaItem field,
                              double... values)
Creates a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

build

public Sort build()
Creates the sort specification.

Specified by:
build in interface Builder<Sort>

add

public SortBuilder add(SortField field)
Adds a sort field.

Returns:
This builder.

add

public SortBuilder add(Iterable<? extends SortField> fields)
Adds some sort fields.

Returns:
This builder.

add

public SortBuilder add(SortField... fields)
Adds some sort fields.

Returns:
This builder.

add

public SortBuilder add(TextSchemaItem field,
                       boolean reverse)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(TextSchemaItem field)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(IntegerSchemaItem field,
                       boolean reverse)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(IntegerSchemaItem field)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(LongSchemaItem field,
                       boolean reverse)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(LongSchemaItem field)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(FloatSchemaItem field,
                       boolean reverse)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(FloatSchemaItem field)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(DoubleSchemaItem field,
                       boolean reverse)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(DoubleSchemaItem field)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(BooleanSchemaItem field,
                       boolean reverse)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(BooleanSchemaItem field)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(InstantSchemaItem field,
                       boolean reverse)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
reverse - True if natural order should be reversed.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(InstantSchemaItem field)
Adds a sort by terms in the field specified by the provided schema item.

Parameters:
field - Field identified by an schema item.
Returns:
This builder.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(IntegerSchemaItem field,
                       Comparator<Integer> comparator,
                       boolean reverse)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(IntegerSchemaItem field,
                       Comparator<Integer> comparator)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(IntegerSchemaItem field,
                       Iterable<Integer> values,
                       boolean reverse)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(IntegerSchemaItem field,
                       Iterable<Integer> values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(IntegerSchemaItem field,
                       int... values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(LongSchemaItem field,
                       Comparator<Long> comparator,
                       boolean reverse)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(LongSchemaItem field,
                       Comparator<Long> comparator)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(LongSchemaItem field,
                       Iterable<Long> values,
                       boolean reverse)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(LongSchemaItem field,
                       Iterable<Long> values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(LongSchemaItem field,
                       long... values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(FloatSchemaItem field,
                       Comparator<Float> comparator,
                       boolean reverse)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(FloatSchemaItem field,
                       Comparator<Float> comparator)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(FloatSchemaItem field,
                       Iterable<Float> values,
                       boolean reverse)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(FloatSchemaItem field,
                       Iterable<Float> values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(FloatSchemaItem field,
                       float... values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(DoubleSchemaItem field,
                       Comparator<Double> comparator,
                       boolean reverse)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(DoubleSchemaItem field,
                       Comparator<Double> comparator)
Adds a sort field specified by the provided comparator.

Parameters:
field - Field identified by an schema item.
comparator - Comparator to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(DoubleSchemaItem field,
                       Iterable<Double> values,
                       boolean reverse)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(DoubleSchemaItem field,
                       Iterable<Double> values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.

add

public SortBuilder add(DoubleSchemaItem field,
                       double... values)
Adds a sort field specified by the provided value list.

Parameters:
field - Field identified by an schema item.
values - Value list to use.
Throws:
IllegalArgumentException - if the provided schema item is not indexed.


Copyright © 2013 Derquinse Projects. All Rights Reserved.