Class ElasticsearchBooleanFieldCodec
java.lang.Object
org.hibernate.search.backend.elasticsearch.types.codec.impl.AbstractElasticsearchFieldCodec<Boolean>
org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchBooleanFieldCodec
- All Implemented Interfaces:
ElasticsearchFieldCodec<Boolean>
-
Field Summary
Fields inherited from class org.hibernate.search.backend.elasticsearch.types.codec.impl.AbstractElasticsearchFieldCodec
gson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(com.google.gson.JsonElement element) decodeAggregationKey(com.google.gson.JsonElement key, com.google.gson.JsonElement keyAsString) Decodes the key returned by a term aggregation.com.google.gson.JsonElementfromJsonElementToString(com.google.gson.JsonElement value) booleanisCompatibleWith(ElasticsearchFieldCodec<?> other) 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.Methods inherited from class org.hibernate.search.backend.elasticsearch.types.codec.impl.AbstractElasticsearchFieldCodec
fromJsonStringToElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchFieldCodec
canDecodeArrays, encodeForAggregation, encodeForMissing
-
Constructor Details
-
ElasticsearchBooleanFieldCodec
public ElasticsearchBooleanFieldCodec(com.google.gson.Gson gson)
-
-
Method Details
-
encode
-
decode
-
decodeAggregationKey
public Boolean decodeAggregationKey(com.google.gson.JsonElement key, com.google.gson.JsonElement keyAsString) Description copied from interface:ElasticsearchFieldCodecDecodes 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 aJsonPrimitivecontaining a string.- Returns:
- The decoded term.
-
isCompatibleWith
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.- Parameters:
other- AnotherElasticsearchFieldCodec, nevernull.- Returns:
trueif the given codec is compatible.falseotherwise, or when in doubt.
-
fromJsonElementToString
- Specified by:
fromJsonElementToStringin interfaceElasticsearchFieldCodec<Boolean>- Overrides:
fromJsonElementToStringin classAbstractElasticsearchFieldCodec<Boolean>
-