public enum NumericFieldBridge extends Enum<NumericFieldBridge> implements FieldBridge, TwoWayFieldBridge
| Enum Constant and Description |
|---|
DOUBLE_FIELD_BRIDGE |
FLOAT_FIELD_BRIDGE |
INT_FIELD_BRIDGE |
LONG_FIELD_BRIDGE |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyToLuceneOptions(LuceneOptions luceneOptions,
String name,
Number value,
org.apache.lucene.document.Document document) |
Object |
get(String name,
org.apache.lucene.document.Document document)
Build the element object from the
Document |
abstract FieldCacheLoadingType |
getFieldCacheLoadingType() |
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.
|
static NumericFieldBridge |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NumericFieldBridge[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NumericFieldBridge INT_FIELD_BRIDGE
public static final NumericFieldBridge FLOAT_FIELD_BRIDGE
public static final NumericFieldBridge DOUBLE_FIELD_BRIDGE
public static final NumericFieldBridge LONG_FIELD_BRIDGE
public static NumericFieldBridge[] values()
for (NumericFieldBridge c : NumericFieldBridge.values()) System.out.println(c);
public static NumericFieldBridge valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic void set(String name, Object value, org.apache.lucene.document.Document document, LuceneOptions luceneOptions)
FieldBridgename to document following
the parameters luceneOptions if the value is not null.
{code}
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
{code}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 final String objectToString(Object object)
TwoWayFieldBridgeobjectToString in interface TwoWayFieldBridgeobject - The object to index.null, but
can be empty.public final Object get(String name, org.apache.lucene.document.Document document)
TwoWayFieldBridgeDocumentget in interface TwoWayFieldBridgename - field namedocument - documentprotected final void applyToLuceneOptions(LuceneOptions luceneOptions, String name, Number value, org.apache.lucene.document.Document document)
public abstract FieldCacheLoadingType getFieldCacheLoadingType()
Copyright © 2006–2014 Hibernate. All rights reserved.