Module spring.data.mongodb
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
ConstructorsConstructorDescriptionMongoDataIntegrityViolationException(String message, com.mongodb.WriteConcernResult writeResult, MongoActionOperation actionOperation) Creates a newMongoDataIntegrityViolationExceptionusing the given message andWriteConcernResult. -
Method Summary
Modifier and TypeMethodDescriptionReturns theMongoActionOperationin which the current exception occurred.com.mongodb.WriteConcernResultReturns theWriteConcernResultthat caused the exception.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCauseMethods 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 newMongoDataIntegrityViolationExceptionusing the given message andWriteConcernResult.- Parameters:
message- the exception messagewriteResult- theWriteConcernResultthat causes the exception, must not be null.actionOperation- theMongoActionOperationthat caused the exception, must not be null.
-
-
Method Details
-
getWriteResult
public com.mongodb.WriteConcernResult getWriteResult()Returns theWriteConcernResultthat caused the exception.- Returns:
- the writeResult
-
getActionOperation
Returns theMongoActionOperationin which the current exception occurred.- Returns:
- the actionOperation
-