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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetErrorDescription(Integer errorCode) static booleanisClientSessionFailureCode(Integer errorCode) Check if the given error code matches a know session related error.static booleanisDataAccessResourceFailureCode(Integer errorCode) static booleanisDataIntegrityViolationCode(Integer errorCode) static booleanisDuplicateKeyCode(Integer errorCode) static booleanisInvalidDataAccessApiUsageCode(Integer errorCode) static booleanisPermissionDeniedCode(Integer errorCode) static booleanisTransactionFailureCode(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
-