org.springframework.data.document.mongodb
Class MongoExceptionTranslator

java.lang.Object
  extended by org.springframework.data.document.mongodb.MongoExceptionTranslator
All Implemented Interfaces:
org.springframework.dao.support.PersistenceExceptionTranslator

public class MongoExceptionTranslator
extends java.lang.Object
implements org.springframework.dao.support.PersistenceExceptionTranslator

Simple PersistenceExceptionTranslator for Mongo. Convert the given runtime exception to an appropriate exception from the org.springframework.dao hierarchy. Return null if no translation is appropriate: any other exception may have resulted from user code, and should not be translated.

Author:
Oliver Gierke

Constructor Summary
MongoExceptionTranslator()
           
 
Method Summary
 org.springframework.dao.DataAccessException translateExceptionIfPossible(java.lang.RuntimeException ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoExceptionTranslator

public MongoExceptionTranslator()
Method Detail

translateExceptionIfPossible

public org.springframework.dao.DataAccessException translateExceptionIfPossible(java.lang.RuntimeException ex)
Specified by:
translateExceptionIfPossible in interface org.springframework.dao.support.PersistenceExceptionTranslator


Copyright © 2011. All Rights Reserved.