public class TeiidSQLWarning extends SQLWarning
//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();
}
Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
String |
getModelName() |
String |
getSourceName() |
getNextWarning, setNextWarning
getErrorCode, getNextException, getSQLState, iterator, setNextException
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
Copyright © 2016 JBoss by Red Hat. All rights reserved.