A container for a collection of ServiceFeatureTable instances connected to a feature service. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.9 |
Inherits: |
Properties
- applyEditsResults : list<FeatureTableEditResult>
- applyEditsStatus : Enums.TaskStatus
- closeStatus : Enums.TaskStatus
- connectedTables : list<ServiceFeatureTable>
- createVersionResult : ServiceVersionInfo
- createVersionStatus : Enums.TaskStatus
- credential : Credential
- defaultVersionName : string
- fetchVersionsResults : list<ServiceVersionInfo>
- fetchVersionsStatus : Enums.TaskStatus
- loadError : Error
- loadStatus : Enums.LoadStatus
- portalItem : PortalItem
- requestConfiguration : RequestConfiguration
- serviceInfo : ArcGISFeatureServiceInfo
- sessionType : Enums.FeatureServiceSessionType
- supportsBranchVersioning : bool
- switchVersionStatus : Enums.TaskStatus
- undoLocalEditsStatus : Enums.TaskStatus
- url : url
- versionName : string
Signals
- applyEditsStatusChanged()
- closeStatusChanged()
- createVersionStatusChanged()
- credentialChanged()
- fetchVersionsStatusChanged()
- loadErrorChanged()
- loadStatusChanged()
- portalItemChanged()
- requestConfigurationChanged()
- sessionTypeChanged()
- switchVersionStatusChanged()
- undoLocalEditsStatusChanged()
- urlChanged()
- versionNameChanged()
Methods
- string applyEdits()
- bool cancelTask(string taskId)
- string close()
- string createVersion(ServiceVersionParameters parameters)
- string fetchVersions()
- bool hasLocalEdits()
- string switchVersion(string versionName)
- ServiceFeatureTable table(string layerId)
- ServiceFeatureTable tableWithLayerIdAsInt(int layerId)
- string undoLocalEdits()
Detailed Description
A ServiceGeodatabase connects to a feature service as a whole, grouping together ServiceFeatureTable instances for related records queries, connecting to a version in a branch-versioned service, and managing edits for all tables.
This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.
Type | Default Property |
---|---|
Credential | credential |
RequestConfiguration | requestConfiguration |
PortalItem | portalItem (since Esri.ArcGISRuntime 100.12) |
ServiceGeodatabase can be created with a variety of property combinations. Properties are grouped based on whether you use a url or portalItem to create the Service Geodatabase."
If you want to use a url, these are the properties you can set.
Property | required or optional |
---|---|
url | required |
credential | optional |
versionName | optional |
sessionType | optional |
If you want to use a portalItem, these are the properties you can set. In this scenario authentication should be handled by the Portal if required.
Property | required or optional |
---|---|
portalItem | required |
versionName | optional |
sessionType | optional |
See also Loadable, Cancelable, and RemoteResource.
Property Documentation
applyEditsResults : list<FeatureTableEditResult> |
The result returned when the asynchronous applyEdits operation completes (read-only).
The current status of the asynchronous applyEditsStatus operation (read-only).
Returns the status of the close method (read-only).
This property was introduced in Esri.ArcGISRuntime 100.10.
connectedTables : list<ServiceFeatureTable> |
The collection of feature tables managed by the ServiceGeodatabase (read-only).
createVersionResult : ServiceVersionInfo |
The result returned when the asynchronous createVersion operation completes (read-only).
The current status of the asynchronous createVersion operation (read-only).
[default] credential : Credential |
The Credential for authenticating against a secured service.
Only applicable if using an online service that is secured.
fetchVersionsResults : list<ServiceVersionInfo> |
The result returned when the asynchronous fetchVersions operation completes (read-only).
The current status of the asynchronous fetchVersions operation (read-only).
loadError : Error |
Returns the load error (read-only).
Note: Load errors are also reported on the error
property and emit the errorChanged
signal.
See also Loadable.
Returns the load status (read-only).
See also Loadable and Enums.LoadStatus.
portalItem : PortalItem |
The PortalItem which the ServiceGeodatabase was created from.
This property was introduced in Esri.ArcGISRuntime 100.12.
[default] requestConfiguration : RequestConfiguration |
The configuration parameters used for network requests sent by this task.
serviceInfo : ArcGISFeatureServiceInfo |
The metadata of the service this object is connected to (read-only).
The type of read and edit sessions to use when working with the service.
The default value is Enums.FeatureServiceSessionTypeTransient.
If the feature service this ServiceGeodatabase references is not branch-versioned, only Enums.FeatureServiceSessionTypeTransient is supported.
If using Enums.FeatureServiceSessionTypePersistent, it is important to call close before destruction.
Cannot be set after the ServiceGeodatabase is loaded. When the ServiceGeodatabase is created by loading a Map, use LoadSettings to control the session type.
This property was introduced in Esri.ArcGISRuntime 100.10.
See also LoadSettings::featureServiceSessionType.
The current status of the asynchronous switchVersion operation (read-only).
The current status of the asynchronous undoLocalEdits operation (read-only).
The URL of the service to connect to.
You cannot change the url to the service geodatabase after the instance is already loaded.
The name of the version the ServiceGeodatabase is currently connected to.
This property can only be used to set the initial version name prior to loading.
After the ServiceGeodatabase is loaded, you must use the switchVersion asynchronous method.
Signal Documentation
Emitted when the applyEditsStatus property changes.
Note: The corresponding handler is onApplyEditsStatusChanged
.
Emitted when the closeStatus property changes.
Note: The corresponding handler is onCloseStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.10.
Emitted when the createVersionStatus property changes.
Note: The corresponding handler is onCreateVersionStatusChanged
.
Emitted when the credential property of this ServiceGeodatabase changes.
Note: The corresponding handler is onCredentialChanged
.
Emitted when the fetchVersionsStatus property changes.
Note: The corresponding handler is onFetchVersionsStatusChanged
.
Emitted when the loadError property of this ServiceGeodatabase changes.
Note: Load errors are also reported on the error
property and emit the errorChanged
signal.
Note: The corresponding handler is onLoadErrorChanged
.
Emitted when the loadStatus property of this ServiceGeodatabase changes.
Note: The corresponding handler is onLoadStatusChanged
.
See also Loadable.
Emitted when the portalItem property changes.
Note: The corresponding handler is onPortalItemChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.12.
Emitted when the requestConfiguration property changes.
Note: The corresponding handler is onRequestConfigurationChanged
.
Emitted when the sessionType property changes.
Note: The corresponding handler is onSessionTypeChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.10.
Emitted when the switchVersionStatus property changes.
Note: The corresponding handler is onSwitchVersionStatusChanged
.
Emitted when the undoLocalEditsStatus property changes.
Note: The corresponding handler is onUndoLocalEditsStatusChanged
.
Emitted when the url property changes.
Note: The corresponding handler is onUrlChanged
.
Emitted when the versionName property changes.
Note: The corresponding handler is onVersionNameChanged
.
Method Documentation
Applies all local edits in all tables to the service.
The edits in all tables are applied to the feature service in a call. This is more efficient than applying edits one ServiceFeatureTable at a time.
Returns a task ID that can be used to cancel the applyEdits task.
Cancels the task with the ID taskId.
Returns false
if the task cannot be canceled or there is no task with the specified id taskId.
See also Cancelable.
Closes this service geodatabase.
A request to stop any active reading or editing sessions with the feature service is sent, and after this asynchronous process is complete, this service geodatabase will be closed.
Before calling this method, there should be no references to any related data. For example, terminate fetch versions, create version, switch, apply or undo edits, remove feature layers, and release tables from map.
After calling this method, accessing this service geodatabase or any of its connected tables will fail.
Closing this service geodatabase is not necessary if it has not been loaded.
Returns a string representing the task ID of the asynchronous task.
This method was introduced in Esri.ArcGISRuntime 100.10.
string createVersion(ServiceVersionParameters parameters) |
Creates a new version in the service based on the default version.
- parameters - The properties of the new version.
Branch versioning requires that the default version always be the ancestor of all other versions.
If the service isn't branch-versioned or the parameters do not include a name, an error occurs.
Returns a task ID that can be used to cancel the createVersion task.
See also Enums.TaskStatus, Cancelable, and errorChanged.
Gets a list of all versions on the service.
If the service isn't branch-versioned, an error occurs.
Returns a task ID that can be used to cancel the fetchVersions task.
See also Enums.TaskStatus, Cancelable, and errorChanged.
Returns whether any of the tables in the ServiceGeodatabase have unapplied edits.
Switches all connected feature tables to the new version.
- versionName - The name of the version to connect to.
An error is emitted if:
- The service isn't branch-versioned.
- No version exists with the supplied name.
- Any of the ServiceGeodatabase::connectedTables have unapplied edits.
Check the result of hasLocalEdits before attempting to switch versions, to make sure all changes are saved to the service or discarded from the local cache. Use the ServiceGeodatabase::applyEdits() or ServiceGeodatabase::undoLocalEdits() methods as appropriate to save or discard changes before switching versions. Returns a string representing the task ID of the asynchronous task.
Returns a task ID that can be used to cancel the switchVersion task.
See also Enums.TaskStatus, Cancelable, and errorChanged.
ServiceFeatureTable table(string layerId) |
Returns a service feature table object from the ID of a layer or table in the service.
- layerId - The layer id for which to create the table.
If a table instance for the layer already exists in ServiceGeodatabase::connectedTables, the existing object will be returned. Otherwise, a new ServiceFeatureTable will be created.
If no table or layer exists in the service with the given ID, an error occurs.
Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.
See also errorChanged.
ServiceFeatureTable tableWithLayerIdAsInt(int layerId) |
Returns a service feature table object from the ID of a layer or table in the service.
- layerId - The layer id for which to create the table, represented as an integer type.
Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.
See also table.
Undos all of the local edits in all the tables.
Returns a task ID that can be used to cancel the undoLocalEdits task.