Package org.apache.jackrabbit.oak.plugins.index.property.strategy

Examples of org.apache.jackrabbit.oak.plugins.index.property.strategy.IndexStoreStrategy


            // check uniqueness constraints when leaving the root
            if (keysToCheckForUniqueness != null
                    && !keysToCheckForUniqueness.isEmpty()) {
                NodeState indexMeta = definition.getNodeState();
                IndexStoreStrategy s = getStrategy(true);
                for (String key : keysToCheckForUniqueness) {
                    if (s.count(indexMeta, singleton(key), 2) > 1) {
                        String msg = String.format("Uniqueness constraint violated at path [%s] for one of the " +
                                        "property in %s having value %s", getPath(), propertyNames, key);
                        throw new CommitFailedException(
                                CONSTRAINT, 30, msg);
                    }
View Full Code Here


            definition.child(INDEX_CONTENT_NODE_NAME);

            // check uniqueness constraints when leaving the root
            if (unique && !keysToCheckForUniqueness.isEmpty()) {
                NodeState indexMeta = definition.getNodeState();
                IndexStoreStrategy s = getStrategy(unique);
                for (String key : keysToCheckForUniqueness) {
                    if (s.count(indexMeta, singleton(key), 2) > 1) {
                        throw new CommitFailedException(
                                CONSTRAINT, 30,
                                "Uniqueness constraint violated for key " + key);
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.index.property.strategy.IndexStoreStrategy

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.