2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.api.query;
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.binding.DataObject;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16 * Primary entry point to creating {@link QueryExpression} instances.
19 public interface QueryFactory {
21 * Create a new {@link DescendantQueryBuilder} for a specified root path. Root path must be a non-wildcard
22 * InstanceIdentifier in general sense. If the target type represents a list, the last path argument may be a
23 * wildcard, in which case the path is interpreted to search the specified list. Inner path elements have to be
24 * always non-wildcarded.
26 * @param <T> Target object type
27 * @param rootPath Subtree root
28 * @return a subtree query instance
29 * @throws IllegalArgumentException if rootPath is incorrect
30 * @throws NullPointerException if rootPath is null
32 <T extends DataObject> @NonNull DescendantQueryBuilder<T> querySubtree(InstanceIdentifier<T> rootPath);