Options defining what data to generate for a specific layer or table when creating a sync-enabled mobile geodatabase. More...
Header: | #include <GenerateLayerOption.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Public Functions
GenerateLayerOption() | |
GenerateLayerOption(qint64 layerId) | |
GenerateLayerOption(qint64 layerId, bool includeRelated) | |
GenerateLayerOption(qint64 layerId, const QString &whereClause) | |
GenerateLayerOption(qint64 layerId, const char *whereClause) | |
GenerateLayerOption(const Esri::ArcGISRuntime::GenerateLayerOption &other) | |
GenerateLayerOption(Esri::ArcGISRuntime::GenerateLayerOption &&other) | |
~GenerateLayerOption() | |
Esri::ArcGISRuntime::GenerateLayerOption | clone() const |
bool | isEmpty() const |
bool | isIncludeRelated() const |
bool | isUseGeometry() const |
qint64 | layerId() const |
Esri::ArcGISRuntime::GenerateLayerQueryOption | queryOption() const |
void | setIncludeRelated(bool includeRelated) |
void | setLayerId(qint64 layerOrTableId) |
void | setQueryOption(Esri::ArcGISRuntime::GenerateLayerQueryOption queryOption) |
void | setUseGeometry(bool useGeometry) |
void | setWhereClause(const QString &whereClause) |
QString | whereClause() const |
Esri::ArcGISRuntime::GenerateLayerOption & | operator=(const Esri::ArcGISRuntime::GenerateLayerOption &other) |
Esri::ArcGISRuntime::GenerateLayerOption & | operator=(Esri::ArcGISRuntime::GenerateLayerOption &&other) |
Detailed Description
A new instance of this class has the following default values unless another value is specified in the constructor:
- layerId = 0
- queryOption =
GenerateLayerQueryOption::UseFilter
- isUseGeometry =
true
- isIncludeRelated =
false
- whereClause =
""
(empty)
Relevant samples:
- Generate Offline Map (Overrides): Take a web map offline with additional options for each layer.
Member Function Documentation
GenerateLayerOption::GenerateLayerOption ()
Default constructor.
[explicit]
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 (qint64 layerId , const char *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.
This overload allows you to pass a const char* where a QString is expected.
GenerateLayerOption::GenerateLayerOption (const Esri::ArcGISRuntime::GenerateLayerOption &other)
Copy constructor from other GenerateLayerOption.
GenerateLayerOption::GenerateLayerOption (Esri::ArcGISRuntime::GenerateLayerOption &&other)
Move constructor from other GenerateLayerOption.
GenerateLayerOption::~GenerateLayerOption ()
Destructor.
[since Esri::ArcGISRuntime 200.1]
Esri::ArcGISRuntime::GenerateLayerOption GenerateLayerOption::clone() const
Clones the GenerateLayerOption to a new instance.
Returns a new instance of the current GenerateLayerOption.
This function was introduced in Esri::ArcGISRuntime 200.1.
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().
[since Esri::ArcGISRuntime 100.1]
Esri::ArcGISRuntime::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().
[since Esri::ArcGISRuntime 100.1]
void GenerateLayerOption::setQueryOption (Esri::ArcGISRuntime::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:
- GenerateLayerQueryOption::None causes copying of either no features or only related features, depending on the value specified by the isIncludeRelated property. When combined with SyncDirection::Upload synchronization, this option can be used for an efficient upload-only workflow. See setIncludeRelated for more details.
- GenerateLayerQueryOption::UseFilter to filter by geometry and/or where clause. The properties isUseGeometry and whereClause apply. GenerateLayerQueryOption::All causes all other properties to be ignored, and all features are copied.
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.
Esri::ArcGISRuntime::GenerateLayerOption &GenerateLayerOption::operator=(const Esri::ArcGISRuntime::GenerateLayerOption &other)
Assignment operator from other GenerateLayerOption.
Esri::ArcGISRuntime::GenerateLayerOption &GenerateLayerOption::operator=(Esri::ArcGISRuntime::GenerateLayerOption &&other)
Move operator from other GenerateLayerOption.