Package org.firebirdsql.util
Class SQLExceptionChainBuilder<E extends java.sql.SQLException>
- java.lang.Object
- 
- org.firebirdsql.util.SQLExceptionChainBuilder<E>
 
- 
- Type Parameters:
- E- Type of SQLException (definition: E extends SQLException)
 
 public final class SQLExceptionChainBuilder<E extends java.sql.SQLException> extends java.lang.ObjectHelper class for buildingSQLExceptionchains.NOTE: This class is not thread-safe; an instance should only be used on a single thread or with proper external synchronisation. - Since:
- 2.2
- Author:
- Mark Rotteveel
 
- 
- 
Constructor SummaryConstructors Constructor Description SQLExceptionChainBuilder()Create SQLExceptionChainBuilderSQLExceptionChainBuilder(E root)Create SQLExceptionChainBuilder with the specified root exception.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLExceptionChainBuilder<E>append(E sqle)Appends the passed SQLException to the exception chain.EgetException()booleanhasException()
 
- 
- 
- 
Constructor Detail- 
SQLExceptionChainBuilderpublic SQLExceptionChainBuilder() Create SQLExceptionChainBuilder
 - 
SQLExceptionChainBuilderpublic SQLExceptionChainBuilder(E root) Create SQLExceptionChainBuilder with the specified root exception.- Parameters:
- root- Root SQLException
 
 
- 
 - 
Method Detail- 
appendpublic SQLExceptionChainBuilder<E> append(E sqle) Appends the passed SQLException to the exception chain.If this SQLExceptionChainBuilder does not have a root, sqlewill be come the root.- Parameters:
- sqle- SQLException to add to the chain.
- Returns:
- this SQLExceptionChainBuilder
 
 - 
hasExceptionpublic boolean hasException() - Returns:
- trueif this SQLExceptionChainBuilder contains at least one SQLException.
 
 - 
getExceptionpublic E getException() - Returns:
- The root SQLException or nullif no SQLException was added to this SQLExceptionChainBuilder
 
 
- 
 
-