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 SummaryNested ClassesModifier and TypeClassDescriptionstatic enumControl which features for a layer or table are copied from the server when creating a geodatabase.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs 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 SummaryModifier and TypeMethodDescriptionlongGets 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.booleanGets the value of the includeRelated flag.booleanGets the value of the useGeometry flag.voidsetIncludeRelated(boolean includeRelated) Sets the value of the includeRelated flag.voidsetLayerId(long layerId) Sets the ID of the layer this GenerateLayerOption relates to.voidsetQueryOption(GenerateLayerOption.QueryOption queryOption) Sets the query option that determines the set of features to download.voidsetUseGeometry(boolean useGeometry) Sets the value of the useGeometry flag.voidsetWhereClause(String whereClause) Sets the where-clause of the layer this GenerateLayerOption relates to.
- 
Constructor Details- 
GenerateLayerOptionpublic GenerateLayerOption()Constructs a GenerateLayerOption with default values.- Since:
- 100.0.0
 
- 
GenerateLayerOptionpublic 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 from- ArcGISFeatureLayerInfo.getServiceLayerId()
- Since:
- 100.0.0
 
- 
GenerateLayerOptionpublic 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 from- ArcGISFeatureLayerInfo.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
 
- 
GenerateLayerOptionConstructs 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 to
- whereClause- an attribute query used to select which features in this layer are included in the generated geodatabase
- Since:
- 100.0.0
 
 
- 
- 
Method Details- 
isIncludeRelatedpublic 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
 
- 
setIncludeRelatedpublic 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
 
- 
getLayerIdpublic 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
 
- 
setLayerIdpublic void setLayerId(long layerId) Sets the ID of the layer this GenerateLayerOption relates to.- Parameters:
- layerId- the layer ID
- Since:
- 100.0.0
 
- 
isUseGeometrypublic 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:
 
- 
setUseGeometrypublic 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
 
- 
getWhereClauseGets 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:
 
- 
setWhereClauseSets 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.QueryOptionisGenerateLayerOption.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
 
- 
getQueryOptionGets 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_FILTERif none was set
- Since:
- 100.1.0
- See Also:
 
- 
setQueryOptionSets 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.NONEto 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_FILTERto filter by geometry and/or where-clause. The values fromisUseGeometry()andgetWhereClause()are applicable.
- 
 GenerateLayerOption.QueryOption.ALLall 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
 
- 
 
 
-