Checks and casts the specified entity to the defined EntityType.
Checks and casts the specified entity to the defined EntityType.
Entity to be checked
InvalidEntity
if the entity is invalid
Checks and casts the specified entity ID to the defined IdType
Checks and casts the specified entity ID to the defined IdType
ID to be checked
InvalidId
if the id is invalid
Called whenever the result of an operation is a collection of entities.
Called whenever the result of an operation is a collection of entities. The return value of this method is used as the response to the request. Wrapping a generic collection is often useful, since the type parameter is erased at runtime.
The collection to be wrapped
Creates (persists) the specified entity.
Creates (persists) the specified entity. Returns the updated entity, if the operation was successful. Returns None or throws an Exception if the Entity could not be created.
Entity to be created
CRUDServiceError
if the request could not be processed
OperationNotSupported
if this operation is not supported by the service implementation
Deletes the entity with the specified ID.
Deletes the entity with the specified ID. Returns the ID of the deleted entity, or None if the entity does not exist.
ID of the entity to be deleted
CRUDServiceError
if the request could not be processed
OperationNotSupported
if this operation is not supported by the service implementation
Returns true iff the currently processed message is a Request
Returns true iff the currently processed message is a Request
Returns an Iterable with all defined entities.
Returns an Iterable with all defined entities.
CRUDServiceError
if the request could not be processed
OperationNotSupported
if this operation is not supported by the service implementation
Called for non-CRUD messages, ie messages not listed in CRUDService.
Called for non-CRUD messages, ie messages not listed in CRUDService.
the message to be handled
CRUDServiceError
if the request could not be processed
OperationNotSupported
if this operation is not supported by the service implementation
Processes incoming flow requests
Processes incoming flow requests
Returns the entity with the specified ID, or None if the entity does not exist.
Returns the entity with the specified ID, or None if the entity does not exist.
The ID of the requested entity
CRUDServiceError
if the request could not be processed
OperationNotSupported
if this operation is not supported by the service implementation
Returns the Request currently in processing (if any).
Returns the Request currently in processing (if any).
Saves the specified Entity and returns the updated entity.
Saves the specified Entity and returns the updated entity. Returns None, if the entity does not exist.
Entity to be saved (updated)
CRUDServiceError
if the request could not be processed
OperationNotSupported
if this operation is not supported by the service implementation
Base class for services providing CRUD operations on data entities.
type of entity IDs
type of entities handled by this service