Module com.esri.arcgisruntime
Class SyncLayerOption
java.lang.Object
com.esri.arcgisruntime.tasks.geodatabase.SyncLayerOption
Used in conjunction with
SyncGeodatabaseParameters
to refine the direction of sync on a per layer
basis when using GeodatabaseSyncTask.syncGeodatabase(SyncGeodatabaseParameters, com.esri.arcgisruntime.data.Geodatabase)
. This
applies only to geodatabases using the sync model of SyncModel.PER_LAYER
.
You only need to change the properties for layers where you do not want the default behavior. The default behavior is to perform bi-directional sync.
- Since:
- 100.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a SyncLayerOption with default settings.SyncLayerOption
(long layerId) Constructs a SyncLayerOption with a given layer ID.SyncLayerOption
(long layerId, SyncGeodatabaseParameters.SyncDirection syncDirection) Constructs a SyncLayerOption with a given layer ID and synchronization direction. -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the ID of the layer this SyncLayerOption relates to.Gets the synchronization direction for the layer this SyncLayerOption relates to.void
setLayerId
(long layerId) Sets the ID of the layer this SyncLayerOption relates to.void
setSyncDirection
(SyncGeodatabaseParameters.SyncDirection syncDirection) Sets the synchronization direction for the layer this SyncLayerOption relates to.
-
Constructor Details
-
SyncLayerOption
public SyncLayerOption()Constructs a SyncLayerOption with default settings.- Since:
- 100.0.0
-
SyncLayerOption
public SyncLayerOption(long layerId) Constructs a SyncLayerOption with a given layer ID.- Parameters:
layerId
- the ID of the layer this SyncLayerOption relates to- Since:
- 100.0.0
-
SyncLayerOption
Constructs a SyncLayerOption with a given layer ID and synchronization direction.- Parameters:
layerId
- the ID of the layer this SyncLayerOption relates tosyncDirection
- the synchronization direction for this layer- Throws:
IllegalArgumentException
- if syncDirection is null- Since:
- 100.0.0
-
-
Method Details
-
getLayerId
public long getLayerId()Gets the ID of the layer this SyncLayerOption 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 SyncLayerOption relates to.- Parameters:
layerId
- the layer ID- Since:
- 100.0.0
-
getSyncDirection
Gets the synchronization direction for the layer this SyncLayerOption relates to.- Returns:
- the synchronization direction
- Since:
- 100.0.0
-
setSyncDirection
Sets the synchronization direction for the layer this SyncLayerOption relates to. The default value isSyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL
.- Parameters:
syncDirection
- the synchronization direction- Throws:
IllegalArgumentException
- if syncDirection is null- Since:
- 100.0.0
-