net.conquiris.lucene.search
Class SortBuilder

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

public final class SortBuilder
extends Object
implements net.derquinse.common.base.Builder<Sort>

Sort building class.

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(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(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(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(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(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(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(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(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.

build

public Sort build()
Creates the sort specification.

Specified by:
build in interface net.derquinse.common.base.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.


Copyright © 2012 Derquinse Projects.. All Rights Reserved.