Spring Data Couchbase

org.springframework.data.couchbase.core
Class CouchbaseExceptionTranslator

java.lang.Object
  extended by org.springframework.data.couchbase.core.CouchbaseExceptionTranslator
All Implemented Interfaces:
PersistenceExceptionTranslator

public class CouchbaseExceptionTranslator
extends Object
implements PersistenceExceptionTranslator

Simple PersistenceExceptionTranslator for Couchbase.

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:
Michael Nitschinger

Constructor Summary
CouchbaseExceptionTranslator()
           
 
Method Summary
 DataAccessException translateExceptionIfPossible(RuntimeException ex)
          Translate Couchbase specific exceptions to spring exceptions if possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CouchbaseExceptionTranslator

public CouchbaseExceptionTranslator()
Method Detail

translateExceptionIfPossible

public final DataAccessException translateExceptionIfPossible(RuntimeException ex)
Translate Couchbase specific exceptions to spring exceptions if possible.

Specified by:
translateExceptionIfPossible in interface PersistenceExceptionTranslator
Parameters:
ex - the exception to translate.
Returns:
the translated exception or null.

Spring Data Couchbase

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.