net.conquiris.lucene.search
Interface FieldValues<T>

Type Parameters:
T - Field value type.
All Superinterfaces:
FieldNameProperty

public interface FieldValues<T>
extends FieldNameProperty

Interface for the fields of a search hit. All methods return non-null values.

Author:
Andres Rodriguez

Field Summary
 
Fields inherited from interface net.conquiris.schema.FieldNameProperty
NAME
 
Method Summary
 T get()
          Returns the required first value of the field.
 List<T> getAll()
          Returns all the values of the field.
 Optional<T> getOptional()
          Return the optional first value of the field.
 T or(T defaultValue)
          Returns the field value of the field or the provided non-null value if the document contains no value for the field.
 T orNull()
          Returns the field value of the field or null if the document contains no value for the field.
 
Methods inherited from interface net.conquiris.schema.FieldNameProperty
getName
 

Method Detail

getAll

List<T> getAll()
Returns all the values of the field.


getOptional

Optional<T> getOptional()
Return the optional first value of the field.


orNull

T orNull()
Returns the field value of the field or null if the document contains no value for the field.


or

T or(T defaultValue)
Returns the field value of the field or the provided non-null value if the document contains no value for the field.


get

T get()
Returns the required first value of the field.

Throws:
IllegalStateException - if the document contains no value for the field.


Copyright © 2013 Derquinse Projects. All Rights Reserved.