Class ObjectIdCompactSerializer

  • All Implemented Interfaces:

    public class ObjectIdCompactSerializer
    extends java.lang.Object
    implements CompactSerializer<org.bson.types.ObjectId>
    Compact serializer for ObjectId.
    • Constructor Detail

      • ObjectIdCompactSerializer

        public ObjectIdCompactSerializer()
    • Method Detail

      • read

        public org.bson.types.ObjectId read​(@Nonnull
                                            CompactReader reader)
        Specified by:
        read in interface CompactSerializer<org.bson.types.ObjectId>
        reader - reader to read fields of an object
        the object created as a result of read method
      • write

        public void write​(@Nonnull
                          CompactWriter writer,
                          org.bson.types.ObjectId object)
        Specified by:
        write in interface CompactSerializer<org.bson.types.ObjectId>
        writer - CompactWriter to serialize the fields onto
        object - to be serialized.
      • getTypeName

        public java.lang.String getTypeName()
        Description copied from interface: CompactSerializer
        Returns the unique type name for the class CompactSerializer.

        If the class CompactSerializer is ever evolved by adding or removing fields, the type name for the evolved serializers must be the same with the initial version.

        Specified by:
        getTypeName in interface CompactSerializer<org.bson.types.ObjectId>
        the type name
      • getCompactClass

        public java.lang.Class<org.bson.types.ObjectId> getCompactClass()
        Specified by:
        getCompactClass in interface CompactSerializer<org.bson.types.ObjectId>
        the class to be serialized with this serializer.