Package org.teiid.jdbc
Class TeiidSQLWarning
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.sql.SQLException
-
- java.sql.SQLWarning
-
- org.teiid.jdbc.TeiidSQLWarning
-
- All Implemented Interfaces:
Serializable
,Iterable<Throwable>
public class TeiidSQLWarning extends SQLWarning
Teiid specific SQLWarning
If the cause was a source SQLWarning, then you may need to consult the warning chain to get all warnings, see the example below.//warning will be an instanceof TeiidSQLWarning to convey model/source information SQLWarning warning = stmt.getWarnings(); while (warning != null) { Exception e = warning.getCause(); if (cause instanceof SQLWarning) { //childWarning should now be the head of the source warning chain SQLWarning childWarning = (SQLWarning)cause; while (childWarning != null) { //do something with childWarning childWarning = childWarning.getNextWarning(); } } warning = warning.getNextWarning(); }
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TeiidSQLWarning()
TeiidSQLWarning(String reason)
TeiidSQLWarning(String reason, String state)
TeiidSQLWarning(String reason, String sqlState, int errorCode, Throwable ex)
TeiidSQLWarning(String reason, String sqlState, Throwable ex, String sourceName, String modelName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getModelName()
String
getSourceName()
-
Methods inherited from class java.sql.SQLWarning
getNextWarning, setNextWarning
-
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextException
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-