Package com.luciad.models.features
Class FeatureSaveErrorInfo
java.lang.Object
com.luciad.models.features.FeatureSaveErrorInfo
- All Implemented Interfaces:
AutoCloseable
This class contains details on a failed
IFeatureModel save.
It can contain a general error or one or more feature-specific errors, or both, but never neither.
A general error can, for example, be a database connection failure or the lack of permissions to write to a file.
A feature error can, for example, be a violation of a constraint enforced by the backend on features.
- Since:
- 2023.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilderthat allowsFeatureSaveErrorInfoinstances to be created. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()getFeatureError(long featureId) Retrieves theErrorInfoassociated with a specific feature.Returns the FeatureId's of the features that were involved in the save action failure.Returns thecauseof the failed save action, if not related to one or more specific features.static FeatureSaveErrorInfo.BuilderReturns a newFeatureSaveErrorInfobuilder.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
newBuilder
Returns a newFeatureSaveErrorInfobuilder.- Returns:
- a new
FeatureSaveErrorInfobuilder.
-
getGeneralError
Returns thecauseof the failed save action, if not related to one or more specific features.- Returns:
- the
causeof the failed save action, if not related to one or more specific features.
-
getFeatureError
Retrieves theErrorInfoassociated with a specific feature.- Parameters:
featureId- the id of the feature.- Returns:
- the
ErrorInfoassociated with a specific feature. - Throws:
IllegalArgumentException- when a featureId with no associatedErrorInfois used (that is, not in the list obtained fromgetFeatureIds).
-
getFeatureIds
Returns the FeatureId's of the features that were involved in the save action failure.This is an empty list if the error was not related to a specific feature.
If the save action fails because one or more features can't be added, updated or removed, this method returns a non-empty list containing the id's of the features involved in the save action failure.
Note that an
IFeatureModelmay abort after the first failure, with other failing feature changes possible being present.- Returns:
- the FeatureId's of the features that were involved in the save action failure.
-