public class Mediator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Mediator.BulkExecutionContext |
| Modifier and Type | Field and Description |
|---|---|
static String |
CRUD_MSG_PREFIX |
static String |
CTX_QPLAN |
| Modifier and Type | Method and Description |
|---|---|
BulkResponse |
bulkRequest(BulkRequest requests) |
Response |
delete(DeleteRequest req) |
Response |
explain(FindRequest req)
Explains the query.
|
Response |
find(FindRequest req)
Finds documents
|
protected Callable<Response> |
getAsyncFind(FindRequest req) |
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
|
protected void |
wait(Mediator.BulkExecutionContext ctx) |
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.public Response explain(FindRequest req)
protected void wait(Mediator.BulkExecutionContext ctx)
protected Callable<Response> getAsyncFind(FindRequest req)
public BulkResponse bulkRequest(BulkRequest requests)
protected OperationContext newCtx(Request request, CRUDOperation CRUDOperation)
Copyright © 2016. All rights reserved.