Package org.bson.codecs
Class ObjectIdGenerator
java.lang.Object
org.bson.codecs.ObjectIdGenerator
- All Implemented Interfaces:
IdGenerator
Creates new
ObjectId
instances as IDs for MongoDB Documents.- Since:
- 3.0
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ObjectIdGenerator
public ObjectIdGenerator()
-
-
Method Details
-
generate
Description copied from interface:IdGenerator
Generates an ID for a MongoDB Document.- Specified by:
generate
in interfaceIdGenerator
- Returns:
- any type of Object representing an ID.
-