Id - the type of the identification of the entity (usually a string)U - type of entity update classB - the blueprint type that supplies data necessary to create a new entitySingle - the access interface to a single entitypublic interface WriteInterface<U,B extends Blueprint,Single,Id>
| Modifier and Type | Method and Description |
|---|---|
Single |
create(B blueprint)
Creates a new entity at the current position in the inventory traversal.
|
void |
delete(Id id)
Deletes an entity with the provided id from the current position in the inventory traversal.
|
void |
update(Id id,
U update)
Persists the provided entity on the current position in the inventory traversal.
|
Single create(B blueprint) throws EntityAlreadyExistsException
blueprint - the blueprint to be used to create the new entityEntityAlreadyExistsException - if the entity already existsIllegalArgumentException - if the blueprint or context in which the entity is being create is somehow
invalidvoid update(Id id, U update) throws EntityNotFoundException
id - the id of the entity to updateupdate - the updates to the entityEntityNotFoundException - if the entity is not found in the databaseIllegalArgumentException - if the supplied entity could not be updated for some reasonvoid delete(Id id) throws EntityNotFoundException
id - the id of the entity to deleteEntityNotFoundException - if an entity with given ID doesn't exist on the current position in the inventory
traversalIllegalArgumentException - if the supplied entity could not be deleted for some reasonCopyright © 2015 Red Hat, Inc.. All rights reserved.