Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-650

Add support for querying by leaf-list content

    XMLWordPrintable

Details

    • Improvement
    • Status: In Progress
    • Medium
    • Resolution: Unresolved
    • None
    • None
    • None

    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.

      Attachments

        # Subject Branch Project Status CR V

        Activity

          People

            ivanhrasko Ivan Hrasko
            tibor.kral Tibor Král
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: