|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ektorp.ViewQuery
public class ViewQuery
Nested Class Summary | |
---|---|
static class |
ViewQuery.Keys
|
Constructor Summary | |
---|---|
ViewQuery()
|
|
ViewQuery(org.codehaus.jackson.map.ObjectMapper om)
Bring your own ObjectMapper. |
Method Summary | |
---|---|
ViewQuery |
allDocs()
Will automatically set the query special _all_docs URI. |
String |
buildQuery()
|
ViewQuery |
cacheOk(boolean b)
If set to true, the view query result will be cached and subsequent queries (with cacheOk set) may be served from the cache instead of the db. |
ViewQuery |
dbPath(String s)
|
ViewQuery |
descending(boolean b)
View rows are sorted by the key; specifying descending=true will reverse their order. |
ViewQuery |
designDocId(String s)
|
ViewQuery |
endDocId(String s)
|
ViewQuery |
endKey(boolean b)
|
ViewQuery |
endKey(double d)
|
ViewQuery |
endKey(float f)
|
ViewQuery |
endKey(int i)
|
ViewQuery |
endKey(long l)
|
ViewQuery |
endKey(Object o)
|
ViewQuery |
endKey(String s)
|
boolean |
equals(Object obj)
|
String |
getDbPath()
|
String |
getDesignDocId()
|
String |
getEndDocId()
|
Object |
getEndKey()
|
int |
getGroupLevel()
|
Object |
getKey()
|
String |
getKeysAsJson()
|
int |
getLimit()
|
int |
getSkip()
|
String |
getStartDocId()
|
Object |
getStartKey()
|
String |
getViewName()
|
ViewQuery |
group(boolean b)
The group option controls whether the reduce function reduces to a set of distinct keys or to a single result row. |
ViewQuery |
groupLevel(int i)
|
int |
hashCode()
|
boolean |
hasMultipleKeys()
|
ViewQuery |
includeDocs(boolean b)
The include_docs option will include the associated document. |
ViewQuery |
inclusiveEnd(boolean b)
The inclusive_end option controls whether the endkey is included in the result. |
boolean |
isCacheOk()
|
boolean |
isDescending()
|
boolean |
isGroup()
|
boolean |
isIgnoreNotFound()
|
boolean |
isIncludeDocs()
|
boolean |
isInclusiveEnd()
|
boolean |
isReduce()
|
boolean |
isStaleOk()
|
boolean |
isUpdateSeq()
|
ViewQuery |
key(boolean b)
|
ViewQuery |
key(double d)
|
ViewQuery |
key(float f)
|
ViewQuery |
key(int i)
|
ViewQuery |
key(long l)
|
ViewQuery |
key(Object o)
|
ViewQuery |
key(String s)
|
ViewQuery |
keys(Collection<?> keyList)
For multiple-key queries (as of CouchDB 0.9). |
ViewQuery |
limit(int i)
limit=0 you don't get any data, but all meta-data for this View. |
ViewQuery |
listName(String s)
|
ViewQuery |
queryParam(String name,
String value)
|
ViewQuery |
rawEndKey(String s)
|
ViewQuery |
rawKey(String s)
|
ViewQuery |
rawStartKey(String s)
|
ViewQuery |
reduce(boolean b)
If a view contains both a map and reduce function, querying that view will by default return the result of the reduce function. |
void |
reset()
Resets internal state so this builder can be used again. |
void |
setIgnoreNotFound(boolean ignoreNotFound)
|
ViewQuery |
skip(int i)
The skip option should only be used with small values, as skipping a large range of documents this way is inefficient (it scans the index from the startkey and then skips N elements, but still needs to read all the index values to do that). |
ViewQuery |
staleOk(boolean b)
The stale option can be used for higher performance at the cost of possibly not seeing the all latest data. |
ViewQuery |
staleOkUpdateAfter()
Same as staleOk(true) but will also trigger a rebuild of the view index after the results of the view have been retrieved. |
ViewQuery |
startDocId(String s)
|
ViewQuery |
startKey(boolean b)
|
ViewQuery |
startKey(double d)
|
ViewQuery |
startKey(float f)
|
ViewQuery |
startKey(int i)
|
ViewQuery |
startKey(long l)
|
ViewQuery |
startKey(Object o)
|
ViewQuery |
startKey(String s)
|
ViewQuery |
updateSeq(boolean b)
The update_seq option adds a field to the result indicating the update_seq the view reflects. |
ViewQuery |
viewName(String s)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewQuery()
public ViewQuery(org.codehaus.jackson.map.ObjectMapper om)
om
- Method Detail |
---|
public String getDbPath()
public String getDesignDocId()
public String getViewName()
public String getStartDocId()
public String getEndDocId()
public int getLimit()
public boolean isStaleOk()
public boolean isDescending()
public int getSkip()
public boolean isGroup()
public int getGroupLevel()
public boolean isReduce()
public boolean isIncludeDocs()
public boolean isInclusiveEnd()
public boolean isUpdateSeq()
public ViewQuery dbPath(String s)
public ViewQuery designDocId(String s)
public ViewQuery allDocs()
public ViewQuery viewName(String s)
public ViewQuery listName(String s)
public ViewQuery cacheOk(boolean b)
b
-
public boolean isCacheOk()
public ViewQuery key(String s)
Will
- be JSON-encoded.
public ViewQuery rawKey(String s)
Will
- be parsed as JSON.
public ViewQuery key(int i)
Will
- be JSON-encoded.
public ViewQuery key(long l)
Will
- be JSON-encoded.
public ViewQuery key(float f)
Will
- be JSON-encoded.
public ViewQuery key(double d)
Will
- be JSON-encoded.
public ViewQuery key(boolean b)
Will
- be JSON-encoded.
public ViewQuery key(Object o)
Will
- be JSON-encoded.
public ViewQuery keys(Collection<?> keyList)
keyList
- a list of Object, will be JSON encoded according to each element's type.
public ViewQuery startKey(String s)
Will
- be JSON-encoded.
public ViewQuery rawStartKey(String s)
Will
- be parsed as json
public ViewQuery startKey(int i)
Will
- be JSON-encoded.
public ViewQuery startKey(long l)
Will
- be JSON-encoded.
public ViewQuery startKey(float f)
Will
- be JSON-encoded.
public ViewQuery startKey(double d)
Will
- be JSON-encoded.
public ViewQuery startKey(boolean b)
Will
- be JSON-encoded.
public ViewQuery startKey(Object o)
Will
- be JSON-encoded.
public ViewQuery startDocId(String s)
public ViewQuery endKey(String s)
will
- be JSON-encoded.
public ViewQuery rawEndKey(String s)
will
- be parsed as JSON.
public ViewQuery endKey(int i)
Will
- be JSON-encoded.
public ViewQuery endKey(long l)
Will
- be JSON-encoded.
public ViewQuery endKey(float f)
Will
- be JSON-encoded.
public ViewQuery endKey(double d)
Will
- be JSON-encoded.
public ViewQuery endKey(boolean b)
Will
- be JSON-encoded.
public ViewQuery endKey(Object o)
Will
- be JSON-encoded.
public ViewQuery endDocId(String s)
public ViewQuery limit(int i)
i
- the limit
public ViewQuery staleOk(boolean b)
b
- the staleOk flag
public ViewQuery staleOkUpdateAfter()
public ViewQuery descending(boolean b)
b
- the descending flag
public ViewQuery skip(int i)
i
- the skip count
public ViewQuery group(boolean b)
b
- the group flag
public ViewQuery groupLevel(int i)
public ViewQuery reduce(boolean b)
b
- the reduce flag
public ViewQuery includeDocs(boolean b)
b
- the includeDocs flag
public ViewQuery inclusiveEnd(boolean b)
b
- the inclusiveEnd flag
public ViewQuery updateSeq(boolean b)
b
- the updateSeq flag
public ViewQuery queryParam(String name, String value)
public void reset()
public Object getKey()
public boolean hasMultipleKeys()
public String getKeysAsJson()
public Object getStartKey()
public Object getEndKey()
public String buildQuery()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public void setIgnoreNotFound(boolean ignoreNotFound)
public boolean isIgnoreNotFound()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |