From 087fb89896e797df7ed61630c89569c97d8a8b3e Mon Sep 17 00:00:00 2001 From: Scott McAllister Date: Fri, 15 Dec 2017 20:39:38 -0400 Subject: [PATCH] replace ViewQuery annotation with CouchbaseView --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2633dd4..926f013 100644 --- a/README.md +++ b/README.md @@ -196,13 +196,13 @@ import java.util.List; public interface DeviceAccessor extends GenericAccessor { - @ViewQuery("/^DEVICE/.test(meta.id)") + @CouchbaseView("/^DEVICE/.test(meta.id)") public List findAll(); } ``` -The `findall()` method will be autogenerated. The `@ViewQuery` annotation will generate a Couchbase Design Document called DEVICE with a view called findAll like so: +The `findall()` method will be autogenerated. The `@CouchbaseView` annotation will generate a Couchbase Design Document called DEVICE with a view called findAll like so: ```javascript function (doc, meta) { @@ -212,7 +212,7 @@ function (doc, meta) { } ``` -The emit statement can be controlled as well, `emit(meta.id, null)` is the default. The following annotation will generate a view that emits full documents: `@ViewQuery("/^DEVICE/.test(meta.id)", emit = "emit(meta.id, doc)")`. Note that the name of the Design Document will be your model class `.toUpperCase()`. +The emit statement can be controlled as well, `emit(meta.id, null)` is the default. The following annotation will generate a view that emits full documents: `@CouchbaseView("/^DEVICE/.test(meta.id)", emit = "emit(meta.id, doc)")`. Note that the name of the Design Document will be your model class `.toUpperCase()`. The extended `GenericAccessor` interface has the following contract, all methods will be automatically implemented: