[MDSAL-650] Add support for querying by leaf-list content Created: 05/Jan/21  Updated: 22/Jan/24

Status: In Progress
Project: mdsal
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Medium
Reporter: Tibor Král Assignee: Ivan Hrasko
Resolution: Unresolved Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The Executor engine provides the option to query elements based on their leafs. This means you can build query like: "give me all elements of list "nodes" which have their leaf "node-class" set to string "foo".

factory.querySubtree(InstanceIdentifier.create(Some.class))
            .extractChild(Nodes.class)
                .matching().leaf(Nodes::getNodeClass).valueEquals("foo").build();

If we change the leaf "node-class" to leaf-list "node-classes", the query would looke like:
"give me all elements of list "nodes" which contain strings "foo" and "bar" in their leaf-list "node-classes" "

factory.querySubtree(InstanceIdentifier.create(Some.class))
            .extractChild(Nodes.class)
                .matching().leaf(Nodes::getNodeClasses).contains(List.of("foo", "bar")).build();

Add support fot leafList.contains() matching.


Generated at Wed Feb 07 20:10:24 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.