public class Mediator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CRUD_MSG_PREFIX |
static String |
CTX_QPLAN |
| Modifier and Type | Method and Description |
|---|---|
Response |
delete(DeleteRequest req) |
Response |
find(FindRequest req)
Finds documents
|
Response |
insert(InsertionRequest req)
Inserts data
|
protected OperationContext |
newCtx(Request request,
CRUDOperation CRUDOperation) |
Response |
save(SaveRequest req)
Saves data.
|
Response |
update(UpdateRequest req)
Updates documents that match the given search criteria
|
public static final String CTX_QPLAN
public static final String CRUD_MSG_PREFIX
public Response insert(InsertionRequest req)
req - Insertion request
Mediator performs constraint and role validation, and passes documents
that pass the validation to the CRUD implementation for that entity. CRUD
implementation can perform further validations.public Response save(SaveRequest req)
req - Save request
Mediator performs constraint validation, and passes documents that pass
the validation to the CRUD implementation for that entity. CRUD
implementation can perform further validations.public Response update(UpdateRequest req)
req - Update request
All documents matching the search criteria are updated using the update
expression given in the request. Then, the updated document is projected
and returned in the response.
The mediator does not perform any constraint validation. The CRUD
implementation must perform all constraint validations and process only
the documents that pass those validations.public Response delete(DeleteRequest req)
public Response find(FindRequest req)
req - Find request
The implementation passes the request to the back-end.protected OperationContext newCtx(Request request, CRUDOperation CRUDOperation)
Copyright © 2015. All rights reserved.