public static class BaseFeeds.ReadContained<BE> extends Traversal<BE,E> implements Feeds.ReadContained
| Constructor and Description |
|---|
ReadContained(TraversalContext<BE,Feed> context) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the entity.
|
Page<E> |
entities(Pager pager) |
E |
entity()
Resolves the entity and returns it.
|
Feeds.Single |
get(String id)
Tries to find a single entity in the current position in the inventory traversal.
|
Feeds.Multiple |
getAll(Filter[][] filters)
Returns access interface to all entities conforming to the provided filters in the current position in the
inventory traversal.
|
void |
update(U u)
Updates the entity.
|
getSingle, isApplicable, mutating, readOnlyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllexistsanyExists, entitiespublic ReadContained(TraversalContext<BE,Feed> context)
public Feeds.Multiple getAll(Filter[][] filters)
ResolvingToMultipleThe 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".getAll in interface ResolvingToMultiple<Feeds.Multiple>filters - the sets of filters to applypublic Feeds.Single get(String id) throws EntityNotFoundException
ResolvingToSingleget in interface ResolvingToSingle<Feeds.Single,String>id - the identification of sorts of the entity to find in the current traversal positionEntityNotFoundExceptionpublic E entity()
throws EntityNotFoundException,
RelationNotFoundException
ResolvableToSingleentity in interface ResolvableToSingle<E extends AbstractElement<?,U>,U extends AbstractElement.Update>EntityNotFoundException - if there is no entity corresponding to the traversalRelationNotFoundException - if there is no relation corresponding to the traversalpublic void delete()
ResolvableToSingledelete in interface ResolvableToSingle<E extends AbstractElement<?,U>,U extends AbstractElement.Update>public void update(U u)
throws EntityNotFoundException,
RelationNotFoundException
ResolvableToSingleupdate in interface ResolvableToSingle<E extends AbstractElement<?,U>,U extends AbstractElement.Update>u - the update to be appliedEntityNotFoundException - if there is no entity corresponding to the traversalRelationNotFoundException - if there is no relation corresponding to the traversalpublic Page<E> entities(Pager pager)
entities in interface ResolvableToMany<E extends AbstractElement<?,U>>pager - the pager object describing the subset of the entities to returnCopyright © 2015 Red Hat, Inc.. All rights reserved.