Class AbstractLuceneNumericFieldCodec<F,E extends Number>
- java.lang.Object
-
- org.hibernate.search.backend.lucene.types.codec.impl.AbstractLuceneNumericFieldCodec<F,E>
-
- All Implemented Interfaces:
LuceneFieldCodec<F>,LuceneStandardFieldCodec<F,E>
- Direct Known Subclasses:
LuceneBigDecimalFieldCodec,LuceneBigIntegerFieldCodec,LuceneBooleanFieldCodec,LuceneByteFieldCodec,LuceneDoubleFieldCodec,LuceneFloatFieldCodec,LuceneInstantFieldCodec,LuceneIntegerFieldCodec,LuceneLocalDateFieldCodec,LuceneLocalDateTimeFieldCodec,LuceneLocalTimeFieldCodec,LuceneLongFieldCodec,LuceneMonthDayFieldCodec,LuceneOffsetDateTimeFieldCodec,LuceneOffsetTimeFieldCodec,LuceneShortFieldCodec,LuceneYearFieldCodec,LuceneYearMonthFieldCodec,LuceneZonedDateTimeFieldCodec
public abstract class AbstractLuceneNumericFieldCodec<F,E extends Number> extends Object implements LuceneStandardFieldCodec<F,E>
-
-
Constructor Summary
Constructors Constructor Description AbstractLuceneNumericFieldCodec(Indexing indexing, DocValues docValues, Storage storage, F indexNullAsValue)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddToDocument(LuceneDocumentContent documentBuilder, String absoluteFieldPath, F value)Encode the given value in the document by adding new fields to the Lucene document.abstract Fdecode(E encoded)abstract LuceneNumericDomain<E>getDomain()booleanisCompatibleWith(LuceneFieldCodec<?> obj)Determine whether the given codec provides an encoding that is compatible with this codec, i.e.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.backend.lucene.types.codec.impl.LuceneFieldCodec
decode
-
Methods inherited from interface org.hibernate.search.backend.lucene.types.codec.impl.LuceneStandardFieldCodec
encode
-
-
-
-
Method Detail
-
addToDocument
public final void addToDocument(LuceneDocumentContent documentBuilder, String absoluteFieldPath, F value)
Description copied from interface:LuceneFieldCodecEncode the given value in the document by adding new fields to the Lucene document.- Specified by:
addToDocumentin interfaceLuceneFieldCodec<F>- Parameters:
documentBuilder- The document builder.absoluteFieldPath- The absolute path of the field.value- The value to encode.
-
isCompatibleWith
public boolean isCompatibleWith(LuceneFieldCodec<?> obj)
Description copied from interface:LuceneFieldCodecDetermine whether the given codec provides an encoding that is compatible with this codec, i.e. whether itsLuceneFieldCodec.decode(IndexableField)andLuceneStandardFieldCodec.encode(Object)methods behave the same way.NOTE:
LuceneFieldCodec.addToDocument(LuceneDocumentContent, String, Object)may behave differently, e.g. it may add docvalues while this codec does not. The behavior ofLuceneFieldCodec.addToDocument(LuceneDocumentContent, String, Object)is considered irrelevant when checking the equivalence of encoding, because such differences should be accounted for through other ways (fields being assigned incompatible predicate factories, etc.).- Specified by:
isCompatibleWithin interfaceLuceneFieldCodec<F>- Parameters:
obj- AnotherLuceneFieldCodec, nevernull.- Returns:
trueif the given codec is compatible.falseotherwise, or when in doubt.
-
getDomain
public abstract LuceneNumericDomain<E> getDomain()
-
-