de.undercouch.bson4jackson.serializers
Class BsonTimestampSerializer

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonSerializer<T>
      extended by de.undercouch.bson4jackson.serializers.BsonSerializer<Timestamp>
          extended by de.undercouch.bson4jackson.serializers.BsonTimestampSerializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class BsonTimestampSerializer
extends BsonSerializer<Timestamp>

Serializer for MongoDB Timestamps

Since:
1.3

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
 
Constructor Summary
BsonTimestampSerializer()
           
 
Method Summary
 void serialize(Timestamp timestamp, BsonGenerator bsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
          Serialize the given object using the given BsonGenerator
 
Methods inherited from class de.undercouch.bson4jackson.serializers.BsonSerializer
serialize
 
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isUnwrappingSerializer, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BsonTimestampSerializer

public BsonTimestampSerializer()
Method Detail

serialize

public void serialize(Timestamp timestamp,
                      BsonGenerator bsonGenerator,
                      com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
               throws java.io.IOException
Description copied from class: BsonSerializer
Serialize the given object using the given BsonGenerator

Specified by:
serialize in class BsonSerializer<Timestamp>
Parameters:
timestamp - The object to serialize
bsonGenerator - The generator to serialize to
serializerProvider - The serialization provider
Throws:
java.io.IOException - If an error occurred writing to the stream
com.fasterxml.jackson.core.JsonProcessingException - If a JSON error occurred