public class YearBridge extends Object implements IgnoreAnalyzerBridge, EncodingBridge, TwoWayFieldBridge
| Modifier and Type | Field and Description |
|---|---|
static YearBridge |
INSTANCE |
| Constructor and Description |
|---|
YearBridge() |
| Modifier and Type | Method and Description |
|---|---|
NullMarker |
createNullMarker(String indexNullAs) |
Object |
get(String name,
org.apache.lucene.document.Document document)
Build the element object from the
Document |
NumericFieldSettingsDescriptor.NumericEncodingType |
getEncodingType()
Define the numeric encoding to use for the brdige.
|
String |
objectToString(Object object)
Convert the object representation to a string.
|
void |
set(String name,
Object value,
org.apache.lucene.document.Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value.
|
public static final YearBridge INSTANCE
public void set(String name, Object value, org.apache.lucene.document.Document document, LuceneOptions luceneOptions)
FieldBridge
A common implementation is to add a Field with the given name to document following
the parameters luceneOptions if the value is not null.
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
set in interface FieldBridgename - The field to add to the Lucene documentvalue - The actual value to indexdocument - The Lucene document into which we want to index the value.luceneOptions - Contains the parameters used for adding value to
the Lucene document.public Object get(String name, org.apache.lucene.document.Document document)
TwoWayFieldBridgeDocumentget in interface TwoWayFieldBridgename - field namedocument - documentpublic String objectToString(Object object)
TwoWayFieldBridgeobjectToString in interface StringBridgeobjectToString in interface TwoWayFieldBridgeobject - The object to index.null, but
can be empty.public NumericFieldSettingsDescriptor.NumericEncodingType getEncodingType()
EncodingBridgegetEncodingType in interface EncodingBridgeNumericFieldSettingsDescriptor.NumericEncodingType.UNKNOWN if
this bridge does not use numeric encoding.public NullMarker createNullMarker(String indexNullAs) throws NumberFormatException
createNullMarker in interface EncodingBridgeindexNullAs - The value of Field.indexNullAs().NumberFormatExceptionCopyright © 2006–2017 Hibernate. All rights reserved.