Class SqlDateSerializer
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.JsonSerializer<T>
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.StdScalarSerializer<T>
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase<Date>
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.SqlDateSerializer
- All Implemented Interfaces:
JsonFormatVisitable
,SchemaAware
,ContextualSerializer
,Serializable
Compared to regular
Date
serialization, we do use String
representation here. Why? Basically to truncate of time part, since
that should not be used by plain SQL date.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.JsonSerializer
JsonSerializer.None
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase
_customFormat, _reusedCustomFormat, _useTimestamp
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType
-
Constructor Summary
ModifierConstructorDescriptionprotected
SqlDateSerializer
(Boolean useTimestamp, DateFormat customFormat) -
Method Summary
Modifier and TypeMethodDescriptionprotected long
_timestamp
(Date value) void
serialize
(Date value, JsonGenerator g, SerializerProvider provider) Method that can be called to ask implementation to serialize values of type this serializer handles.withFormat
(Boolean timestamp, DateFormat customFormat) Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase
_acceptJsonFormatVisitor, _asTimestamp, _serializeAsString, acceptJsonFormatVisitor, createContextual, getSchema, isEmpty
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.StdScalarSerializer
serializeWithType
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId
-
Constructor Details
-
SqlDateSerializer
public SqlDateSerializer() -
SqlDateSerializer
-
-
Method Details
-
withFormat
- Specified by:
withFormat
in classDateTimeSerializerBase<Date>
-
_timestamp
- Specified by:
_timestamp
in classDateTimeSerializerBase<Date>
-
serialize
Description copied from class:JsonSerializer
Method that can be called to ask implementation to serialize values of type this serializer handles.- Specified by:
serialize
in classDateTimeSerializerBase<Date>
- Parameters:
value
- Value to serialize; can not be null.g
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for serializing Objects value contains, if any.- Throws:
IOException
-