public void insert(final DBObject document) {
        isTrue("already executed", !closed);
        if (document.get(ID_FIELD_NAME) == null) {
            document.put(ID_FIELD_NAME, new ObjectId());
        }
        addRequest(new InsertRequest(document, collection.getObjectCodec()));
    }
public void insert(final DBObject document) {
        isTrue("already executed", !closed);
        if (document.get(ID_FIELD_NAME) == null) {
            document.put(ID_FIELD_NAME, new ObjectId());
        }
        addRequest(new InsertRequest(document, collection.getObjectCodec()));
    }
public void insert ( final DBObject document ) { isTrue ( "already executed" , ! closed ) ; if ( document . get ( ID_FIELD_NAME ) == null ) { document . put ( ID_FIELD_NAME , new ObjectId ( ) ) ; } addRequest ( new InsertRequest ( document , collection . getObjectCodec ( ) ) ) ; }
Add an insert request to the bulk operation

@param document the document to insert
Add an insert request to the bulk operation