Class ElasticsearchBigIntegerFieldCodec

java.lang.Object
org.hibernate.search.backend.elasticsearch.types.codec.impl.AbstractElasticsearchFieldCodec<BigInteger>
org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchBigIntegerFieldCodec
All Implemented Interfaces:
ElasticsearchFieldCodec<BigInteger>

public class ElasticsearchBigIntegerFieldCodec extends AbstractElasticsearchFieldCodec<BigInteger>
  • Constructor Details

    • ElasticsearchBigIntegerFieldCodec

      public ElasticsearchBigIntegerFieldCodec(com.google.gson.Gson gson, int decimalScale)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • encode

      public com.google.gson.JsonElement encode(BigInteger value)
    • decode

      public BigInteger decode(com.google.gson.JsonElement element)
    • decodeAggregationKey

      public BigInteger decodeAggregationKey(com.google.gson.JsonElement key, com.google.gson.JsonElement keyAsString)
      Description copied from interface: ElasticsearchFieldCodec
      Decodes the key returned by a term aggregation.
      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 a JsonPrimitive containing a string.
      Returns:
      The decoded term.
    • isCompatibleWith

      public boolean isCompatibleWith(ElasticsearchFieldCodec<?> obj)
      Description copied from interface: ElasticsearchFieldCodec
      Determine 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.
      Parameters:
      obj - Another ElasticsearchFieldCodec, never null.
      Returns:
      true if the given codec is compatible. false otherwise, or when in doubt.
    • scalingFactor

      public BigDecimal scalingFactor()