Class ElasticsearchBigDecimalFieldCodec

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

public class ElasticsearchBigDecimalFieldCodec extends AbstractElasticsearchFieldCodec<BigDecimal>
  • Constructor Details

    • ElasticsearchBigDecimalFieldCodec

      public ElasticsearchBigDecimalFieldCodec(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(BigDecimal value)
    • decode

      public BigDecimal decode(com.google.gson.JsonElement element)
    • 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()