Skip To Content ArcGIS for Developers Sign In Dashboard

GenerateLayerOption Class

(Esri::ArcGISRuntime::GenerateLayerOption)

Options defining what data to generate for a specific layer or table when creating a sync-enabled mobile geodatabase. More...

Header: #include <GenerateLayerOption>
Since: Esri::ArcGISRuntime 100.0

Public Functions

GenerateLayerOption()
GenerateLayerOption(qint64 layerId)
GenerateLayerOption(qint64 layerId, bool includeRelated)
GenerateLayerOption(qint64 layerId, const QString &whereClause)
GenerateLayerOption(const GenerateLayerOption &other)
GenerateLayerOption(GenerateLayerOption &&other)
~GenerateLayerOption()
bool isEmpty() const
bool isIncludeRelated() const
bool isUseGeometry() const
qint64 layerId() const
GenerateLayerQueryOption queryOption() const
void setIncludeRelated(bool includeRelated)
void setLayerId(qint64 layerOrTableId)
void setQueryOption(GenerateLayerQueryOption queryOption)
void setUseGeometry(bool useGeometry)
void setWhereClause(const QString &whereClause)
QString whereClause() const
GenerateLayerOption &operator=(const GenerateLayerOption &other)
GenerateLayerOption &operator=(GenerateLayerOption &&other)

Detailed Description

Options defining what data to generate for a specific layer or table when creating a sync-enabled mobile geodatabase.

A new instance of this class has the following default values unless another value is specified in the constructor:

Member Function Documentation

GenerateLayerOption::GenerateLayerOption()

Default constructor.

GenerateLayerOption::GenerateLayerOption(qint64 layerId)

Constructs a GenerateLayerOption using a layer ID.

  • layerId - The layer ID.

GenerateLayerOption::GenerateLayerOption(qint64 layerId, bool includeRelated)

Constructs a GenerateLayerOption using a layer ID and an option for including related items.

  • layerId - The layer ID.
  • includeRelated - Whether to include any data from this layer that is related to data in other layers in the geodatabase.

The includeRelated parameter is only honored when the layer participates in any relationships, and if the related layers are also included in the geodatabase.

GenerateLayerOption::GenerateLayerOption(qint64 layerId, const QString &whereClause)

Constructs a GenerateLayerOption with a layer ID and an attribute query.

  • layerId - The layer ID.
  • whereClause - The SQL where clause of an attribute query that specifies which features should be included in the geodatabase.

GenerateLayerOption::GenerateLayerOption(const GenerateLayerOption &other)

Copy constructor from other GenerateLayerOption.

GenerateLayerOption::GenerateLayerOption(GenerateLayerOption &&other)

Move constructor from other GenerateLayerOption.

GenerateLayerOption::~GenerateLayerOption()

Destructor.

bool GenerateLayerOption::isEmpty() const

Returns whether this GenerateLayerOption is empty.

bool GenerateLayerOption::isIncludeRelated() const

Returns whether to include any data from this layer that is related to data in other layers in the geodatabase.

See also setIncludeRelated.

bool GenerateLayerOption::isUseGeometry() const

Returns whether to filter features to include in the geodatabase based on geometry.

See also setUseGeometry.

qint64 GenerateLayerOption::layerId() const

Returns the ID of the layer or table to be included in the service-generated geodatabase.

This corresponds to ArcGISFeatureLayerInfo::serviceLayerId.

See also setLayerId().

GenerateLayerQueryOption GenerateLayerOption::queryOption() const

Returns whether all, filtered or no features will be copied from the server when creating a geodatabase.

The default is GenerateLayerQueryOption::UseFilter.

This function was introduced in Esri::ArcGISRuntime 100.1.

See also setQueryOption.

void GenerateLayerOption::setIncludeRelated(bool includeRelated)

Sets whether to include any data from this layer that is related to data in other layers in the geodatabase.

  • includeRelated - Whether to include related data.

This parameter applies only if the layer participates in any relationships, and if the queryOption property is GenerateLayerQueryOption::None.

Set this property to true for a layer or table to retrieve only rows or features used in relationships. A typical scenario is a feature layer related to a large table. By setting the large table's isIncludeRelated to true, you can reduce the offline table size to just rows related to features that are part of the offline extent.

The default value of this property is false.

See also isIncludeRelated().

void GenerateLayerOption::setLayerId(qint64 layerOrTableId)

Sets the ID of the layer or table to be included in the service-generated geodatabase to layerOrTableId.

See also layerId().

void GenerateLayerOption::setQueryOption(GenerateLayerQueryOption queryOption)

Sets whether all, filtered, related, or no features will be copied from the server when creating a geodatabase.

  • queryOption - The generate layer query option.

The default is GenerateLayerQueryOption::UseFilter.

Determines which properties of this class apply. Valid combinations are:

This function was introduced in Esri::ArcGISRuntime 100.1.

See also queryOption().

void GenerateLayerOption::setUseGeometry(bool useGeometry)

Sets whether to filter features based on geometry to include in the geodatabase.

  • useGeometry - Whether to filter based on geometry.

This property only applies when the queryOption property is GenerateLayerQueryOption::UseFilter.

When this property is true, features intersecting GenerateGeodatabaseParameters::extent are candidates for taking offline.

If whereClause is also set, it further filters the features by attribute values.

The default value is true. However, for non-spatial tables, this property must be set to false.

See also isUseGeometry().

void GenerateLayerOption::setWhereClause(const QString &whereClause)

Sets the attribute query to filter which features should be included in the geodatabase.

This property only applies when the queryOption property is GenerateLayerQueryOption::UseFilter. It can be empty, in which case features are not filtered based on whereClause.

The candidate features from a whereClause are also filtered by GenerateGeodatabaseParameters::extent() if isUseGeometry is true.

  • whereClause - The SQL where clause.

See also whereClause().

QString GenerateLayerOption::whereClause() const

Returns the attribute query used to filter which features should be included in the geodatabase.

See also setWhereClause.

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

Assignment operator from other GenerateLayerOption.

GenerateLayerOption &GenerateLayerOption::operator=(GenerateLayerOption &&other)

Move operator from other GenerateLayerOption.


Feedback on this topic?