Spring Data MongoDB - Core

org.springframework.data.mongodb.core
Class MongoDataIntegrityViolationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.dao.DataAccessException
                      extended by org.springframework.dao.NonTransientDataAccessException
                          extended by org.springframework.dao.DataIntegrityViolationException
                              extended by org.springframework.data.mongodb.core.MongoDataIntegrityViolationException
All Implemented Interfaces:
Serializable

public class MongoDataIntegrityViolationException
extends DataIntegrityViolationException

Mongo-specific DataIntegrityViolationException.

Author:
Oliver Gierke
See Also:
Serialized Form

Constructor Summary
MongoDataIntegrityViolationException(String message, com.mongodb.WriteResult writeResult, MongoActionOperation actionOperation)
          Creates a new MongoDataIntegrityViolationException using the given message and WriteResult.
 
Method Summary
 MongoActionOperation getActionOperation()
          Returns the MongoActionOperation in which the current exception occured.
 com.mongodb.WriteResult getWriteResult()
          Returns the WriteResult that caused the exception.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MongoDataIntegrityViolationException

public MongoDataIntegrityViolationException(String message,
                                            com.mongodb.WriteResult writeResult,
                                            MongoActionOperation actionOperation)
Creates a new MongoDataIntegrityViolationException using the given message and WriteResult.

Parameters:
message - the exception message
writeResult - the WriteResult that causes the exception, must not be null.
actionOperation - the MongoActionOperation that caused the exception, must not be null.
Method Detail

getWriteResult

public com.mongodb.WriteResult getWriteResult()
Returns the WriteResult that caused the exception.

Returns:
the writeResult

getActionOperation

public MongoActionOperation getActionOperation()
Returns the MongoActionOperation in which the current exception occured.

Returns:
the actionOperation

Spring Data MongoDB - Core

Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.