Class BaseSerializer<T>
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
-
- com.amazonaws.athena.connector.lambda.serde.BaseSerializer<T>
-
- All Implemented Interfaces:
VersionedSerDe.Serializer<T>,com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable,com.fasterxml.jackson.databind.jsonschema.SchemaAware,Serializable
- Direct Known Subclasses:
BlockSerDe.Serializer,BlockSerDeV3.Serializer,BlockSerDeV4.Serializer,ConstraintsSerDe.Serializer,ConstraintsSerDeV4.Serializer,ConstraintsSerDeV5.Serializer,ConstraintsSerDeV6.Serializer,DelegatingSerializer,EncryptionKeySerDe.Serializer,FederatedIdentitySerDe.Serializer,FunctionNameSerDeV4.Serializer,MarkerSerDe.Serializer,OptimizationSubTypeSerDeV4.Serializer,OrderByFieldSerDeV4.Serializer,QueryPlanSerDe.Serializer,RangeSerDe.Serializer,SchemaSerDe.Serializer,SchemaSerDeV3.Serializer,SchemaSerDeV4.Serializer,SplitSerDe.Serializer,TableNameSerDe.Serializer,TypedSerializer
public abstract class BaseSerializer<T> extends com.fasterxml.jackson.databind.ser.std.StdSerializer<T> implements VersionedSerDe.Serializer<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseSerializer(Class<T> clazz)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddoSerialize(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)voidserialize(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)voidserializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)protected voidwriteStringArray(com.fasterxml.jackson.core.JsonGenerator jgen, String fieldName, Collection<String> values)Helper used to help serialize a list of strings.protected voidwriteStringMap(com.fasterxml.jackson.core.JsonGenerator jgen, String fieldName, Map<String,String> values)Helper used to help serialize a list of strings.-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
-
-
-
-
Method Detail
-
serialize
public void serialize(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
- Specified by:
serializein interfaceVersionedSerDe.Serializer<T>- Specified by:
serializein classcom.fasterxml.jackson.databind.ser.std.StdSerializer<T>- Throws:
IOException
-
serializeWithType
public void serializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) throws IOException
- Overrides:
serializeWithTypein classcom.fasterxml.jackson.databind.JsonSerializer<T>- Throws:
IOException
-
doSerialize
public abstract void doSerialize(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
- Specified by:
doSerializein interfaceVersionedSerDe.Serializer<T>- Throws:
IOException
-
writeStringArray
protected void writeStringArray(com.fasterxml.jackson.core.JsonGenerator jgen, String fieldName, Collection<String> values) throws IOExceptionHelper used to help serialize a list of strings.- Parameters:
jgen- The json generator to use.fieldName- The name to associated to the resulting json array.values- The values to populate the array with.- Throws:
IOException- If an error occurs while writing to the generator.
-
writeStringMap
protected void writeStringMap(com.fasterxml.jackson.core.JsonGenerator jgen, String fieldName, Map<String,String> values) throws IOExceptionHelper used to help serialize a list of strings.- Parameters:
jgen- The json generator to use.fieldName- The name to associated to the resulting json array.values- The values to populate the array with.- Throws:
IOException- If an error occurs while writing to the generator.
-
-