Request.Type
PARAM_NAME_LIMIT, PARAM_NAME_OFFSET, PARAM_NAME_OUTPUT
Constructor and Description |
---|
RequestImpl(HttpRequestAttributes httpAttributes,
Request.Type type,
String sqlResource,
List<RequestValue> resourceIdentifiers,
List<RequestValue> params,
List<List<RequestValue>> childrenParams,
RequestLogger requestLogger)
Constructs object.
|
Modifier and Type | Method and Description |
---|---|
void |
extractParameters()
Extract limit and offset.
|
List<List<RequestValue>> |
getChildrenParameters()
Returns children CUD requests to a single parent for a hierarchical SQL Resource.
|
HttpRequestAttributes |
getHttpRequestAttributes()
Returns http request attributes.
|
RequestLogger |
getLogger()
Returns request logger.
|
List<RequestValue> |
getParameters()
Returns ordered list of parameters, for example the selection filter for update request.
|
Request |
getParent()
Returns parent, if any.
|
List<RequestValue> |
getResourceIdentifiers()
Returns ordered list of primary key values for a CRUD request on a single object (row).
|
Integer |
getSelectLimit()
Returns select row limit, if any.
|
Integer |
getSelectOffset()
Returns select row offset, if any.
|
String |
getSqlResource()
Returns SQL Resource name.
|
Request.Type |
getType()
Returns request type.
|
boolean |
hasParameter(String name)
Returns true if request has parameter with the given name.
|
void |
setParameters(List<RequestValue> params)
Sets parameters for request.
|
void |
setParent(Request parent)
Sets parent request.
|
void |
setSelectLimit(Integer selectLimit)
Sets select limit.
|
void |
setSelectOffset(Integer selectOffset)
Sets select offset.
|
String |
toString()
Returns string representation, using HttpRequestAttributes string if present.
|
public RequestImpl(HttpRequestAttributes httpAttributes, Request.Type type, String sqlResource, List<RequestValue> resourceIdentifiers, List<RequestValue> params, List<List<RequestValue>> childrenParams, RequestLogger requestLogger)
public List<List<RequestValue>> getChildrenParameters()
Request
getChildrenParameters
in interface Request
public HttpRequestAttributes getHttpRequestAttributes()
Request
getHttpRequestAttributes
in interface Request
public RequestLogger getLogger()
Request
public List<RequestValue> getParameters()
Request
getParameters
in interface Request
public Request getParent()
Request
public List<RequestValue> getResourceIdentifiers()
Request
getResourceIdentifiers
in interface Request
public Integer getSelectLimit()
Request
getSelectLimit
in interface Request
public Integer getSelectOffset()
Request
getSelectOffset
in interface Request
public String getSqlResource()
Request
getSqlResource
in interface Request
public Request.Type getType()
Request
public boolean hasParameter(String name)
Request
hasParameter
in interface Request
public void setParameters(List<RequestValue> params)
setParameters
in interface Request
public void setParent(Request parent)
Request
public void setSelectLimit(Integer selectLimit)
Request
setSelectLimit
in interface Request
public void setSelectOffset(Integer selectOffset)
Request
setSelectOffset
in interface Request
public String toString()
public void extractParameters() throws InvalidRequestException
Request
extractParameters
in interface Request
InvalidRequestException
- if request is invalidCopyright © 2011-2018 restSQL Project Contributors