Document convertSelectorToDocument(Document selector) {
        Document document = new Document();
        for (String key : selector.keySet()) {
            if (key.startsWith("$")) {
                continue;
            }

            Object value = selector.get(key);
            if (!Utils.containsQueryExpression(value)) {
                Utils.changeSubdocumentValue(document, key, value, (AtomicReference<Integer>) null);
            }
        }
        return document;
    }
Document convertSelectorToDocument ( Document selector ) { Document document = new Document ( ) ; for ( String key : selector . keySet ( ) ) { if ( key . startsWith ( "$" ) ) { continue ; } Object value = selector . get ( key ) ; if ( ! Utils . containsQueryExpression ( value ) ) { Utils . changeSubdocumentValue ( document , key , value , ( AtomicReference < Integer > ) null ) ; } } return document ; }
convert selector used in an upsert statement into a document