Class SyncLayerOption

java.lang.Object
com.esri.arcgisruntime.tasks.geodatabase.SyncLayerOption

public final class SyncLayerOption extends Object
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 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

      public SyncLayerOption(long layerId, SyncGeodatabaseParameters.SyncDirection syncDirection)
      Constructs a SyncLayerOption with a given layer ID and synchronization direction.
      Parameters:
      layerId - the ID of the layer this SyncLayerOption relates to
      syncDirection - 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

      public SyncGeodatabaseParameters.SyncDirection getSyncDirection()
      Gets the synchronization direction for the layer this SyncLayerOption relates to.
      Returns:
      the synchronization direction
      Since:
      100.0.0
    • setSyncDirection

      public void setSyncDirection(SyncGeodatabaseParameters.SyncDirection syncDirection)
      Sets the synchronization direction for the layer this SyncLayerOption relates to. The default value is SyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL.
      Parameters:
      syncDirection - the synchronization direction
      Throws:
      IllegalArgumentException - if syncDirection is null
      Since:
      100.0.0