|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.spi.ExceptionTransformer
public class ExceptionTransformer
Supports transforming arbitrary exceptions into appropriate repository exceptions. Repositories will likely extend this class, providing custom transformation rules.
| Constructor Summary | |
|---|---|
ExceptionTransformer()
|
|
| Method Summary | |
|---|---|
static ExceptionTransformer |
getInstance()
Returns a generic instance. |
FetchException |
toFetchException(Throwable e)
Transforms the given throwable into an appropriate fetch exception. |
PersistException |
toPersistException(Throwable e)
Transforms the given throwable into an appropriate persist exception. |
RepositoryException |
toRepositoryException(Throwable e)
Transforms the given throwable into an appropriate repository exception. |
protected FetchException |
transformIntoFetchException(Throwable e)
Override to support custom transformations, returning null if none is applicable. |
protected PersistException |
transformIntoPersistException(Throwable e)
Override to support custom transformations, returning null if none is applicable. |
protected RepositoryException |
transformIntoRepositoryException(Throwable e)
Override to support custom transformations, returning null if none is applicable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExceptionTransformer()
| Method Detail |
|---|
public static ExceptionTransformer getInstance()
public FetchException toFetchException(Throwable e)
e - required exception to transform
public PersistException toPersistException(Throwable e)
e - required exception to transform
public RepositoryException toRepositoryException(Throwable e)
e - required exception to transform
protected FetchException transformIntoFetchException(Throwable e)
e - required exception to transform
protected PersistException transformIntoPersistException(Throwable e)
e - required exception to transform
protected RepositoryException transformIntoRepositoryException(Throwable e)
e - required exception to transform
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||