com.metamatrix.jdbc.api
Class PartialResultsWarning

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by java.sql.SQLWarning
                  extended by com.metamatrix.jdbc.api.PartialResultsWarning
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<java.lang.Throwable>

public class PartialResultsWarning
extends java.sql.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
PartialResultsWarning()
          Construct partial results warning.
PartialResultsWarning(java.lang.String reason)
          Construct partial results warning.
PartialResultsWarning(java.lang.String reason, java.lang.String SQLstate)
          Construct partial results warning.
PartialResultsWarning(java.lang.String reason, java.lang.String SQLstate, int vendorCode)
          Construct partial results warning.
 
Method Summary
 void addConnectorFailure(java.lang.String name, java.sql.SQLException exception)
          Add a connector failure to the warning
 java.sql.SQLException getConnectorException(java.lang.String connectorName)
          Obtain failure for a particular connector.
 java.util.Collection getFailedConnectors()
          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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartialResultsWarning

public PartialResultsWarning(java.lang.String reason,
                             java.lang.String SQLstate,
                             int vendorCode)
Construct partial results warning.

Parameters:
reason - Reason for the exception
SQLstate - SQL state code
vendorCode - Vendor code

PartialResultsWarning

public PartialResultsWarning(java.lang.String reason,
                             java.lang.String SQLstate)
Construct partial results warning.

Parameters:
reason - Reason for the exception
SQLstate - SQL state code

PartialResultsWarning

public PartialResultsWarning(java.lang.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(java.lang.String name,
                                java.sql.SQLException exception)
Add a connector failure to the warning

Parameters:
name - Connector name
exception - Connector exception

getFailedConnectors

public java.util.Collection getFailedConnectors()
Obtain list of connectors that failed.

Returns:
List of connectors that failed - List contains String names

getConnectorException

public java.sql.SQLException getConnectorException(java.lang.String connectorName)
Obtain failure for a particular connector.

Parameters:
name - Connector name
Returns:
Exception that occurred for this connector or null if the exception was unknown


Copyright © 2009. All Rights Reserved.