Class ElasticsearchLongFieldCodec
- java.lang.Object
-
- org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchLongFieldCodec
-
- All Implemented Interfaces:
ElasticsearchFieldCodec<Long>
public class ElasticsearchLongFieldCodec extends Object implements ElasticsearchFieldCodec<Long>
-
-
Field Summary
Fields Modifier and Type Field Description static ElasticsearchLongFieldCodecINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Longdecode(com.google.gson.JsonElement element)com.google.gson.JsonElementencode(Long value)com.google.gson.JsonElementencodeForAggregation(ElasticsearchSearchSyntax searchSyntax, Long value)Encodes a value for inclusion in an aggregation request.booleanisCompatibleWith(ElasticsearchFieldCodec<?> other)Determine whether another codec is compatible with this one, i.e.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.backend.elasticsearch.types.codec.impl.ElasticsearchFieldCodec
decodeAggregationKey, encodeForMissing
-
-
-
-
Field Detail
-
INSTANCE
public static final ElasticsearchLongFieldCodec INSTANCE
-
-
Method Detail
-
encode
public com.google.gson.JsonElement encode(Long value)
- Specified by:
encodein interfaceElasticsearchFieldCodec<Long>
-
encodeForAggregation
public com.google.gson.JsonElement encodeForAggregation(ElasticsearchSearchSyntax searchSyntax, Long value)
Description copied from interface:ElasticsearchFieldCodecEncodes a value for inclusion in an aggregation request.- Specified by:
encodeForAggregationin interfaceElasticsearchFieldCodec<Long>- Parameters:
searchSyntax- The search syntax.value- The value to encode.- Returns:
- The encoded value.
-
decode
public Long decode(com.google.gson.JsonElement element)
- Specified by:
decodein interfaceElasticsearchFieldCodec<Long>
-
isCompatibleWith
public boolean isCompatibleWith(ElasticsearchFieldCodec<?> other)
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<Long>- Parameters:
other- AnotherElasticsearchFieldCodec, nevernull.- Returns:
trueif the given codec is compatible.falseotherwise, or when in doubt.
-
-