ServiceGeodatabase

A container for a collection of ServiceFeatureTable connected to a feature service. 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.

Since

200.1.0

Constructors

Link copied to clipboard
constructor(portalItem: PortalItem, versionName: String = "", sessionType: FeatureServiceSessionType = FeatureServiceSessionType.Transient)

Creates a new ServiceGeodatabase from a feature service portal item, and connects to a specific version in the feature service. If a version with the name does not exist, or the service is not branch versioned, the ServiceGeodatabase will fail to load.

constructor(url: String, versionName: String = "", sessionType: FeatureServiceSessionType = FeatureServiceSessionType.Transient)

Creates a new ServiceGeodatabase connected to a specific version in a feature service. If a version with the name does not exist, or the service is not branch versioned, the ServiceGeodatabase will fail to load.

Properties

Link copied to clipboard

The collection of feature tables managed by the ServiceGeodatabase.

Link copied to clipboard

The name of the default version.

Link copied to clipboard
Link copied to clipboard

The metadata of the service this object is connected to.

Link copied to clipboard

The type of read and edit sessions to use when working with the service. The default value is com.arcgismaps.arcgisservices.FeatureServiceSessionType.Transient.

Link copied to clipboard

Whether the service supports branch versioning.

Link copied to clipboard
val url: String?

The URL of the feature service or the portal item to connect to. Use com.arcgismaps.arcgisservices.ArcGISFeatureServiceInfo.url to get the feature service URL.

Link copied to clipboard

The name of the version the ServiceGeodatabase is currently connected to. To change the version this ServiceGeodatabase is connected to, use the ServiceGeodatabase.switchVersion method.

Inherited properties

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard

Applies all local edits in all tables to the service. This method applies all feature table edits to the feature service as a single transaction. If one of the edits fails, all edits are rolled-back, and geodatabase integrity is preserved. This is the recommended approach to applying edits and is typically more efficient than calling ServiceFeatureTable.applyEdits on each table.

Link copied to clipboard
suspend fun close(): Result<Unit>

Closes this service geodatabase. A request to stop any active reading or editing sessions with the feature service is sent and once this asynchronous process is complete, this service geodatabase will be closed.

Link copied to clipboard

Creates a new version in the service based on the default version. Branch versioning requires that the default version always be the ancestor of all other versions.

Link copied to clipboard

Gets a list of all versions on the service. If the service isn't branch versioned, an ErrorType.MappingBranchVersioningNotSupportedByService is thrown.

Link copied to clipboard

Returns a service feature table object from the ID of a layer or table in the service. 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.

Link copied to clipboard

Determines if any of the tables in the ServiceGeodatabase have unapplied edits.

Link copied to clipboard
suspend fun switchVersion(versionName: String): Result<Unit>

Switches all connected feature tables to the new version. An error is thrown if:

Link copied to clipboard
suspend fun undoLocalEdits(): Result<Unit>

Undos all of the local edits in all the tables.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.