class DocumentResource {

    @POST
    @Consumes(MediaType.APPLICATION_JSON)
    @Timed
    @ApiOperation("Save Document")
    public Response saveDocument(@PathParam("table") String table, @Valid final Document document) {
        String tableName = tableTranslator.getTable(table, document);
        if(tableName != null) {
            queryStore.save(tableName, document);
        }
        if(tableName != null && !table.equals(tableName)) {
            queryStore.save(table, document);
        }
        return Response.created(URI.create("/" + document.getId()))
                .build();
    }

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

}