Package de.bild.codec

Class ObjectIdGenerator

java.lang.Object
de.bild.codec.ObjectIdGenerator
All Implemented Interfaces:
IdGenerator<org.bson.types.ObjectId>, InstanceAwareIdGenerator<org.bson.types.ObjectId,Object>
Direct Known Subclasses:
Id.DefaultIdGenerator

public class ObjectIdGenerator extends Object implements IdGenerator<org.bson.types.ObjectId>
  • Constructor Details

    • ObjectIdGenerator

      public ObjectIdGenerator()
  • Method Details

    • generate

      public org.bson.types.ObjectId generate()
      Description copied from interface: IdGenerator
      Generate id without knowledge of the instance
      Specified by:
      generate in interface IdGenerator<org.bson.types.ObjectId>
      Returns:
      a new id
    • asBsonValue

      public org.bson.BsonValue asBsonValue(org.bson.types.ObjectId id, TypeCodecRegistry typeCodecRegistry)
      Specified by:
      asBsonValue in interface InstanceAwareIdGenerator<org.bson.types.ObjectId,Object>