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
Modifier and TypeClassDescriptionstatic final class
Builder
that allowsFeatureSaveErrorInfo
instances to be created. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
getFeatureError
(long featureId) Retrieves theErrorInfo
associated with a specific feature.Returns the FeatureId's of the features that were involved in the save action failure.Returns thecause
of the failed save action, if not related to one or more specific features.static FeatureSaveErrorInfo.Builder
Returns a newFeatureSaveErrorInfo
builder.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
newBuilder
Returns a newFeatureSaveErrorInfo
builder.- Returns:
- a new
FeatureSaveErrorInfo
builder.
-
getGeneralError
Returns thecause
of the failed save action, if not related to one or more specific features.- Returns:
- the
cause
of the failed save action, if not related to one or more specific features.
-
getFeatureError
Retrieves theErrorInfo
associated with a specific feature.- Returns:
- the
ErrorInfo
associated with a specific feature. - Throws:
IllegalArgumentException
- when a featureId with no associatedErrorInfo
is 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
IFeatureModel
may 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.
-