Class GenerateLayerOption
GenerateGeodatabaseParameters
to refine what layers or tables are included and
allows filtering of features within these layers or tables. Used with GeodatabaseSyncTask.generateGeodatabase(GenerateGeodatabaseParameters, String)
.
This applies only to geodatabases using the sync model of SyncModel.PER_LAYER
.
You only need to change the properties for layers or tables where you do not want the default behavior. The default behavior is:
the extent of the data to be included in the geodatabase is based on GenerateGeodatabaseParameters.setExtent(com.esri.arcgisruntime.geometry.Geometry)
,
geometries are included (isUseGeometry()
is true), related records are not returned (isIncludeRelated()
is false), no where
clause is specified (getWhereClause()
is an empty string).
- Since:
- 100.0.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Control which features for a layer or table are copied from the server when creating a geodatabase. -
Constructor Summary
ConstructorDescriptionConstructs a GenerateLayerOption with default values.GenerateLayerOption
(long layerId) Constructs a GenerateLayerOption with a given layer ID and default values.GenerateLayerOption
(long layerId, boolean includeRelated) Constructs a GenerateLayerOption with a given layer ID and the includeRelated flag which causes the generated geodatabase to include features in this layer that are related to features in other layers in the generated geodatabase.GenerateLayerOption
(long layerId, String whereClause) Constructs a GenerateLayerOption with a given layer ID and where-clause which is an attribute query used to select which features in this layer are included in the generated geodatabase. -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the ID of the layer this GenerateLayerOption relates to.Gets the query option that was set to determine the features to download.Gets the where-clause of the layer this GenerateLayerOption relates to.boolean
Gets the value of the includeRelated flag.boolean
Gets the value of the useGeometry flag.void
setIncludeRelated
(boolean includeRelated) Sets the value of the includeRelated flag.void
setLayerId
(long layerId) Sets the ID of the layer this GenerateLayerOption relates to.void
setQueryOption
(GenerateLayerOption.QueryOption queryOption) Sets the query option that determines the set of features to download.void
setUseGeometry
(boolean useGeometry) Sets the value of the useGeometry flag.void
setWhereClause
(String whereClause) Sets the where-clause of the layer this GenerateLayerOption relates to.
-
Constructor Details
-
GenerateLayerOption
public GenerateLayerOption()Constructs a GenerateLayerOption with default values.- Since:
- 100.0.0
-
GenerateLayerOption
public GenerateLayerOption(long layerId) Constructs a GenerateLayerOption with a given layer ID and default values.- Parameters:
layerId
- the ID of the layer this GenerateLayerOption relates to, this can be retrieved fromArcGISFeatureLayerInfo.getServiceLayerId()
- Since:
- 100.0.0
-
GenerateLayerOption
public GenerateLayerOption(long layerId, boolean includeRelated) Constructs a GenerateLayerOption with a given layer ID and the includeRelated flag which causes the generated geodatabase to include features in this layer that are related to features in other layers in the generated geodatabase. SeesetIncludeRelated(boolean)
for more information.- Parameters:
layerId
- the ID of the layer this GenerateLayerOption relates to, this can be retrieved fromArcGISFeatureLayerInfo.getServiceLayerId()
includeRelated
- true to include any data from this layer that is related to data in other layers in the geodatabase. This parameters is only valid if the layer participates in any relationships, and if those related layers are also included in the geodatabase.- Since:
- 100.0.0
-
GenerateLayerOption
Constructs a GenerateLayerOption with a given layer ID and where-clause which is an attribute query used to select which features in this layer are included in the generated geodatabase. SeesetWhereClause(String)
for more information.- Parameters:
layerId
- the ID of the layer this GenerateLayerOption relates towhereClause
- an attribute query used to select which features in this layer are included in the generated geodatabase- Since:
- 100.0.0
-
-
Method Details
-
isIncludeRelated
public boolean isIncludeRelated()Gets the value of the includeRelated flag. If this is true it causes the generated geodatabase to include features in this layer that are related to features in other layers in the generated geodatabase. It is applicable only if the data has relationship classes.- Returns:
- the value of the includeRelated flag
- Since:
- 100.0.0
-
setIncludeRelated
public void setIncludeRelated(boolean includeRelated) Sets the value of the includeRelated flag. Setting this true causes the generated geodatabase to include features in this layer that are related to features in other layers in the generated geodatabase.Setting includeRelated to true causes the geometry and where-clause properties to be ignored, and is applicable only if the data has relationship classes. The default value is false.
- Parameters:
includeRelated
- true to include features in this layer that are related to features in other layers in the generated geodatabase- Since:
- 100.0.0
-
getLayerId
public long getLayerId()Gets the ID of the layer this GenerateLayerOption relates to.- Returns:
- the layer ID, or 0 if none has been set
- Since:
- 100.0.0
-
setLayerId
public void setLayerId(long layerId) Sets the ID of the layer this GenerateLayerOption relates to.- Parameters:
layerId
- the layer ID- Since:
- 100.0.0
-
isUseGeometry
public boolean isUseGeometry()Gets the value of the useGeometry flag. This specifies whether the extent set byGenerateGeodatabaseParameters.setExtent(com.esri.arcgisruntime.geometry.Geometry)
is used to filter the features in this layer that are included in the generated geodatabase.- Returns:
- the value of the useGeometry flag
- Since:
- 100.0.0
- See Also:
-
setUseGeometry
public void setUseGeometry(boolean useGeometry) Sets the value of the useGeometry flag. This specifies whether the extent set byGenerateGeodatabaseParameters.setExtent(com.esri.arcgisruntime.geometry.Geometry)
is used to filter the features in this layer that are included in the generated geodatabase.This property is only applicable if the query option is
GenerateLayerOption.QueryOption.USE_FILTER
. When it is true, features intersecting the extent that's been set are candidates for taking offline. When it is false, all features are candidates. If a where-clause is also set, it further reduces the features.The default value is true. For non-spatial tables it must be set to false.
- Parameters:
useGeometry
- true to use the extent set in GenerateGeodatabaseParameters to filter the features in this layer that are included in the generated geodatabase- Since:
- 100.0.0
-
getWhereClause
Gets the where-clause of the layer this GenerateLayerOption relates to. The where-clause is an attribute query used to select which features in this layer are included in the generated geodatabase.- Returns:
- the where-clause, or an empty String if none has been set
- Since:
- 100.0.0
- See Also:
-
setWhereClause
Sets the where-clause of the layer this GenerateLayerOption relates to. The where-clause is an attribute query used to select which features in this layer are included in the generated geodatabase. The where-clause only applies when theGenerateLayerOption.QueryOption
isGenerateLayerOption.QueryOption.USE_FILTER
. The default value is an empty string.The candidate features from a where-clause are also filtered by the extent set by
GenerateGeodatabaseParameters.setExtent(com.esri.arcgisruntime.geometry.Geometry)
ifisUseGeometry()
is true.- Parameters:
whereClause
- the where-clause- Since:
- 100.0.0
-
getQueryOption
Gets the query option that was set to determine the features to download.- Returns:
- the query option set to determine the features to download, or
GenerateLayerOption.QueryOption.USE_FILTER
if none was set - Since:
- 100.1.0
- See Also:
-
setQueryOption
Sets the query option that determines the set of features to download. The default value isGenerateLayerOption.QueryOption.USE_FILTER
, unless theGenerateLayerOption(long, boolean)
constructor is used in which case it isGenerateLayerOption.QueryOption.NONE
.Determines how other properties of the GenerateLayerOption are applicable, valid combinations are:
-
GenerateLayerOption.QueryOption.NONE
to specify no features, or only related features. The value fromisIncludeRelated()
is applicable. This option can be used for an efficient upload-only work-flow. -
GenerateLayerOption.QueryOption.USE_FILTER
to filter by geometry and/or where-clause. The values fromisUseGeometry()
andgetWhereClause()
are applicable. -
GenerateLayerOption.QueryOption.ALL
all other properties are ignored, all features are returned.
- Parameters:
queryOption
- query option that determines the set of features to download- Throws:
IllegalArgumentException
- if queryOption is null- Since:
- 100.1.0
-
-