Class ConcurrentModificationErrorImpl
java.lang.Object
com.commercetools.api.models.error.ConcurrentModificationErrorImpl
- All Implemented Interfaces:
ConcurrentModificationError
,ErrorObject
,io.vrap.rmf.base.client.ModelBase
public class ConcurrentModificationErrorImpl
extends Object
implements ConcurrentModificationError, io.vrap.rmf.base.client.ModelBase
Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved). The client application should resolve the conflict (with or without involving the end-user) before retrying the request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.error.ConcurrentModificationError
CONCURRENT_MODIFICATION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getCode()
Error identifier.Current version of the resource."Object $resourceId has a different version than expected.
int
hashCode()
void
setCurrentVersion
(Long currentVersion) Current version of the resource.void
setMessage
(String message) "Object $resourceId has a different version than expected.
void
Error-specific additional fields.values()
Error-specific additional fields.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.error.ConcurrentModificationError
withConcurrentModificationError
Methods inherited from interface com.commercetools.api.models.error.ErrorObject
withErrorObject
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
ConcurrentModificationErrorImpl
public ConcurrentModificationErrorImpl()create empty instance
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceConcurrentModificationError
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."
- Specified by:
getMessage
in interfaceConcurrentModificationError
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
values
Error-specific additional fields.
- Specified by:
values
in interfaceErrorObject
- Returns:
- map of the pattern property values
-
getCurrentVersion
Current version of the resource.
- Specified by:
getCurrentVersion
in interfaceConcurrentModificationError
- Returns:
- currentVersion
-
setMessage
Description copied from interface:ConcurrentModificationError
"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."
- Specified by:
setMessage
in interfaceConcurrentModificationError
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setValue
Description copied from interface:ErrorObject
Error-specific additional fields.
- Specified by:
setValue
in interfaceErrorObject
- Parameters:
key
- property namevalue
- property value
-
setCurrentVersion
Description copied from interface:ConcurrentModificationError
Current version of the resource.
- Specified by:
setCurrentVersion
in interfaceConcurrentModificationError
- Parameters:
currentVersion
- value to be set
-
equals
-
hashCode
-