;

SyncGeodatabaseParameters Class

  • SyncGeodatabaseParameters
  • class Esri::ArcGISRuntime::SyncGeodatabaseParameters

    The parameters to sync data of a sync-enabled geodatabase. More...

    Header: #include <SyncGeodatabaseParameters>
    Since: Esri::ArcGISRuntime 100.0

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    SyncGeodatabaseParameters(Esri::ArcGISRuntime::SyncGeodatabaseParameters &&other)
    SyncGeodatabaseParameters(const Esri::ArcGISRuntime::SyncGeodatabaseParameters &other)
    SyncGeodatabaseParameters()
    Esri::ArcGISRuntime::SyncGeodatabaseParameters &operator=(Esri::ArcGISRuntime::SyncGeodatabaseParameters &&other)
    Esri::ArcGISRuntime::SyncGeodatabaseParameters &operator=(const Esri::ArcGISRuntime::SyncGeodatabaseParameters &other)
    ~SyncGeodatabaseParameters()
    Esri::ArcGISRuntime::SyncDirection geodatabaseSyncDirection() const
    bool isEmpty() const
    bool isKeepGeodatabaseDeltas() const
    bool isRollbackOnFailure() const
    QList<Esri::ArcGISRuntime::SyncLayerOption> layerOptions() const
    void setGeodatabaseSyncDirection(Esri::ArcGISRuntime::SyncDirection syncDirection)
    void setKeepGeodatabaseDeltas(bool keepGeodatabaseDeltas)
    void setLayerOptions(const QList<Esri::ArcGISRuntime::SyncLayerOption> &syncLayerOptions)
    void setRollbackOnFailure(bool rollbackOnFailure)

    Detailed Description

    SyncGeodatabaseParameters is used with GeodatabaseSyncTask::syncGeodatabase to sync the data of a sync-enabled geodatabase with its originating ArcGIS Feature services.

    Note: Rather than constructing one of these directly, consider using the convenience method GeodatabaseSyncTask::GeodatabaseSyncTask::createDefaultSyncGeodatabaseParameters. It will create a SyncGeodatabaseParameters object initialized with appropriate parameters based on the supported capabilities and geodatabase configuration of the ArcGIS Feature Service.

    See GeodatabaseSyncTask for details about how to sync the geodatabase. See Geodatabase for details about edit and query operations supported by the geodatabase.

    Member Function Documentation

    SyncGeodatabaseParameters::SyncGeodatabaseParameters(Esri::ArcGISRuntime::SyncGeodatabaseParameters &&other)

    Move constructor from other SyncGeodatabaseParameters.

    SyncGeodatabaseParameters::SyncGeodatabaseParameters(const Esri::ArcGISRuntime::SyncGeodatabaseParameters &other)

    Copy constructor from other SyncGeodatabaseParameters.

    SyncGeodatabaseParameters::SyncGeodatabaseParameters()

    Default constructor.

    Esri::ArcGISRuntime::SyncGeodatabaseParameters &SyncGeodatabaseParameters::operator=(Esri::ArcGISRuntime::SyncGeodatabaseParameters &&other)

    Move operator from other SyncGeodatabaseParameters.

    Esri::ArcGISRuntime::SyncGeodatabaseParameters &SyncGeodatabaseParameters::operator=(const Esri::ArcGISRuntime::SyncGeodatabaseParameters &other)

    Assignment operator from other SyncGeodatabaseParameters.

    SyncGeodatabaseParameters::~SyncGeodatabaseParameters()

    Destructor.

    Esri::ArcGISRuntime::SyncDirection SyncGeodatabaseParameters::geodatabaseSyncDirection() const

    Returns the direction in which the entire geodatabase must sync changes with the service.

    The default value is SyncDirection::None if SyncGeodatabaseParameters is empty or SyncDirection::Bidirectional if it is not empty.

    See also setGeodatabaseSyncDirection().

    bool SyncGeodatabaseParameters::isEmpty() const

    Returns whether this SyncGeodatabaseParameters is empty.

    If the SyncGeodatabaseParameters is empty, it is not possible to change any of the properties.

    bool SyncGeodatabaseParameters::isKeepGeodatabaseDeltas() const

    Returns whether or not the upload or downloaded server delta geodatabases will be removed at the end of the sync job. A delta geodatabase is a file that contains the changes that have occurred since a mobile replica Geodatabase was last synchronized with its feature service. See https://developers.arcgis.com/rest/services-reference/enterprise/synchronize-replica.htm for an overview of the delta files used in synchronization.

    There are two types of delta geodatabase:

    • Local edits, performed on the user's device, are exported as an "upload" delta that is applied to the originating feature service
    • Online edits, performed by other users are requested as a "download" delta which is then applied to the local replica geodatabase

    Delta geodatabases allow you to troubleshoot sync problems. For example, you can inspect the geodatabase changes or you could send the file to the administrator of the feature service.

    You can choose to retain both the uploaded and downloaded delta geodatabases after the sync job has completed. Set to true to retain both delta geodatabases and set to false to have them deleted at the end of the sync job. Deltas will be retained regardless of whether the job succeeds or fails.

    Note that when this property is set to true, the upload delta geodatabase will only be available if there are changes to upload and the sync direction is SyncDirection::Upload or SyncDirection::Bidirectional. The download delta geodatabase will only be available when there are changes to download and the sync direction is SyncDirection::Download or SyncDirection::Bidirectional. The default value is false.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also GeodatabaseSyncTask::exportDelta.

    bool SyncGeodatabaseParameters::isRollbackOnFailure() const

    Returns whether all edits are rolled back if a failure occurs while importing edits from the geodatabase onto the server.

    The default value is false.

    QList<Esri::ArcGISRuntime::SyncLayerOption> SyncGeodatabaseParameters::layerOptions() const

    Returns the options specifying the direction in which individual layers in the geodatabase must sync changes with the service.

    The default value is an empty list of SyncLayerOption.

    See also setLayerOptions().

    void SyncGeodatabaseParameters::setGeodatabaseSyncDirection(Esri::ArcGISRuntime::SyncDirection syncDirection)

    Sets the direction in which the entire geodatabase must sync changes with the service.

    • syncDirection - The direction to sync.

    This property only applies if the geodatabase uses a sync model of SyncModel::Geodatabase. Otherwise, use the layerOptions property.

    The default value is SyncDirection::None if SyncGeodatabaseParameters is empty or SyncDirection::Bidirectional if it is not empty.

    See also geodatabaseSyncDirection().

    void SyncGeodatabaseParameters::setKeepGeodatabaseDeltas(bool keepGeodatabaseDeltas)

    Sets the keepGeodatabaseDeltas to keepGeodatabaseDeltas.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also isKeepGeodatabaseDeltas.

    void SyncGeodatabaseParameters::setLayerOptions(const QList<Esri::ArcGISRuntime::SyncLayerOption> &syncLayerOptions)

    Sets the options specifying the direction in which individual layers in the geodatabase must sync changes with the service.

    • syncLayerOptions - The list of sync options for individual layers.

    Not all layers need to be included in the sync operation. Some of them can be excluded by leaving them out of this list. This property only applies if the geodatabase uses a sync model of SyncModel::Layer. Otherwise, use the geodatabaseSyncDirection property.

    The default value is an empty list of SyncLayerOption.

    See also layerOptions().

    void SyncGeodatabaseParameters::setRollbackOnFailure(bool rollbackOnFailure)

    Sets whether all edits are rolled back if a failure occurs while importing edits from the geodatabase onto the server.

    • rollbackOnFailure - Whether to roll back edits when a failure occurs.

    If rollbackOnFailure is false, then failed edits are skipped. Other edits are still applied.

    Note: This property only applies to edits uploaded by the client to the server. It does not apply to edits imported by client from the server.

    The default value is false.

    See also isRollbackOnFailure().

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.