class DocumentResource {

    @POST
    @Path("/bulk")
    @Consumes(MediaType.APPLICATION_JSON)
    @Timed
    @ApiOperation("Save list of documents")
    public Response saveDocuments(@PathParam("table") String table, @Valid final List<Document> documents) {
        Map<String, List<Document>> tableVsDocuments = getTableVsDocuments(table, documents);
        for(Map.Entry<String, List<Document>> entry : CollectionUtils.nullSafeSet(tableVsDocuments.entrySet())) {
            queryStore.save(entry.getKey(), entry.getValue());
        }
        return Response.created(URI.create("/" + table))
                .build();
    }

    @Inject public  DocumentResource(QueryStore queryStore, TableTranslator tableTranslator);

}