Class ServiceFeatureTable
- java.lang.Object
-
- com.esri.arcgisruntime.data.FeatureTable
-
- com.esri.arcgisruntime.data.ArcGISFeatureTable
-
- com.esri.arcgisruntime.data.ServiceFeatureTable
-
- All Implemented Interfaces:
ApiKeyResource
,RemoteResource
,Loadable
,PopupSource
public final class ServiceFeatureTable extends ArcGISFeatureTable implements RemoteResource, ApiKeyResource
A feature table created from the URL to an ArcGIS feature service. A service feature table has aServiceFeatureTable.FeatureRequestMode
, which controls (1) whether features are cached locally (for quicker access by map and scene layers) and (2) whether queries are performed on the local cache or on the server. You can retrieve or modify a table's feature request mode usingFeatureRequestMode
.If the table's mode is
ServiceFeatureTable.FeatureRequestMode.ON_INTERACTION_CACHE
, features are requested from the server in response to user or developer interaction (pan or zoom) and are cached locally. Queries are executed on the cache or (if requested features are not resident in the cache) on the server. This mode is the default.If the table's mode is
ServiceFeatureTable.FeatureRequestMode.ON_INTERACTION_NO_CACHE
, features are always requested from the server. Features are not cached, and all queries are executed on the server.If the table's mode is
ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
, you must callpopulateFromServiceAsync(QueryParameters, boolean, Iterable<String>)
, which populates the local table with the features specified byQueryParameters
and containing the attributes specified byIterable<String>
. Features are cached for the duration of the session and queries are executed against the cache.If the table's feature request mode is ON_INTERACTION_CACHE or ON_INTERACTION_NO_CACHE, ArcGISFeatures in the table initially contain a minimum set of attributes and geometry that omits any m values. This is an optimization for faster rendering. To access all attributes (and geometry with m values) in features you get from a query, do one of the following:
- Call
Loadable.loadAsync()
on each returned feature individually. - Call the query method and pass the constant
ServiceFeatureTable.QueryFeatureFields.LOAD_ALL
which performs the query and returns features fully loaded (with all attributes and any m values defined by the service). SeequeryFeaturesAsync(QueryParameters, QueryFeatureFields)
andqueryRelatedFeaturesAsync(ArcGISFeature, RelatedQueryParameters, QueryFeatureFields)
- Call
loadOrRefreshFeaturesAsync(Iterable<Feature>)
and pass anIterable
ofFeature
s to be loaded.
FeatureLayer
in aMapView
, features are requested from the services in the correct spatial reference to match the spatial reference of the map. UseArcGISRuntimeEnvironment.setServiceCurveGeometryMode(ServiceCurveGeometryMode)
to change how curve geometries are returned from the service,if supported
.Here's an example to display features from a spatial feature service; a service which has geometry:
ServiceFeatureTable table = new ServiceFeatureTable("http://sampleserver5.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/0"); FeatureLayer layer = new FeatureLayer(table); map.getOperationalLayers().add(featureLayer);
You can use a service feature table to access non-spatial tables from feature services where
FeatureTable.hasGeometry()
is false. The feature request mode of the table must beServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
, and you must callpopulateFromServiceAsync(QueryParameters, boolean, Iterable<String>)
.The base class
ArcGISFeatureTable
allows a service feature table to have editable attribute fields, feature templates, feature types, and the editing capabilities returned byArcGISFeatureLayerInfo.getCapabilities()
. SeeFeatureTemplate
andFeatureType
.A service feature table might require authentication to access the service.
- Since:
- 100.0.0
- See Also:
ArcGISFeature
,ArcGISFeatureTable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServiceFeatureTable.FeatureRequestMode
The feature request mode for aServiceFeatureTable
.static class
ServiceFeatureTable.QueryFeatureFields
Controls which attributes are included in the features returned byqueryFeaturesAsync(QueryParameters, QueryFeatureFields)
orqueryRelatedFeaturesAsync(ArcGISFeature, RelatedQueryParameters, QueryFeatureFields)
.
-
Constructor Summary
Constructors Constructor Description ServiceFeatureTable(ServiceFeatureTable table, RelationshipInfo relationshipInfo)
Creates a ServiceFeatureTable instance that relates to the given table based on the given relationship info.ServiceFeatureTable(PortalItem portalItem)
Creates a new service feature table object from a feature service or feature layer portal item.ServiceFeatureTable(PortalItem portalItem, long layerId)
Creates a new service feature table instance from a feature service portal item.ServiceFeatureTable(java.lang.String url)
Creates an instance from the given feature service URL.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListenableFuture<java.util.List<FeatureEditResult>>
applyEditsAsync()
Applies edits that have been added to this table including attachment edits in one call.void
clearCache(boolean keepLocalEdits)
Clears all the features in the local table.java.lang.String
getApiKey()
Gets the API key to access API key enabled services and resources in ArcGIS Online.double
getBufferFactor()
Gets the buffer factor.Credential
getCredential()
Gets the credential used to authenticate the user with the service feature table.java.lang.String
getDefinitionExpression()
Gets the definition expression for filtering the features queried in this table.Envelope
getExtent()
Returns the extent that the table represents, this can be used to determine the extent within which data can be edited.ServiceFeatureTable.FeatureRequestMode
getFeatureRequestMode()
Gets the Feature Request mode.java.lang.String
getGeodatabaseVersion()
Gets the geodatabase version.Item
getItem()
Gets the item associated with this table.RequestConfiguration
getRequestConfiguration()
Gets the RequestConfiguration object in use by this table.ServiceGeodatabase
getServiceGeodatabase()
Gets theServiceGeodatabase
this service feature table is part of.java.lang.String
getUri()
Returns the URL used to create the table.ListenableFuture<java.lang.Void>
loadOrRefreshFeaturesAsync(java.lang.Iterable<Feature> features)
Loads all attributes and geometries for not loaded features, and refetches attributes and geometry from already-loaded features.protected void
onDoneLoadingInternal()
ListenableFuture<FeatureQueryResult>
populateFromServiceAsync(QueryParameters query, boolean clearCache, java.lang.Iterable<java.lang.String> outFields)
Queries the feature service and places the resulting features in the local table, which is cached for the duration of the session.ListenableFuture<FeatureQueryResult>
queryFeaturesAsync(QueryParameters query)
Asynchronously queries features from this table's cache and/or from the service used to create this table.ListenableFuture<FeatureQueryResult>
queryFeaturesAsync(QueryParameters queryParameters, ServiceFeatureTable.QueryFeatureFields queryFields)
Asynchronously queries features from this table's cache and/or from the feature service used to create this table.ListenableFuture<java.util.List<RelatedFeatureQueryResult>>
queryRelatedFeaturesAsync(ArcGISFeature feature, RelatedQueryParameters relatedQueryParameters, ServiceFeatureTable.QueryFeatureFields queryFields)
Queries for related features in this service feature table using the provided parameters and query feature fields.void
setApiKey(java.lang.String apiKey)
Sets the API key to access API key enabled services and resources in ArcGIS Online.void
setBufferFactor(double bufferFactor)
Sets the factor used to calculate a buffered extent, within which features are automatically fetched and cached, if the FeatureRequestMode of the table is ON_INTERACTION_CACHE.void
setCredential(Credential credential)
Sets the credential used to authenticate the user with the service feature table.void
setDefinitionExpression(java.lang.String definitionExpression)
Sets a definition expression which is a SQL statement where clause to filter out the features to be queried.void
setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode featureRequestMode)
Sets the Feature Request mode which affects how often data is retrieved from the service and how it is cached in the local table.void
setGeodatabaseVersion(java.lang.String version)
Sets the geodatabase version.void
setRequestConfiguration(RequestConfiguration requestConfiguration)
Sets configuration parameters used for network requests sent using this table object.ListenableFuture<java.lang.Void>
undoLocalEditsAsync()
Undoes all of the local edits since the last server acknowledgement.-
Methods inherited from class com.esri.arcgisruntime.data.ArcGISFeatureTable
createFeature, createFeature, createFeature, createFeature, createFeature, createFeature, getAddedFeaturesAsync, getAddedFeaturesCountAsync, getContingentValues, getContingentValuesDefinition, getDefaultSubtypeCode, getDeletedFeaturesAsync, getDeletedFeaturesCountAsync, getEditableAttributeFields, getFeatureSubtypes, getFeatureTemplate, getFeatureTemplates, getFeatureType, getFeatureTypes, getGlobalIdField, getLayerInfo, getLocalEditsAsync, getLocalEditsCountAsync, getObjectIdField, getRelatedTables, getRelatedTables, getServiceLayerId, getSubtypeField, getTypeIdField, getUnknownJson, getUnsupportedJson, getUpdatedFeaturesAsync, getUpdatedFeaturesCountAsync, hasAttachments, hasLocalEdits, isUseAdvancedSymbology, queryRelatedFeatureCountAsync, queryRelatedFeatureCountAsync, queryRelatedFeaturesAsync, queryRelatedFeaturesAsync, setUseAdvancedSymbology, validateContingencyConstraints, validateRelationshipConstraintsAsync
-
Methods inherited from class com.esri.arcgisruntime.data.FeatureTable
addDoneLoadingListener, addFeatureAsync, addFeaturesAsync, addLoadStatusChangedListener, canAdd, cancelLoad, canDelete, canEditGeometry, canUpdate, createFeature, createFeature, deleteFeatureAsync, deleteFeaturesAsync, getDisplayName, getFeatureLayer, getField, getFields, getGeometryType, getLayer, getLoadError, getLoadStatus, getPopupDefinition, getSpatialReference, getTableName, getTotalFeatureCount, hasGeometry, hasM, hasZ, isEditable, isPopupEnabled, loadAsync, queryExtentAsync, queryFeatureCountAsync, queryStatisticsAsync, removeDoneLoadingListener, removeLoadStatusChangedListener, retryLoadAsync, setDisplayName, setPopupDefinition, setPopupEnabled, updateFeatureAsync, updateFeaturesAsync
-
-
-
-
Constructor Detail
-
ServiceFeatureTable
public ServiceFeatureTable(java.lang.String url)
Creates an instance from the given feature service URL. To use a request configuration, callsetRequestConfiguration(com.esri.arcgisruntime.io.RequestConfiguration)
after this constructor and before loading this table. To use a credential, callsetCredential(Credential)
after this constructor and before loading this table.- Parameters:
url
- the URL of an ArcGIS Feature Service.- Throws:
java.lang.IllegalArgumentException
- if input is null or empty- Since:
- 100.0.0
-
ServiceFeatureTable
public ServiceFeatureTable(ServiceFeatureTable table, RelationshipInfo relationshipInfo)
Creates a ServiceFeatureTable instance that relates to the given table based on the given relationship info.- Parameters:
table
- the related tablerelationshipInfo
- the relationship info defining the relationship between this new table and the given table- Throws:
java.lang.IllegalArgumentException
- if table or relationshipInfo are null- Since:
- 100.1.0
-
ServiceFeatureTable
public ServiceFeatureTable(PortalItem portalItem, long layerId)
Creates a new service feature table instance from a feature service portal item.- Parameters:
portalItem
- a feature service portal itemlayerId
- the layer ID to use- Throws:
java.lang.IllegalArgumentException
- if portalItem is null- Since:
- 100.3.0
-
ServiceFeatureTable
public ServiceFeatureTable(PortalItem portalItem)
Creates a new service feature table object from a feature service or feature layer portal item.If the portal item is a feature service, the ServiceFeatureTable will be created from the first layer on the service. If the portal item is a feature layer, the ServiceFeatureTable will be created from the feature layer.
- Parameters:
portalItem
- a feature service or feature layerPortalItem
- Throws:
java.lang.IllegalArgumentException
- if portalItem is null- Since:
- 100.14.0
- See Also:
getItem()
-
-
Method Detail
-
getUri
public java.lang.String getUri()
Returns the URL used to create the table.- Specified by:
getUri
in interfaceRemoteResource
- Returns:
- the URL used to create the table.
- Since:
- 100.0.0
-
setRequestConfiguration
public void setRequestConfiguration(RequestConfiguration requestConfiguration)
Sets configuration parameters used for network requests sent using this table object. The global RequestConfiguration is used if no RequestConfiguration is set or null is set- Specified by:
setRequestConfiguration
in interfaceRemoteResource
- Parameters:
requestConfiguration
- object containing the parameters to use- Since:
- 100.0.0
-
getRequestConfiguration
public RequestConfiguration getRequestConfiguration()
Gets the RequestConfiguration object in use by this table. If null is returned, then that indicates that the global RequestConfiguration is used instead.- Specified by:
getRequestConfiguration
in interfaceRemoteResource
- Returns:
- the RequestConfiguration object or null if none has been set
- Since:
- 100.0.0
- See Also:
RequestConfiguration
-
setCredential
public void setCredential(Credential credential)
Sets the credential used to authenticate the user with the service feature table.- Specified by:
setCredential
in interfaceRemoteResource
- Parameters:
credential
- the credential used to authenticate the user with the service feature table- Since:
- 100.0.0
-
getCredential
public Credential getCredential()
Gets the credential used to authenticate the user with the service feature table.- Specified by:
getCredential
in interfaceRemoteResource
- Returns:
- the credential used to authenticate the user with the service feature table
- Since:
- 100.0.0
-
getBufferFactor
public double getBufferFactor()
Gets the buffer factor.- Returns:
- the buffer factor
- Since:
- 100.0.0
- See Also:
setBufferFactor(double)
-
setBufferFactor
public void setBufferFactor(double bufferFactor)
Sets the factor used to calculate a buffered extent, within which features are automatically fetched and cached, if the FeatureRequestMode of the table is ON_INTERACTION_CACHE. By default it is 2.0 (two times the visible extent). The buffered extent is calculated as:width = bufferFactor : extent.width; height = bufferFactor : extent.height;
- Parameters:
bufferFactor
- the buffer factor to be used. Default is 2.0.- Since:
- 100.0.0
-
getExtent
public Envelope getExtent()
Returns the extent that the table represents, this can be used to determine the extent within which data can be edited. ServiceFeatureTables in manual cache mode will return the extent of the features which have been cached, all other modes will return the extent of the layer/table defined by the service (fromArcGISFeatureLayerInfo.getExtent()
.- Overrides:
getExtent
in classFeatureTable
- Returns:
- the extent
- Since:
- 100.0.0
- See Also:
GeodatabaseFeatureTable
-
getFeatureRequestMode
public ServiceFeatureTable.FeatureRequestMode getFeatureRequestMode()
Gets the Feature Request mode.- Returns:
- the feature request mode
- Since:
- 100.0.0
- See Also:
setFeatureRequestMode(FeatureRequestMode)
-
setFeatureRequestMode
public void setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode featureRequestMode)
Sets the Feature Request mode which affects how often data is retrieved from the service and how it is cached in the local table.- Parameters:
featureRequestMode
- the feature request mode- Throws:
java.lang.IllegalArgumentException
- if the input is null- Since:
- 100.0.0
- See Also:
ServiceFeatureTable.FeatureRequestMode
-
applyEditsAsync
public ListenableFuture<java.util.List<FeatureEditResult>> applyEditsAsync()
Applies edits that have been added to this table including attachment edits in one call. This returns edit results for each feature, each result includes attachment results for that feature.Uploads any changes to the local table to the feature service.
ServiceFeatureTable.applyEditsAsync()
is meant to be used for single table workflows or tables without geodatabase behavior (see below). If an edit on this table can cause an edit to another table due to geodatabase behavior, it is highly recommended to useServiceGeodatabase.applyEditsAsync()
instead to prevent data inconsistency, so that dependent edits are all applied or none are (if an error occurs).For example, when tables have a composite relationship, applying the delete of a destination feature in a composite relationship deletion will only delete the destination feature on the server, therefore causing inconsistency in the data.
Areas which have geodatabase behavior:
- Composite relationships
- Annotation feature layers
- Utility network association deletion semantics
- Attribute rules
- Returns:
- a ListenableFuture representing the resulting list of edit results and indicating if the operation
isDone()
; also allows cancellation. Callingget()
on the returned future may throw an ExecutionException with its cause set toIOException
if a network request fails - Since:
- 100.0.0
-
clearCache
public void clearCache(boolean keepLocalEdits)
Clears all the features in the local table. Caches will only exist in certain modes.- Parameters:
keepLocalEdits
- true, if edited rows in the table should not be cleared, otherwise false- Since:
- 100.0.0
-
populateFromServiceAsync
public ListenableFuture<FeatureQueryResult> populateFromServiceAsync(QueryParameters query, boolean clearCache, java.lang.Iterable<java.lang.String> outFields)
Queries the feature service and places the resulting features in the local table, which is cached for the duration of the session. The ServiceFeatureTable must have itsServiceFeatureTable.FeatureRequestMode
set toServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
.This method is useful for non-geographic data. It's also helpful when you want to avoid accessing the service for a feature whose geometry is in the current extent of the map or scene.
- Parameters:
query
- options for controlling the operationclearCache
- if true, thenclearCache(boolean)
will be called before populating the local table. If false, the resulting features will be appended to the local table.outFields
- each string is the name of a field to be used when populating the cache. If the iterable contains the single element "*", then all fields will be used. If the ObjectID field string name is not provided as part of the iterable, no features will be returned for this method.- Returns:
- a ListenableFuture represents the result of the query; the results will replace or be appended to this
table. The ListenableFuture indicates if the query
isDone()
; also allows cancellation. Callingget()
on the returned future may throw an ExecutionException with its cause set toIOException
if a network request fails - Throws:
java.lang.IllegalArgumentException
- if the input is nullArcGISRuntimeException
- if the query execution failedjava.lang.IllegalStateException
- if the feature request mode is not MANUAL_CACHE- Since:
- 100.0.0
-
queryFeaturesAsync
public ListenableFuture<FeatureQueryResult> queryFeaturesAsync(QueryParameters query)
Asynchronously queries features from this table's cache and/or from the service used to create this table. If the FeatureRequestMode is MANUAL_CACHE then the query will always be performed locally. If the FeatureRequestMode is ON_INTERACTION_CACHE then queries that contain geometries which are within an extent that has been cached will be performed locally, otherwise they will be performed on the server. If the FeatureRequestMode is ON_INTERACTION_NOCACHE the query will always be performed on the server.- Overrides:
queryFeaturesAsync
in classFeatureTable
- Parameters:
query
- query parameters to be used- Returns:
- a ListenableFuture represents the result of the query. The ListenableFuture indicates if the query
isDone()
; also allows cancellation. Callingget()
on the returned future may throw an ExecutionException with its cause set toIOException
if a network request fails - Throws:
ArcGISRuntimeException
- if the query execution failed- Since:
- 100.0.0
-
queryFeaturesAsync
public ListenableFuture<FeatureQueryResult> queryFeaturesAsync(QueryParameters queryParameters, ServiceFeatureTable.QueryFeatureFields queryFields)
Asynchronously queries features from this table's cache and/or from the feature service used to create this table.If the request mode of the table is
ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
, then the query is always performed on the local table.If the mode is
ServiceFeatureTable.FeatureRequestMode.ON_INTERACTION_CACHE
, then the query is performed on the local cache, provided that the geometries of the features are within an extent that has been cached; otherwise, the query is performed on the server.If the mode is
ServiceFeatureTable.FeatureRequestMode.ON_INTERACTION_NO_CACHE
, the query is always performed on the server.The
ServiceFeatureTable.QueryFeatureFields
constants control which fields will be included with the returned features.- A table whose feature request mode is
MANUAL_CACHE
contains all fields that you specified in the third parameter when callingpopulateFromServiceAsync(QueryParameters, boolean, Iterable<String>)
- A table whose feature request mode is
ON_INTERACTION_CACHE
orON_INTERACTION_NO_CACHE
initially contains features with a minimum set of attribute required for rendering. You must load a feature to access all its attributes. The convenience constantServiceFeatureTable.QueryFeatureFields.LOAD_ALL
automatically loads the returned features into the local table, which makes all attributes available.
- Parameters:
queryParameters
- options for controlling the operation.queryFields
- options for controlling what fields are in the features of the query result- Returns:
- a ListenableFuture representing the result of the query. The ListenableFuture indicates if the query
operation
isDone()
; also allows cancellation. Callingget()
on the returned future may throw an ExecutionException with its cause set toIOException
if a network request fails - Throws:
java.lang.IllegalArgumentException
- if the queryParameters or queryFields are null- Since:
- 100.0.0
- A table whose feature request mode is
-
queryRelatedFeaturesAsync
public ListenableFuture<java.util.List<RelatedFeatureQueryResult>> queryRelatedFeaturesAsync(ArcGISFeature feature, RelatedQueryParameters relatedQueryParameters, ServiceFeatureTable.QueryFeatureFields queryFields)
Queries for related features in this service feature table using the provided parameters and query feature fields. SeequeryFeaturesAsync(QueryParameters, QueryFeatureFields)
for more details.- Parameters:
feature
- feature for which to query related featuresrelatedQueryParameters
- related query parameters to be usedqueryFields
- enumeration indicating which fields to return from the query- Returns:
- a ListenableFuture representing the resulting list of RelatedFeatureQueryResults and indicating if the
query operation
isDone()
; also allows cancellation. Callingget()
on the returned future may throw an ExecutionException with its cause set toIOException
if a network request fails - Throws:
java.lang.IllegalArgumentException
- if the feature, relatedQueryParameters, or queryFields are null- Since:
- 100.1.0
-
setDefinitionExpression
public void setDefinitionExpression(java.lang.String definitionExpression)
Sets a definition expression which is a SQL statement where clause to filter out the features to be queried. Once a valid definition expression is set, it will be applied in the all subsequent queries. The FeatureLayer being created from the service table will inherit the same definition expression. Any changes applied on the definition expression of the feature layer is immediately applied to the table and vice versa. In theServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
mode, the definition expression will be appended to the QueryParameters' where clause whenpopulateFromServiceAsync(QueryParameters, boolean, Iterable)
is called.The definition expression string uses the SQL-92 where clause syntax (https://en.wikipedia.org/wiki/SQL-92). Be sure to escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. See the ArcGIS Blog article entitled "Querying Feature Services Date-Time Queries" ( https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-time-queries/) for more information.
- Parameters:
definitionExpression
- an expression which is a SQL statement where clause to filter out the features to be queried, it can be null- Since:
- 100.2.0
- See Also:
getDefinitionExpression()
,FeatureLayer.setDefinitionExpression(String)
-
getDefinitionExpression
public java.lang.String getDefinitionExpression()
Gets the definition expression for filtering the features queried in this table.- Returns:
- the definition expression for filtering the features queried in this table; or empty if it is set to null
- Since:
- 100.2.0
- See Also:
setDefinitionExpression(String)
-
getGeodatabaseVersion
public java.lang.String getGeodatabaseVersion()
Gets the geodatabase version.- Returns:
- the geodatabase version, or an empty string if there is no version
- Since:
- 100.3.0
-
setGeodatabaseVersion
public void setGeodatabaseVersion(java.lang.String version)
Sets the geodatabase version.- Parameters:
version
- the version, can be null or empty- Since:
- 100.3.0
-
getItem
public Item getItem()
Gets the item associated with this table.- Returns:
- the associated item or null if there is no associated item
- Since:
- 100.3.0
- See Also:
ServiceFeatureTable(PortalItem, long)
-
undoLocalEditsAsync
public ListenableFuture<java.lang.Void> undoLocalEditsAsync()
Undoes all of the local edits since the last server acknowledgement.The
ServiceFeatureTable.undoLocalEditsAsync()
method is meant to be used for single table workflows or tables without geodatabase behavior (see below). If the service which the table belongs to has geodatabase behavior (see below), it is highly recommended to to useServiceGeodatabase.undoLocalEditsAsync()
. Undoing edits in one table can cause data inconsistencies between the local cache and the service ifServiceFeatureTable.undoLocalEditsAsync()
is used.For example, when tables have a composite relationship, undoing only the origin feature would violate the composite relationship rule that an origin and destination feature must be either deleted together or not at all.
Areas which have geodatabase behavior:
- Composite relationships
- Annotation feature layers
- Utility network association deletion semantics
- Attribute rules
- Returns:
- a ListenableFuture to undo all of the local edits asynchronously. Add a listener to the Future to know when the task is done.
- Since:
- 100.3.0
-
loadOrRefreshFeaturesAsync
public ListenableFuture<java.lang.Void> loadOrRefreshFeaturesAsync(java.lang.Iterable<Feature> features)
Loads all attributes and geometries for not loaded features, and refetches attributes and geometry from already-loaded features. In the latter case, Geometries previously retrieved from features may be out of date andFeature.getGeometry()
needs to be called again to get the correct Geometry.This method will not refresh feature attachments. Use
ArcGISFeature.fetchAttachmentsAsync()
to retrieve attachments.This method makes network requests in order to fetch the data from the remote service.
Loads all attributes and geometries for unloaded features, and refetches attributes and geometries for previously loaded features. All features loaded or refreshed by this method will have m values if defined by the service. Note that an m value might be NaN.
Features you get from
queryFeaturesAsync(QueryParameters, QueryFeatureFields)
orqueryRelatedFeaturesAsync(ArcGISFeature, RelatedQueryParameters, QueryFeatureFields)
might be in the minimally loaded state (minimum attributes required for rendering and no m values). To load all attributes, pass anIterable
of theFeature
s to this method.Any feature requested, but not returned by the server will have its object id cleared (set to an invalid negative value) to indicate it is no longer associated with the service feature table.
After calling this method, any non-applied edits on the table will be lost.
This method will not refresh feature attachments. Use
ArcGISFeature.fetchAttachmentsAsync()
to retrieve attachments.- Parameters:
features
- the features to be reloaded or refetched- Returns:
- a ListenableFuture to reload or refetch the features asynchronously. Add a listener to the Future to know when the task is done.
- Throws:
java.lang.IllegalArgumentException
- if features is null- Since:
- 100.3.0
-
onDoneLoadingInternal
protected void onDoneLoadingInternal()
- Overrides:
onDoneLoadingInternal
in classFeatureTable
-
getServiceGeodatabase
public ServiceGeodatabase getServiceGeodatabase()
Gets theServiceGeodatabase
this service feature table is part of.- Returns:
- the ServiceGeodatabase this service feature table is part of, or null
- Since:
- 100.9.0
-
getApiKey
public java.lang.String getApiKey()
Description copied from interface:ApiKeyResource
Gets the API key to access API key enabled services and resources in ArcGIS Online.An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.
In addition to setting an API key at a global level for your application using
ArcGISRuntimeEnvironment.setApiKey(String)
, you can callApiKeyResource.setApiKey(String)
on any ArcGIS Runtime class that implementsApiKeyResource
. When you callsetApiKey(String)
on anAPIKeyResource
, it will override the default key at the global level (the key returned byArcGISRuntimeEnvironment.getApiKey()
, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app.Classes that expose an API key property by implementing APIKeyResource include:
- Specified by:
getApiKey
in interfaceApiKeyResource
- Returns:
- the API key to access API key enabled services and resources in ArcGIS Online
- See Also:
ApiKeyResource.setApiKey(String)
-
setApiKey
public void setApiKey(java.lang.String apiKey)
Description copied from interface:ApiKeyResource
Sets the API key to access API key enabled services and resources in ArcGIS Online.An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.
In addition to setting an API key at a global level for your application using
ArcGISRuntimeEnvironment.setApiKey(String)
, you can callsetApiKey(String)
on any ArcGIS Runtime class that implementsApiKeyResource
. When you callsetApiKey(String)
on anAPIKeyResource
, it will override the default key at the global level (the key returned byArcGISRuntimeEnvironment.getApiKey()
, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app.Classes that expose an API key property by implementing APIKeyResource include:
- Specified by:
setApiKey
in interfaceApiKeyResource
- Parameters:
apiKey
- the API key to access API key enabled services and resources in ArcGIS Online- See Also:
ApiKeyResource.getApiKey()
-
-