net.conquiris.lucene.document
Class BaseNumericFieldBuilder<B extends BaseNumericFieldBuilder<B>>

java.lang.Object
  extended by net.derquinse.common.reflect.This<B>
      extended by net.conquiris.lucene.document.FieldBuilder<B>
          extended by net.conquiris.lucene.document.IndexableFieldBuilder<B>
              extended by net.conquiris.lucene.document.BaseNumericFieldBuilder<B>
All Implemented Interfaces:
IsIndexedFlag, IsStoredFlag
Direct Known Subclasses:
BaseDocumentBuilder.DocNumericFieldBuilder, NumericFieldBuilder

public abstract class BaseNumericFieldBuilder<B extends BaseNumericFieldBuilder<B>>
extends IndexableFieldBuilder<B>

Base class for numeric field builders. Numeric fields are indexed but not stored by default.

Author:
Andres Rodriguez

Field Summary
 
Fields inherited from interface net.conquiris.schema.IsStoredFlag
STORED
 
Fields inherited from interface net.conquiris.schema.IsIndexedFlag
INDEXED
 
Method Summary
 NumericField build(boolean value)
          Builds a numeric field with the current information and a boolean value.
 NumericField build(double value)
          Builds a numeric field with the current information and a double value.
 NumericField build(float value)
          Builds a numeric field with the current information and a float value.
 NumericField build(int value)
          Builds a numeric field with the current information and an int value.
 NumericField build(long value)
          Builds a numeric field with the current information and a long value.
 
Methods inherited from class net.conquiris.lucene.document.IndexableFieldBuilder
index, isIndexed, isStored, store, store, store
 
Methods inherited from class net.derquinse.common.reflect.This
thisValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

build

public final NumericField build(int value)
Builds a numeric field with the current information and an int value.

Parameters:
value - Field value.
Returns:
The created field.
Throws:
IllegalStateException - if the field is neither stored nor indexed.

build

public final NumericField build(long value)
Builds a numeric field with the current information and a long value.

Parameters:
value - Field value.
Returns:
The created field.
Throws:
IllegalStateException - if the field is neither stored nor indexed.

build

public final NumericField build(float value)
Builds a numeric field with the current information and a float value.

Parameters:
value - Field value.
Returns:
The created field.
Throws:
IllegalStateException - if the field is neither stored nor indexed.

build

public final NumericField build(double value)
Builds a numeric field with the current information and a double value.

Parameters:
value - Field value.
Returns:
The created field.
Throws:
IllegalStateException - if the field is neither stored nor indexed.

build

public final NumericField build(boolean value)
Builds a numeric field with the current information and a boolean value. True is mapped to 1 and false to 0.

Parameters:
value - Field value.
Returns:
The created field.
Throws:
IllegalStateException - if the field is neither stored nor indexed.


Copyright © 2013 Derquinse Projects. All Rights Reserved.