@@ -0,0 +1,2292 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.jackrabbit.core.query.lucene;%0A%0Aimport org.apache.lucene.document.FieldSelector;%0Aimport org.apache.lucene.document.FieldSelectorResult;%0A%0A/**%0A * %3Ccode%3EFieldSelectors%3C/code%3E contains commonly used field selectors.%0A */%0Apublic class FieldSelectors %7B%0A%0A    /**%0A     * Do not instanciate.%0A     */%0A    private FieldSelectors() %7B%0A    %7D%0A%0A    public static final FieldSelector UUID = new FieldSelector() %7B%0A        /**%0A         * Only accepts %7B@link FieldNames#UUID%7D.%0A         *%0A         * @param fieldName the field name to check.%0A         * @return result.%0A         */%0A        public FieldSelectorResult accept(String fieldName) %7B%0A            if (FieldNames.UUID == fieldName) %7B%0A                return FieldSelectorResult.LOAD_AND_BREAK;%0A            %7D else %7B%0A                return FieldSelectorResult.NO_LOAD;%0A            %7D%0A        %7D%0A    %7D;%0A%0A    public static final FieldSelector UUID_AND_PARENT = new FieldSelector() %7B%0A        /**%0A         * Accepts %7B@link FieldNames#UUID%7D and %7B@link FieldNames#PARENT%7D.%0A         *%0A         * @param fieldName the field name to check.%0A         * @return result.%0A         */%0A        public FieldSelectorResult accept(String fieldName) %7B%0A            if (FieldNames.UUID == fieldName) %7B%0A                return FieldSelectorResult.LOAD;%0A            %7D else if (FieldNames.PARENT == fieldName) %7B%0A                return FieldSelectorResult.LOAD;%0A            %7D else %7B%0A                return FieldSelectorResult.NO_LOAD;%0A            %7D%0A        %7D%0A    %7D;%0A%7D%0A

Optimize first execution queries for DescendantSelfAxisWeight/ChildAxisQuery - forgot to commit new class FieldSelectors