Class MongoDataIntegrityViolationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.NonTransientDataAccessException
org.springframework.dao.DataIntegrityViolationException
org.springframework.data.mongodb.core.MongoDataIntegrityViolationException
- All Implemented Interfaces:
Serializable
Mongo-specific
DataIntegrityViolationException
.- Author:
- Oliver Gierke
- See Also:
-
Constructor Summary
ConstructorDescriptionMongoDataIntegrityViolationException
(String message, com.mongodb.WriteConcernResult writeResult, MongoActionOperation actionOperation) Creates a newMongoDataIntegrityViolationException
using the given message andWriteConcernResult
. -
Method Summary
Modifier and TypeMethodDescriptionReturns theMongoActionOperation
in which the current exception occurred.com.mongodb.WriteConcernResult
Returns theWriteConcernResult
that caused the exception.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MongoDataIntegrityViolationException
public MongoDataIntegrityViolationException(String message, com.mongodb.WriteConcernResult writeResult, MongoActionOperation actionOperation) Creates a newMongoDataIntegrityViolationException
using the given message andWriteConcernResult
.- Parameters:
message
- the exception messagewriteResult
- theWriteConcernResult
that causes the exception, must not be null.actionOperation
- theMongoActionOperation
that caused the exception, must not be null.
-
-
Method Details
-
getWriteResult
public com.mongodb.WriteConcernResult getWriteResult()Returns theWriteConcernResult
that caused the exception.- Returns:
- the writeResult
-
getActionOperation
Returns theMongoActionOperation
in which the current exception occurred.- Returns:
- the actionOperation
-