public interface ResolvingToMultiple<Multiple>
ResolvingToSingle if the same type of the entity
the position represents can be resolved in multiple ways - for an example, see how
Environments.BrowserBase.allResources() is defined.| Modifier and Type | Method and Description |
|---|---|
default Multiple |
getAll(Filter... filters)
Returns access interface to all entities conforming to provided filters in the current position in the inventory
traversal.
|
Multiple |
getAll(Filter[][] filters)
Returns access interface to all entities conforming to the provided filters in the current position in the
inventory traversal.
|
default Multiple getAll(Filter... filters)
Each of the filters is applied on the source entities. If you want the filters to be applied sequentially
on the intermediate results, use getAll(Filter[][]).
filters - the (possibly empty) list of filters to apply.Multiple getAll(Filter[][] filters)
The filters parameter is actually composed of individual sets of filters each of which is applied to the "source" entities. Each set can have multiple filters that are then applied one after another on their intermediate results. This becomes useful when you want to filter by sources having some kind of relationships with other entities and in addition filter on the sources themselves, too. E.g.:
inventory.tenants().getAll(new Filter[][]{{Related.by("myRel"), With.type(ResourceType.class)},
{With.id("asf")}}).entities();
The filter above would first check that the tenants in question have a relationship called "myRel" with some
resource types and then would also check if the tenant has ID "asf".filters - the sets of filters to applyCopyright © 2015 Red Hat, Inc.. All rights reserved.