Class ElasticsearchJsonElementFieldCodec
java.lang.Object
org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchJsonElementFieldCodec
- All Implemented Interfaces:
ElasticsearchFieldCodec<com.google.gson.JsonElement>
public class ElasticsearchJsonElementFieldCodec
extends Object
implements ElasticsearchFieldCodec<com.google.gson.JsonElement>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElementdecode(com.google.gson.JsonElement element) com.google.gson.JsonElementencode(com.google.gson.JsonElement value) fromJsonElementToString(com.google.gson.JsonElement value) com.google.gson.JsonElementfromJsonStringToElement(String 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 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, decodeAggregationKey, encodeForAggregation, encodeForMissing
-
Constructor Details
-
ElasticsearchJsonElementFieldCodec
public ElasticsearchJsonElementFieldCodec(com.google.gson.Gson gson)
-
-
Method Details
-
encode
public com.google.gson.JsonElement encode(com.google.gson.JsonElement value) - Specified by:
encodein interfaceElasticsearchFieldCodec<com.google.gson.JsonElement>
-
decode
public com.google.gson.JsonElement decode(com.google.gson.JsonElement element) - Specified by:
decodein interfaceElasticsearchFieldCodec<com.google.gson.JsonElement>
-
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.- Specified by:
isCompatibleWithin interfaceElasticsearchFieldCodec<com.google.gson.JsonElement>- Parameters:
other- AnotherElasticsearchFieldCodec, nevernull.- Returns:
trueif the given codec is compatible.falseotherwise, or when in doubt.
-
fromJsonStringToElement
- Specified by:
fromJsonStringToElementin interfaceElasticsearchFieldCodec<com.google.gson.JsonElement>
-
fromJsonElementToString
- Specified by:
fromJsonElementToStringin interfaceElasticsearchFieldCodec<com.google.gson.JsonElement>
-