org.apache.ibatis.executor
Class BatchExecutorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.ibatis.exceptions.IbatisException
                  extended by org.apache.ibatis.exceptions.PersistenceException
                      extended by org.apache.ibatis.executor.ExecutorException
                          extended by org.apache.ibatis.executor.BatchExecutorException
All Implemented Interfaces:
java.io.Serializable

public class BatchExecutorException
extends ExecutorException

See Also:
Serialized Form

Constructor Summary
BatchExecutorException(java.lang.String message, java.sql.BatchUpdateException cause, java.util.List successfulBatchResults, BatchResult batchResult)
           
 
Method Summary
 java.sql.BatchUpdateException getBatchUpdateException()
          Returns the BatchUpdateException that caused the nested executor to fail.
 java.lang.String getFailingSqlStatement()
          Returns the SQL statement that caused the failure (not the parameterArray)
 java.lang.String getFailingStatementId()
          Returns the statement id of the statement that caused the failure
 java.util.List getSuccessfulBatchResults()
          Returns a list of BatchResult objects.
 
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

BatchExecutorException

public BatchExecutorException(java.lang.String message,
                              java.sql.BatchUpdateException cause,
                              java.util.List successfulBatchResults,
                              BatchResult batchResult)
Method Detail

getBatchUpdateException

public java.sql.BatchUpdateException getBatchUpdateException()
Returns the BatchUpdateException that caused the nested executor to fail. That exception contains an array of row counts that can be used to determine exactly which statemtn of the executor caused the failure (or failures).

Returns:
the root BatchUpdateException

getSuccessfulBatchResults

public java.util.List getSuccessfulBatchResults()
Returns a list of BatchResult objects. There will be one entry in the list for each successful sub-executor executed before the failing executor.

Returns:
the previously successful executor results (may be an empty list if no executor has executed successfully)

getFailingSqlStatement

public java.lang.String getFailingSqlStatement()
Returns the SQL statement that caused the failure (not the parameterArray)

Returns:
the failing SQL string

getFailingStatementId

public java.lang.String getFailingStatementId()
Returns the statement id of the statement that caused the failure

Returns:
the statement id


Copyright © 2010. All Rights Reserved.