public class DbGetAction<A extends DbGetAction> extends Action<A>
Rule.RuleMatcher| Modifier and Type | Field and Description |
|---|---|
protected int |
maxRows |
ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order, params| Constructor and Description |
|---|
DbGetAction() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureOp(io.inversion.utils.Task task,
Op op)
This task has been selected to run as part of the supplied operation, this
callback allows actions to perform any custom configuration on the op.
|
protected void |
expand(Request request,
Collection collection,
java.util.List<io.inversion.json.JSMap> 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 java.util.List<Rule.RuleMatcher> |
getDefaultIncludeMatchers()
Designed to allow subclasses to provide a default match behavior
of no configuration was provided by the developer.
|
protected static java.lang.String |
getForeignKey(Relationship rel,
io.inversion.json.JSMap node) |
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(Collection collection,
io.inversion.json.JSMap node) |
protected java.util.List<io.inversion.json.JSMap> |
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) |
static java.lang.String |
stripTerms(java.lang.String url,
java.lang.String... tokens) |
DbGetAction |
withMaxRows(int maxRows) |
doDelete, doGet, doPatch, doPost, doPut, getFullIncludePaths, getIncludePaths, isDecoration, joinPaths, joinPaths0, run0, withDecorationafterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParamsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddResponse, addResponse, beautifyTag, buildOperation, documentOpDelete, documentOperationSchema, documentOpFind, documentOpGet, documentOpPatch, documentOpPost, documentOpPut, documentOpRelated, documentParam, documentQueryParams, documentRequestSchema, documentResourceSchema, documentResponseSchema, findOp, getDescription, getSchemaRef, hasParam, hook_documentOp, newComponentRefSchema, newHrefSchema, newTypeSchema, removeReadOnlyPropertiespublic void configureOp(io.inversion.utils.Task task,
Op op)
configureOp in class Action<A extends DbGetAction>task - op - protected java.util.List<Rule.RuleMatcher> getDefaultIncludeMatchers()
RulegetDefaultIncludeMatchers in class Rule<A extends DbGetAction>protected static java.lang.String getForeignKey(Relationship rel, io.inversion.json.JSMap node)
protected static java.lang.String getResourceKey(Collection collection, io.inversion.json.JSMap node)
public static java.lang.String stripTerms(java.lang.String url,
java.lang.String... tokens)
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)
public void run(Request req, Response res) throws ApiException
Actionrun in class Action<A extends DbGetAction>req - the Request being servicedres - the Reponse being generatedApiExceptionprotected Results select(Request req, Collection collection, Api api) throws ApiException
ApiExceptionprotected void expand(Request request, Collection collection, java.util.List<io.inversion.json.JSMap> 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<io.inversion.json.JSMap> 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 © 2023 Rocket Partners, LLC. All rights reserved.