Base class for parameters needed to perform a query within a Portal. More...
Header: | #include <PortalQueryParameters.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherited By: | Esri::ArcGISRuntime::PortalQueryParametersForGroups and Esri::ArcGISRuntime::PortalQueryParametersForItems |
This class was introduced in Esri::ArcGISRuntime 100.0.
Public Functions
PortalQueryParameters(Esri::ArcGISRuntime::PortalQueryParameters &&other) | |
PortalQueryParameters(const Esri::ArcGISRuntime::PortalQueryParameters &other) | |
PortalQueryParameters() | |
Esri::ArcGISRuntime::PortalQueryParameters & | operator=(Esri::ArcGISRuntime::PortalQueryParameters &&other) |
Esri::ArcGISRuntime::PortalQueryParameters & | operator=(const Esri::ArcGISRuntime::PortalQueryParameters &other) |
virtual | ~PortalQueryParameters() |
Esri::ArcGISRuntime::Envelope | boundingBox() const |
QStringList | categories() const |
bool | isEmpty() const |
bool | isSearchPublic() const |
int | limit() const |
QString | query() const |
void | setBoundingBox(const Esri::ArcGISRuntime::Envelope &boundingBox) |
void | setCategories(const QStringList &categories) |
void | setLimit(int limit) |
void | setSearchPublic(bool searchPublic) |
void | setSortField(const QString &sortField) |
void | setSortOrder(Esri::ArcGISRuntime::PortalQuerySortOrder sortOrder) |
void | setStartIndex(int startIndex) |
QString | sortField() const |
Esri::ArcGISRuntime::PortalQuerySortOrder | sortOrder() const |
int | startIndex() const |
Detailed Description
This class forms ths basis for parameters used when searching for items, and groups. Queries can be specified using this type such that they are limited to:
- the number of results returned.
- a spatial search area.
- resources within an organization.
Results can be sorted. Start index and results limit are used when paging through large result sets.
See the ArcGIS REST API for more details.
See also PortalQueryParametersForItems, PortalQueryParametersForGroups, and Portal.
Member Function Documentation
PortalQueryParameters::PortalQueryParameters (Esri::ArcGISRuntime::PortalQueryParameters &&other)
Move constructor from other PortalQueryParameters.
PortalQueryParameters::PortalQueryParameters (const Esri::ArcGISRuntime::PortalQueryParameters &other)
Copy constructor from other PortalQueryParameters.
PortalQueryParameters::PortalQueryParameters ()
Default constructor.
Create invalid PortalQueryParameters. Use PortalQueryParametersForItems or PortalQueryParametersForGroups to create a default empty PortalQueryParameters.
This function was introduced in Esri::ArcGISRuntime 100.3.
Esri::ArcGISRuntime::PortalQueryParameters &PortalQueryParameters::operator=(Esri::ArcGISRuntime::PortalQueryParameters &&other)
Move operator from other PortalQueryParameters.
Esri::ArcGISRuntime::PortalQueryParameters &PortalQueryParameters::operator=(const Esri::ArcGISRuntime::PortalQueryParameters &other)
Assignment operator from other PortalQueryParameters.
[virtual]
PortalQueryParameters::~PortalQueryParameters ()
Destructor.
Esri::ArcGISRuntime::Envelope PortalQueryParameters::boundingBox () const
The bounding box for a spatial search.
Spatial search is an overlaps/intersects function of the query bbox and the extent.
See also setBoundingBox().
QStringList PortalQueryParameters::categories() const
The string list of content category specifications to use when searching for items.
Each entry in the list is a string containing a comma-separated list of up to eight organization-level content categories.
The full path of each category is required and an OR relationship is applied between the categories within a particular string.
There can be up to eight Strings with an AND relationship being applied between the different strings.
For example, to search for items belonging to either the Water or Forest categories, both within the US, specify two strings as follows: "/Categories/Water,/Categories/Forest" and "/Region/US".
The categories property is ignored if the PortalQueryParameters is used to search for groups using Portal::findGroups.
This function was introduced in Esri::ArcGISRuntime 100.13.
See also setCategories().
bool PortalQueryParameters::isEmpty () const
Returns whether this PortalQueryParameters is empty.
This function was introduced in Esri::ArcGISRuntime 100.3.
bool PortalQueryParameters::isSearchPublic () const
Returns whether the query can search beyond the portal's organization.
int PortalQueryParameters::limit() const
Returns the results limit, which is used when paging through large result sets.
See also setLimit.
QString PortalQueryParameters::query() const
Returns the query string searched.
void PortalQueryParameters::setBoundingBox (const Esri::ArcGISRuntime::Envelope &boundingBox )
Sets the bounding box for a spatial search to boundingBox
See also boundingBox().
void PortalQueryParameters::setCategories (const QStringList &categories)
Sets the string list of content category specifications (categories) to use when searching for items.
This function was introduced in Esri::ArcGISRuntime 100.13.
See also PortalQueryParameters::categories.
void PortalQueryParameters::setLimit (int limit)
Sets the record count limit used with the search to limit.
The default value is 10, and the maximum allowed value is 100.
The startIndex parameter, along with this parameter, can be used to paginate the search results.
The actual number of returned results may be less than limit. This happens when the number of results remaining after startIndex is less than limit.
See also limit().
void PortalQueryParameters::setSearchPublic (bool searchPublic )
Sets whether the query can search beyond the portal's organization.
- searchPublic - Whether the query can search outwith the organization.
See also isSearchPublic().
void PortalQueryParameters::setSortField (const QString &sortField )
A string containing one or more fields names, comma separated, specifying the field(s) to sort the results by.
You can sort by multiple fields by specifying a comma-separated list in sortField.
Sort field names are case-insensitive. Allowed sort fields are: title, created, type, owner, modified, avgrating, numratings, numcomments, and numviews.
See also sortField().
void PortalQueryParameters::setSortOrder (Esri::ArcGISRuntime::PortalQuerySortOrder sortOrder )
Sets the sort order for search results to sortOrder.
See also sortOrder().
void PortalQueryParameters::setStartIndex (int startIndex )
Sets the 1-based index number of the first entry in the result set for this response to startIndex.
See also startIndex().
QString PortalQueryParameters::sortField () const
Returns the field(s) to sort by.
See also setSortField.
Esri::ArcGISRuntime::PortalQuerySortOrder PortalQueryParameters::sortOrder () const
Returns the sort order, indicating whether the results are returned in ascending or descending order.
Default value is PortalQuerySortOrder::Ascending.
See also setSortOrder().
int PortalQueryParameters::startIndex () const
The start index, which is used when paging through large result sets.
Return -1 if PortalQueryParameters is not valid.
See also setStartIndex().