com.ibatis.sqlmap.engine.execution
Class BatchException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ibatis.sqlmap.engine.execution.BatchException
所有已实现接口:
java.io.Serializable

public class BatchException
extends java.lang.Exception

This exception is thrown if a java.sql.BatchUpdateException is caught during the execution of any nested batch. The exception contains the java.sql.BatchUpdateException that is the root cause, as well as the results from any prior nested batch that executed successfully. This exception is only thrown from the executeBatchDetailed method.

作者:
Jeff Butler
另请参见:
Serialized Form

构造器摘要
BatchException(java.lang.String message, java.sql.BatchUpdateException cause, java.util.List successfulBatchResults, java.lang.String failingStatementId, java.lang.String failingSqlStatement)
           
 
方法摘要
 java.sql.BatchUpdateException getBatchUpdateException()
          Returns the BatchUpdateException that caused the nested batch to fail.
 java.lang.String getFailingSqlStatement()
          Returns the SQL statement that caused the failure (not the parameters)
 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.
 
类方法继承: java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
类方法继承: java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造器详细信息

BatchException

public BatchException(java.lang.String message,
                      java.sql.BatchUpdateException cause,
                      java.util.List successfulBatchResults,
                      java.lang.String failingStatementId,
                      java.lang.String failingSqlStatement)
方法详细信息

getBatchUpdateException

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

返回:
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-batch executed before the failing batch.

返回:
the previously successful batch results (may be an empty list if no batch has executed successfully)

getFailingSqlStatement

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

返回:
the failing SQL string

getFailingStatementId

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

返回:
the statement id