Class ElasticsearchLongFieldCodec

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

public final class ElasticsearchLongFieldCodec extends AbstractElasticsearchFieldCodec<Long>
  • Constructor Details

    • ElasticsearchLongFieldCodec

      public ElasticsearchLongFieldCodec(com.google.gson.Gson gson)
  • Method Details

    • encode

      public com.google.gson.JsonElement encode(Long value)
    • encodeForAggregation

      public com.google.gson.JsonElement encodeForAggregation(ElasticsearchSearchSyntax searchSyntax, Long value)
      Description copied from interface: ElasticsearchFieldCodec
      Encodes a value for inclusion in an aggregation request.
      Parameters:
      searchSyntax - The search syntax.
      value - The value to encode.
      Returns:
      The encoded value.
    • decode

      public Long decode(com.google.gson.JsonElement element)
    • isCompatibleWith

      public boolean isCompatibleWith(ElasticsearchFieldCodec<?> other)
      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:
      other - Another ElasticsearchFieldCodec, never null.
      Returns:
      true if the given codec is compatible. false otherwise, or when in doubt.