Class ObjectIdGenerator

  • All Implemented Interfaces:
    IdGenerator

    public class ObjectIdGenerator
    extends Object
    implements IdGenerator
    Creates new ObjectId instances as IDs for MongoDB Documents.
    Since:
    3.0
    • Constructor Detail

      • ObjectIdGenerator

        public ObjectIdGenerator()
    • Method Detail

      • generate

        public Object generate()
        Description copied from interface: IdGenerator
        Generates an ID for a MongoDB Document.
        Specified by:
        generate in interface IdGenerator
        Returns:
        any type of Object representing an ID.