Java Doc for BatchUpdateException.java in  » Apache-Harmony-Java-SE » java-package » java » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         java.sql.SQLException
            java.sql.BatchUpdateException

BatchUpdateException
public class BatchUpdateException extends SQLException implements Serializable(Code)
An exception thrown if a problem occurs during a batch update operation.

A BatchUpdateException provides additional information about the problem that occurred, compared with a standard SQLException. It supplies update counts for successful commands that executed within the batch update, but before the exception was encountered.

The element order in the array of update counts matches the order that the commands were added to the batch operation.

Once a batch update command fails and a BatchUpdateException is thrown, the JDBC driver may continue processing the remaining commands in the batch. If the driver does process more commands after the problem occurs, the array returned by BatchUpdateException.getUpdateCounts has an element for every command in the batch, not only those that executed successfully. In this case, the array element for any command which encountered a problem is set to Statement.EXECUTE_FAILED.




Constructor Summary
public  BatchUpdateException()
     Creates a BatchUpdateException with the Reason, SQLState, and Update Counts set to null and a Vendor Code of 0.
public  BatchUpdateException(int[] updateCounts)
     Creates a BatchUpdateException with the Update Counts set to the supplied value and the Reason, SQLState set to null and a Vendor Code of 0.
public  BatchUpdateException(String reason, int[] updateCounts)
     Creates a BatchUpdateException with the Update Counts set to the supplied value, the Reason set to the supplied value and SQLState set to null and a Vendor Code of 0.
public  BatchUpdateException(String reason, String SQLState, int[] updateCounts)
     Creates a BatchUpdateException with the Update Counts set to the supplied value, the Reason set to the supplied value, the SQLState initialized to the supplied value and the Vendor Code initialized to 0.
public  BatchUpdateException(String reason, String SQLState, int vendorCode, int[] updateCounts)
     Creates a BatchUpdateException with the Update Counts set to the supplied value, the Reason set to the supplied value, the SQLState initialized to the supplied value and the Vendor Code set to the supplied value.

Method Summary
public  int[]getUpdateCounts()
     Gets the Update Counts array.

If a batch update command fails and a BatchUpdateException is thrown, the JDBC driver may continue processing the remaining commands in the batch. If the driver does process more commands after the problem occurs, the array returned by BatchUpdateException.getUpdateCounts has an element for every command in the batch, not only those that executed successfully.



Constructor Detail
BatchUpdateException
public BatchUpdateException()(Code)
Creates a BatchUpdateException with the Reason, SQLState, and Update Counts set to null and a Vendor Code of 0.



BatchUpdateException
public BatchUpdateException(int[] updateCounts)(Code)
Creates a BatchUpdateException with the Update Counts set to the supplied value and the Reason, SQLState set to null and a Vendor Code of 0.
Parameters:
  updateCounts - the array of Update Counts to use in initialization



BatchUpdateException
public BatchUpdateException(String reason, int[] updateCounts)(Code)
Creates a BatchUpdateException with the Update Counts set to the supplied value, the Reason set to the supplied value and SQLState set to null and a Vendor Code of 0.
Parameters:
  reason - the initialization value for Reason
Parameters:
  updateCounts - the array of Update Counts to set



BatchUpdateException
public BatchUpdateException(String reason, String SQLState, int[] updateCounts)(Code)
Creates a BatchUpdateException with the Update Counts set to the supplied value, the Reason set to the supplied value, the SQLState initialized to the supplied value and the Vendor Code initialized to 0.
Parameters:
  reason - the value to use for the Reason
Parameters:
  SQLState - the X/OPEN value to use for the SQLState
Parameters:
  updateCounts - the array of Update Counts to set



BatchUpdateException
public BatchUpdateException(String reason, String SQLState, int vendorCode, int[] updateCounts)(Code)
Creates a BatchUpdateException with the Update Counts set to the supplied value, the Reason set to the supplied value, the SQLState initialized to the supplied value and the Vendor Code set to the supplied value.
Parameters:
  reason - the value to use for the Reason
Parameters:
  SQLState - the X/OPEN value to use for the SQLState
Parameters:
  vendorCode - the value to use for the vendor error code
Parameters:
  updateCounts - the array of Update Counts to set




Method Detail
getUpdateCounts
public int[] getUpdateCounts()(Code)
Gets the Update Counts array.

If a batch update command fails and a BatchUpdateException is thrown, the JDBC driver may continue processing the remaining commands in the batch. If the driver does process more commands after the problem occurs, the array returned by BatchUpdateException.getUpdateCounts has an element for every command in the batch, not only those that executed successfully. In this case, the array element for any command which encountered a problem is set to Statement.EXECUTE_FAILED. an array that contains the successful update counts, before thisexception. Alternatively, if the driver continues to processcommands following an error, one of these listed items for everycommand the batch contains:

  1. an count of the updates
  2. Statement.SUCCESS_NO_INFO indicating that thecommand completed successfully, but the amount of altered rows isnot known.
  3. Statement.EXECUTE_FAILED indicating that thecommand was unsuccessful.



Methods inherited from java.sql.SQLException
public int getErrorCode()(Code)(Java Doc)
public SQLException getNextException()(Code)(Java Doc)
public String getSQLState()(Code)(Java Doc)
public void setNextException(SQLException ex)(Code)(Java Doc)


Methods inherited from java.lang.Throwable
public Throwable fillInStackTrace()(Code)(Java Doc)
public Throwable getCause()(Code)(Java Doc)
public String getLocalizedMessage()(Code)(Java Doc)
public String getMessage()(Code)(Java Doc)
public StackTraceElement[] getStackTrace()(Code)(Java Doc)
public Throwable initCause(Throwable initialCause)(Code)(Java Doc)
public void printStackTrace()(Code)(Java Doc)
public void printStackTrace(PrintStream ps)(Code)(Java Doc)
public void printStackTrace(PrintWriter pw)(Code)(Java Doc)
public void setStackTrace(StackTraceElement[] stackTrace)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.