public class DbGetAction extends Action<DbGetAction>
Rule.RuleMatcher| Modifier and Type | Field and Description |
|---|---|
protected int |
maxRows |
configMap, configStr, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order| Constructor and Description |
|---|
DbGetAction() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
exclude(JSNode node,
java.util.Set<java.lang.String> includes,
java.util.Set<java.lang.String> excludes,
java.lang.String path) |
protected void |
exclude(java.util.List<JSNode> nodes) |
protected static boolean |
exclude(java.lang.String path,
java.util.Set<java.lang.String> includes,
java.util.Set<java.lang.String> excludes) |
protected void |
expand(Request request,
Collection collection,
java.util.List<JSNode> parentObjs,
java.util.Set expands,
java.lang.String expandsPath,
org.apache.commons.collections4.map.MultiKeyMap pkCache)
This is more complicated than it seems like it would need to be because
it attempts to retrieve all values of a relationship at a time for the whole
document.
|
protected static java.lang.String |
expandPath(java.lang.String path,
java.lang.Object next) |
protected static boolean |
find(java.util.Collection<java.lang.String> params,
java.lang.String path,
boolean matchStart) |
int |
getMaxRows() |
protected java.util.List<org.apache.commons.collections4.KeyValue<java.lang.String,java.lang.String>> |
getRelatedKeys(Relationship rel,
Index idxToMatch,
Index idxToRetrieve,
java.util.List<java.lang.String> toMatchEks) |
protected static java.lang.String |
getResourceKey(java.lang.Object obj) |
protected java.util.List<JSNode> |
recursiveGet(org.apache.commons.collections4.map.MultiKeyMap pkCache,
Collection collection,
java.util.Collection resourceKeys,
java.lang.String expandsPath) |
void |
run(Request req,
Response res)
Override this method with your custom business logic or override one of the
http method "doMETHOD" specific handlers.
|
protected Results |
select(Request req,
Collection collection,
Api api) |
protected static boolean |
shouldExpand(java.util.Set<java.lang.String> expands,
java.lang.String path,
Relationship rel) |
protected static java.lang.String |
stripTerm(java.lang.String str,
java.lang.String startToken,
char... endingTokens) |
static java.lang.String |
stripTerms(java.lang.String url,
java.lang.String... tokens) |
DbGetAction |
withMaxRows(int maxRows) |
checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludePaths, getConfig, getConfig, getConfigKeys, getDefaultIncludeMatch, getExcludeMatchers, getIncludeMatchers, getName, getOrder, match, matches, matches, toString, withConfig, withExcludeOn, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withIncludeOn, withName, withOrderprotected static boolean exclude(java.lang.String path,
java.util.Set<java.lang.String> includes,
java.util.Set<java.lang.String> excludes)
protected static java.lang.String getResourceKey(java.lang.Object obj)
public static java.lang.String stripTerms(java.lang.String url,
java.lang.String... tokens)
protected static java.lang.String stripTerm(java.lang.String str,
java.lang.String startToken,
char... endingTokens)
protected static java.lang.String expandPath(java.lang.String path,
java.lang.Object next)
protected static boolean shouldExpand(java.util.Set<java.lang.String> expands,
java.lang.String path,
Relationship rel)
protected static boolean find(java.util.Collection<java.lang.String> params,
java.lang.String path,
boolean matchStart)
public void run(Request req, Response res) throws ApiException
Actionrun in class Action<DbGetAction>req - the Request being servicedres - the Reponse being generatedApiExceptionprotected Results select(Request req, Collection collection, Api api) throws ApiException
ApiExceptionprotected void exclude(java.util.List<JSNode> nodes)
protected void exclude(JSNode node, java.util.Set<java.lang.String> includes, java.util.Set<java.lang.String> excludes, java.lang.String path)
protected void expand(Request request, Collection collection, java.util.List<JSNode> parentObjs, java.util.Set expands, java.lang.String expandsPath, org.apache.commons.collections4.map.MultiKeyMap pkCache)
request - the request being servicedcollection - the collection being queriedparentObjs - the records that were just selectedexpands - the definition of which properties should be expandedexpandsPath - the path we are currently onpkCache - a cache of things already looked upprotected java.util.List<org.apache.commons.collections4.KeyValue<java.lang.String,java.lang.String>> getRelatedKeys(Relationship rel, Index idxToMatch, Index idxToRetrieve, java.util.List<java.lang.String> toMatchEks) throws ApiException
ApiExceptionprotected java.util.List<JSNode> recursiveGet(org.apache.commons.collections4.map.MultiKeyMap pkCache, Collection collection, java.util.Collection resourceKeys, java.lang.String expandsPath) throws ApiException
ApiExceptionpublic int getMaxRows()
public DbGetAction withMaxRows(int maxRows)
Copyright © 2021 Rocket Partners, LLC. All rights reserved.