Package com.mongodb

Examples of com.mongodb.DBCollection.update()


                    ConfirmDialog confirm = new ConfirmDialog(null, "Confirm Update", null, text);
                    if (!confirm.show()) {
                        return null;
                    }
                }
                return col.update(query, (DBObject) update.copy(), upsert, multi);
            }

            @Override
            public String getNS() {
                return col.getFullName();
View Full Code Here


                                        if (!obj.containsField(field)) {
                                            throw new Exception("Upsert field " + field + " not present in object " + obj.toString());
                                        }
                                        query.put(field, obj.get(field));
                                    }
                                    col.update(query, obj, true, false);
                                }
                            } else {
                                if (bulk) {
                                    if (batch.size() > 1000) {
                                        col.insert(batch);
View Full Code Here

        final DBCollection col = dv.getDBCursor().getCollection();
        new DbJob() {

            @Override
            public Object doRun() {
                return col.update(query, update, false, false);
            }

            @Override
            public String getNS() {
                return col.getFullName();
View Full Code Here

        new DbJob() {

            @Override
            public Object doRun() {
                return col.update(query, update);
            }

            @Override
            public String getNS() {
                return col.getFullName();
View Full Code Here

        new DbJob() {

            @Override
            public Object doRun() {
                return col.update(query, update);
            }

            @Override
            public String getNS() {
                return col.getFullName();
View Full Code Here

       
        new DbJob() {

            @Override
            public Object doRun() throws IOException {
                return settings.update(query, newDoc, true, false);
            }

            @Override
            public String getNS() {
                return settings.getFullName();
View Full Code Here

        final DBCollection col = dv.getDBCursor().getCollection();
        new DbJob() {

            @Override
            public Object doRun() {
                return col.update(query, update, false, false);
            }

            @Override
            public String getNS() {
                return col.getFullName();
View Full Code Here

        final DBCollection col = dv.getDBCursor().getCollection();
        new DbJob() {

            @Override
            public Object doRun() {
                return col.update(query, update, false, false);
            }

            @Override
            public String getNS() {
                return col.getFullName();
View Full Code Here

        if (log.isTraceEnabled())
            log.trace("Executing update(" + dbColl.getName() + ") for query: " + q + ", ops: " + u + ", multi: " + multi + ", upsert: " + createIfMissing);

        WriteResult wr;
        if (wc == null)
            wr = dbColl.update(q, u, createIfMissing, multi);
        else
            wr = dbColl.update(q, u, createIfMissing, multi, wc);

        throwOnError(wc, wr);
View Full Code Here

        WriteResult wr;
        if (wc == null)
            wr = dbColl.update(q, u, createIfMissing, multi);
        else
            wr = dbColl.update(q, u, createIfMissing, multi, wc);

        throwOnError(wc, wr);

        return new UpdateResults<T>(wr);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.