use of com.cloudant.client.api.views.UnpaginatedRequestBuilder in project sw360 by eclipse.
the class DatabaseRepositoryCloudantClient method queryForIdsAsValue.
public Set<String> queryForIdsAsValue(ViewRequestBuilder query, Set<String> keys) {
String[] arrayOfString = new String[keys.size()];
int index = 0;
for (String str : keys) arrayOfString[index++] = str;
UnpaginatedRequestBuilder req = query.newRequest(Key.Type.STRING, Object.class).keys(arrayOfString);
return queryForIdsFromReqBuilder(req);
}
use of com.cloudant.client.api.views.UnpaginatedRequestBuilder in project sw360 by eclipse.
the class DatabaseRepositoryCloudantClient method queryByIds.
public List<T> queryByIds(String viewName, Collection<String> ids) {
String[] idStrs = new String[ids.size()];
int index = 0;
for (String str : ids) idStrs[index++] = str;
ViewRequestBuilder query = connector.createQuery(type, viewName);
UnpaginatedRequestBuilder reqBuilder = query.newRequest(Key.Type.STRING, Object.class).includeDocs(true).keys(idStrs);
return queryView(reqBuilder);
}
use of com.cloudant.client.api.views.UnpaginatedRequestBuilder in project sw360 by eclipse.
the class DatabaseRepositoryCloudantClient method queryForIdsAsValue.
public Set<String> queryForIdsAsValue(String queryName, String startKey, String endKey) {
ViewRequestBuilder query = connector.createQuery(type, queryName);
UnpaginatedRequestBuilder req = query.newRequest(Key.Type.STRING, Object.class).startKey(startKey).endKey(endKey);
return queryForIdsAsValue(req);
}
use of com.cloudant.client.api.views.UnpaginatedRequestBuilder in project sw360 by eclipse.
the class DatabaseRepositoryCloudantClient method queryForIds.
public Collection<? extends String> queryForIds(String queryName, ComplexKey startKeys, ComplexKey endKeys) {
ViewRequestBuilder query = connector.createQuery(type, queryName);
UnpaginatedRequestBuilder reqBuilder = query.newRequest(Key.Type.COMPLEX, Object.class).startKey(startKeys).endKey(endKeys);
return queryForIds(reqBuilder);
}
use of com.cloudant.client.api.views.UnpaginatedRequestBuilder in project sw360 by eclipse.
the class DatabaseRepositoryCloudantClient method queryView.
public List<T> queryView(String viewName, String key) {
ViewRequestBuilder query = connector.createQuery(type, viewName);
UnpaginatedRequestBuilder reqBuild = query.newRequest(Key.Type.STRING, Object.class).keys(key).includeDocs(true);
return queryView(reqBuild);
}
Aggregations