Class 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 Detail

      • TeiidSQLWarning

        public TeiidSQLWarning()
      • TeiidSQLWarning

        public TeiidSQLWarning​(String reason)
      • TeiidSQLWarning

        public TeiidSQLWarning​(String reason,
                               String state)
      • TeiidSQLWarning

        public TeiidSQLWarning​(String reason,
                               String sqlState,
                               int errorCode,
                               Throwable ex)
    • Method Detail

      • getSourceName

        public String getSourceName()
        the source name or null if the warning is not associated with a source
      • getModelName

        public String getModelName()
        the model name or null if the warning is not associated with a model