Class ElasticsearchBigIntegerFieldCodec
- java.lang.Object
-
- org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchBigIntegerFieldCodec
-
- All Implemented Interfaces:
ElasticsearchFieldCodec<BigInteger>
public class ElasticsearchBigIntegerFieldCodec extends Object implements ElasticsearchFieldCodec<BigInteger>
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchBigIntegerFieldCodec(int decimalScale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigIntegerdecode(com.google.gson.JsonElement element)BigIntegerdecodeAggregationKey(com.google.gson.JsonElement key, com.google.gson.JsonElement keyAsString)Decodes the key returned by a term aggregation.com.google.gson.JsonElementencode(BigInteger value)booleanisCompatibleWith(ElasticsearchFieldCodec<?> obj)Determine whether another codec is compatible with this one, i.e.BigDecimalscalingFactor()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchFieldCodec
encodeForAggregation, encodeForMissing
-
-
-
-
Method Detail
-
encode
public com.google.gson.JsonElement encode(BigInteger value)
- Specified by:
encodein interfaceElasticsearchFieldCodec<BigInteger>
-
decode
public BigInteger decode(com.google.gson.JsonElement element)
- Specified by:
decodein interfaceElasticsearchFieldCodec<BigInteger>
-
decodeAggregationKey
public BigInteger decodeAggregationKey(com.google.gson.JsonElement key, com.google.gson.JsonElement keyAsString)
Description copied from interface:ElasticsearchFieldCodecDecodes the key returned by a term aggregation.- Specified by:
decodeAggregationKeyin interfaceElasticsearchFieldCodec<BigInteger>- Parameters:
key- The "key" property returned by the aggregation. May be a number, a string, ... depending on the field type.keyAsString- The "key_as_string" property returned by the term aggregation. Either null or aJsonPrimitivecontaining a string.- Returns:
- The decoded term.
-
isCompatibleWith
public boolean isCompatibleWith(ElasticsearchFieldCodec<?> obj)
Description copied from interface:ElasticsearchFieldCodecDetermine whether another codec is compatible with this one, i.e. whether it will encode/decode the information to/from the document in a compatible way.- Specified by:
isCompatibleWithin interfaceElasticsearchFieldCodec<BigInteger>- Parameters:
obj- AnotherElasticsearchFieldCodec, nevernull.- Returns:
trueif the given codec is compatible.falseotherwise, or when in doubt.
-
scalingFactor
public BigDecimal scalingFactor()
-
-