Class MongoDbErrorCodes
java.lang.Object
org.springframework.data.mongodb.util.MongoDbErrorCodes
MongoDbErrorCodes
holds MongoDB specific error codes outlined in mongo/base/error_codes.err.- Since:
- 1.8
- Author:
- Christoph Strobl, Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getErrorDescription
(Integer errorCode) static boolean
isClientSessionFailureCode
(Integer errorCode) Check if the given error code matches a know session related error.static boolean
isDataAccessResourceFailureCode
(Integer errorCode) static boolean
isDataIntegrityViolationCode
(Integer errorCode) static boolean
isDuplicateKeyCode
(Integer errorCode) static boolean
isInvalidDataAccessApiUsageCode
(Integer errorCode) static boolean
isPermissionDeniedCode
(Integer errorCode) static boolean
isTransactionFailureCode
(Integer errorCode) Check if the given error code matches a know transaction related error.
-
Constructor Details
-
MongoDbErrorCodes
public MongoDbErrorCodes()
-
-
Method Details
-
isDataIntegrityViolationCode
-
isDataAccessResourceFailureCode
-
isDuplicateKeyCode
-
isPermissionDeniedCode
-
isInvalidDataAccessApiUsageCode
-
getErrorDescription
-
isClientSessionFailureCode
Check if the given error code matches a know session related error.- Parameters:
errorCode
- the error code to check.- Returns:
- true if error matches.
- Since:
- 2.1
-
isTransactionFailureCode
Check if the given error code matches a know transaction related error.- Parameters:
errorCode
- the error code to check.- Returns:
- true if error matches.
- Since:
- 2.1
-