/** * Creates a ViewQuery pre-configured with correct dbPath, design document id and view name. * @param viewName * @return */ protected ViewQuery createQuery(String viewName) { return new ViewQuery() .dbPath(db.path()) .designDocId(stdDesignDocumentId) .viewName(viewName); } /**
/** * For multiple-key queries (as of CouchDB 0.9). Keys will be JSON-encoded. * @param keyList a list of Object, will be JSON encoded according to each element's type. * @return the view query for chained calls */ public ViewQuery keys(Collection<?> keyList) { reset(); keys = Keys.of(keyList); return this; }
@Override public ReplicationStatus replicateTo(String target) { ReplicationCommand cmd = new ReplicationCommand.Builder() .target(target).source(dbName).build(); return dbInstance.replicate(cmd); }