Package org.teiid.jdbc
Class PartialResultsWarning
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.sql.SQLException
-
- java.sql.SQLWarning
-
- org.teiid.jdbc.PartialResultsWarning
-
- All Implemented Interfaces:
Serializable,Iterable<Throwable>
public class PartialResultsWarning extends SQLWarning
This warning class is sent when using partial results mode if one or more sources fails. In this case, results will be returned (with 0 rows sent from failing source). This warning can be obtained from the ResultSet to determine which sources failed and provided 0 rows and why they failed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PartialResultsWarning()Construct partial results warning.PartialResultsWarning(String reason)Construct partial results warning.PartialResultsWarning(String reason, String SQLstate)Construct partial results warning.PartialResultsWarning(String reason, String SQLstate, int vendorCode)Construct partial results warning.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConnectorFailure(String name, SQLException exception)Add a connector failure to the warningSQLExceptiongetConnectorException(String connectorName)Obtain failure for a particular connector.CollectiongetFailedConnectors()Obtain list of connectors that failed.-
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
-
-
-
-
Constructor Detail
-
PartialResultsWarning
public PartialResultsWarning(String reason, String SQLstate, int vendorCode)
Construct partial results warning.- Parameters:
reason- Reason for the exceptionSQLstate- SQL state codevendorCode- Vendor code
-
PartialResultsWarning
public PartialResultsWarning(String reason, String SQLstate)
Construct partial results warning.- Parameters:
reason- Reason for the exceptionSQLstate- SQL state code
-
PartialResultsWarning
public PartialResultsWarning(String reason)
Construct partial results warning.- Parameters:
reason- Reason for the exception
-
PartialResultsWarning
public PartialResultsWarning()
Construct partial results warning.
-
-
Method Detail
-
addConnectorFailure
public void addConnectorFailure(String name, SQLException exception)
Add a connector failure to the warning- Parameters:
name- Connector nameexception- Connector exception
-
getFailedConnectors
public Collection getFailedConnectors()
Obtain list of connectors that failed.- Returns:
- List of connectors that failed - List contains String names
-
getConnectorException
public SQLException getConnectorException(String connectorName)
Obtain failure for a particular connector.- Parameters:
connectorName- Connector name- Returns:
- Exception that occurred for this connector or null if the exception was unknown
-
-