Package org.apache.jackrabbit.oak.plugins.mongomk.UpdateOp

Examples of org.apache.jackrabbit.oak.plugins.mongomk.UpdateOp.Operation


            String k = entry.getKey();
            if (k.equals(Document.ID)) {
                // avoid exception "Mod on _id not allowed"
                continue;
            }
            Operation op = entry.getValue();
            switch (op.type) {
                case SET: {
                    setUpdates.append(k, op.value);
                    break;
                }
View Full Code Here


            T target = collection.newDocument(this);
            MemoryDocumentStore.applyChanges(target, update);
            docs.add(target);
            for (Entry<String, Operation> entry : update.changes.entrySet()) {
                String k = entry.getKey();
                Operation op = entry.getValue();
                switch (op.type) {
                    case SET:
                    case INCREMENT: {
                        inserts[i].put(k, op.value);
                        break;
View Full Code Here

            T target = collection.newDocument(this);
            MemoryDocumentStore.applyChanges(target, update, comparator);
            docs.add(target);
            for (Entry<Key, Operation> entry : update.getChanges().entrySet()) {
                Key k = entry.getKey();
                Operation op = entry.getValue();
                switch (op.type) {
                    case SET:
                    case INCREMENT: {
                        inserts[i].put(k.toString(), op.value);
                        break;
View Full Code Here

                                              boolean checkConditions) {
        QueryBuilder query = getByKeyQuery(updateOp.id);

        for (Entry<Key, Operation> entry : updateOp.getChanges().entrySet()) {
            Key k = entry.getKey();
            Operation op = entry.getValue();
            switch (op.type) {
                case CONTAINS_MAP_ENTRY: {
                    if (checkConditions) {
                        query.and(k.toString()).exists(op.value);
                    }
View Full Code Here

            Key k = entry.getKey();
            if (k.getName().equals(Document.ID)) {
                // avoid exception "Mod on _id not allowed"
                continue;
            }
            Operation op = entry.getValue();
            switch (op.type) {
                case SET: {
                    setUpdates.append(k.toString(), op.value);
                    break;
                }
View Full Code Here

    }

    private static boolean checkConditions(Document doc,
                                           UpdateOp update) {
        for (Map.Entry<Key, Operation> change : update.getChanges().entrySet()) {
            Operation op = change.getValue();
            if (op.type == Operation.Type.CONTAINS_MAP_ENTRY) {
                Key k = change.getKey();
                Revision r = k.getRevision();
                if (r == null) {
                    throw new IllegalStateException(
View Full Code Here

    public static void applyChanges(@Nonnull Document doc,
                                    @Nonnull UpdateOp update,
                                    @Nonnull Comparator<Revision> comparator) {
        for (Entry<Key, Operation> e : checkNotNull(update).getChanges().entrySet()) {
            Key k = e.getKey();
            Operation op = e.getValue();
            switch (op.type) {
            case SET: {
                doc.put(k.toString(), op.value);
                break;
            }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.mongomk.UpdateOp.Operation

Copyright © 2018 www.massapicom. 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.