Class ConcurrentModificationErrorBuilder
java.lang.Object
com.commercetools.api.models.error.ConcurrentModificationErrorBuilder
- All Implemented Interfaces:
Builder<ConcurrentModificationError>
public class ConcurrentModificationErrorBuilder
extends Object
implements Builder<ConcurrentModificationError>
ConcurrentModificationErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ConcurrentModificationError concurrentModificationError = ConcurrentModificationError.builder()
.message("{message}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds ConcurrentModificationError with checking for non-null required valuesbuilds ConcurrentModificationError without checking for non-null required valuescurrentVersion
(Long currentVersion) Current version of the resource.Current version of the resource."Object $resourceId has a different version than expected.
Error-specific additional fields."Object $resourceId has a different version than expected.
of()
factory method for an instance of ConcurrentModificationErrorBuilderof
(ConcurrentModificationError template) create builder for ConcurrentModificationError instanceError-specific additional fields.
-
Constructor Details
-
ConcurrentModificationErrorBuilder
public ConcurrentModificationErrorBuilder()
-
-
Method Details
-
message
"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."
- Parameters:
message
- value to be set- Returns:
- Builder
-
values
Error-specific additional fields.
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
Error-specific additional fields.
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
currentVersion
Current version of the resource.
- Parameters:
currentVersion
- value to be set- Returns:
- Builder
-
getMessage
"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getCurrentVersion
Current version of the resource.
- Returns:
- currentVersion
-
build
builds ConcurrentModificationError with checking for non-null required values- Specified by:
build
in interfaceBuilder<ConcurrentModificationError>
- Returns:
- ConcurrentModificationError
-
buildUnchecked
builds ConcurrentModificationError without checking for non-null required values- Returns:
- ConcurrentModificationError
-
of
factory method for an instance of ConcurrentModificationErrorBuilder- Returns:
- builder
-
of
create builder for ConcurrentModificationError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-