public static class BaseEnvironments.Single<BE> extends Traversal<BE,E> implements Environments.Single
| Constructor and Description |
|---|
Single(TraversalContext<BE,Environment> context) |
| Modifier and Type | Method and Description |
|---|---|
Metrics.Read |
allMetrics()
Returns access to all metrics in this environment regardless of whether they are under some feed or
directly under the environment.
|
Resources.Read |
allResources()
Returns access to all resources in this environment regardless of whether they are under some feed or
directly under the environment.
|
void |
delete()
Deletes the entity.
|
Page<E> |
entities(Pager pager) |
E |
entity()
Resolves the entity and returns it.
|
Metrics.ReadWrite |
feedlessMetrics() |
Resources.ReadWrite |
feedlessResources() |
Feeds.ReadWrite |
feeds() |
Relationships.ReadWrite |
relationships() |
Relationships.ReadWrite |
relationships(Relationships.Direction direction) |
void |
update(U u)
Updates the entity.
|
getSingle, isApplicable, mutating, readOnlyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, entity, exists, updaterelationships, relationshipsanyExists, entitiespublic Single(TraversalContext<BE,Environment> context)
public Feeds.ReadWrite feeds()
public Resources.ReadWrite feedlessResources()
public Metrics.ReadWrite feedlessMetrics()
public Resources.Read allResources()
public Metrics.Read allMetrics()
Note that it is not possible to get a single metric from this access interface because the id is not guaranteed to be unique amongst metrics under different feeds.
public Relationships.ReadWrite relationships()
public Relationships.ReadWrite relationships(Relationships.Direction direction)
public 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.