Skip To Content ArcGIS for Developers Sign In Dashboard

PortalQueryParameters Class

(Esri::ArcGISRuntime::PortalQueryParameters)

Base class for parameters needed to perform a query within a Portal. More...

Header: #include <PortalQueryParameters>
Since: Esri::ArcGISRuntime 100.0
Inherited By:

Esri::ArcGISRuntime::PortalQueryParametersForGroups and Esri::ArcGISRuntime::PortalQueryParametersForItems

Public Functions

PortalQueryParameters()
PortalQueryParameters(const PortalQueryParameters &other)
PortalQueryParameters(PortalQueryParameters &&other)
virtual ~PortalQueryParameters()
Envelope boundingBox() const
bool isEmpty() const
bool isSearchPublic() const
int limit() const
QString query() const
void setBoundingBox(const Envelope &boundingBox)
void setLimit(int limit)
void setSearchPublic(bool searchPublic)
void setSortField(const QString &sortField)
void setSortOrder(PortalQuerySortOrder sortOrder)
void setStartIndex(int startIndex)
QString sortField() const
PortalQuerySortOrder sortOrder() const
int startIndex() const
PortalQueryParameters &operator=(const PortalQueryParameters &other)
PortalQueryParameters &operator=(PortalQueryParameters &&other)

Detailed Description

Base class for parameters needed to perform a query within a Portal.

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()

Default constructor.

Create invalid PortalQueryParameters. Use PortalQueryParametersForItems or PortalQueryParametersForGroups to create a default empty PortalQueryParameters.

This function was introduced in Esri::ArcGISRuntime 100.3.

PortalQueryParameters::PortalQueryParameters(const PortalQueryParameters &other)

Copy constructor from other PortalQueryParameters.

PortalQueryParameters::PortalQueryParameters(PortalQueryParameters &&other)

Move constructor from other PortalQueryParameters.

[virtual] PortalQueryParameters::~PortalQueryParameters()

Destructor.

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().

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 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 Envelope &boundingBox)

Sets the bounding box for a spatial search to boundingBox

See also boundingBox().

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 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)

Sets the field(s) to sort by.

You can sort by multiple fields by specifying a comma-separated list in sortField.

Allowed sort fields are: title, uploaded, type, owner, modified, avgRating, numRatings, numComments, and numViews

See also sortField().

void PortalQueryParameters::setSortOrder(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.

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().

PortalQueryParameters &PortalQueryParameters::operator=(const PortalQueryParameters &other)

Assignment operator from other PortalQueryParameters.

PortalQueryParameters &PortalQueryParameters::operator=(PortalQueryParameters &&other)

Move operator from other PortalQueryParameters.


Feedback on this topic?