Class LuceneYearFieldCodec
- java.lang.Object
-
- org.hibernate.search.backend.lucene.types.codec.impl.AbstractLuceneNumericFieldCodec<Year,Integer>
-
- org.hibernate.search.backend.lucene.types.codec.impl.LuceneYearFieldCodec
-
- All Implemented Interfaces:
LuceneFieldCodec<Year>,LuceneStandardFieldCodec<Year,Integer>
public final class LuceneYearFieldCodec extends AbstractLuceneNumericFieldCodec<Year,Integer>
-
-
Constructor Summary
Constructors Constructor Description LuceneYearFieldCodec(Indexing indexing, DocValues docValues, Storage storage, Year indexNullAsValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Yeardecode(Integer encoded)Yeardecode(org.apache.lucene.index.IndexableField field)Extract the value from the given stored field.Integerencode(Year value)Encode the given value.LuceneNumericDomain<Integer>getDomain()-
Methods inherited from class org.hibernate.search.backend.lucene.types.codec.impl.AbstractLuceneNumericFieldCodec
addToDocument, isCompatibleWith
-
-
-
-
Method Detail
-
decode
public Year decode(org.apache.lucene.index.IndexableField field)
Description copied from interface:LuceneFieldCodecExtract the value from the given stored field.Typically used in projections.
- Parameters:
field- The document field. Nevernull.- Returns:
- The decoded value.
-
encode
public Integer encode(Year value)
Description copied from interface:LuceneStandardFieldCodecEncode the given value.Useful for predicates and sorts in particular.
- Parameters:
value- The value to encode.
-
decode
public Year decode(Integer encoded)
- Specified by:
decodein classAbstractLuceneNumericFieldCodec<Year,Integer>
-
getDomain
public LuceneNumericDomain<Integer> getDomain()
- Specified by:
getDomainin classAbstractLuceneNumericFieldCodec<Year,Integer>
-
-