/* * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.mdsal.binding.api.query; import com.google.common.annotations.Beta; import org.opendaylight.yangtools.concepts.Immutable; import org.opendaylight.yangtools.yang.binding.DataObject; /** * An opaque query expression. A query execution results in a {@link QueryResult}, which is composed of zero or more * objects of the same type. Implementations of this interface are expected to be effectively-immutable and therefore * thread-safe and reusable. * *
* While this interface does not expose any useful methods, it represents a well-defined concept, which is composed of * three distinct parts: *
* For the purposes of illustration of how these three parts work together, let's imagine the following simple model: * *
* module foo { * list foo { * key name; * * leaf name { * type string; * } * * leaf alias { * type string; * } * * container bar { * list baz { * key id; * * leaf id { * type uint64; * } * * leaf value { * type string; * } * } * } * } * } ** *
* We have two nested lists, each having two leaves -- one addressable as a key, one a plain property. There is a number * of different queries we could perform on such a model: *
* Note how the first and second options differ in what is being searched: *