提交 ffe3a8bf 编写于 作者: L lancea

6861385: Updated SQLException subclasses to clarify that they may be thrown...

6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions
Reviewed-by: alanb
上级 357450ce
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,10 +26,13 @@
package java.sql;
/**
* The subclass of {@link SQLException} thrown when the SQLState class value is '<i>22</i>'. This indicates
* various data errors, including but not limited to not-allowed conversion, division by 0
* and invalid arguments to functions.
*
* The subclass of {@link SQLException} thrown when the SQLState class value
* is '<i>22</i>', or under vendor-specified conditions. This indicates
* various data errors, including but not limited to data conversion errors,
* division by 0, and invalid arguments to functions.
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
public class SQLDataException extends SQLNonTransientException {
......
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,9 +26,13 @@
package java.sql;
/**
* The subclass of {@link SQLException} thrown when the SQLState class value is '<i>23</i>'. This indicates that an integrity
* The subclass of {@link SQLException} thrown when the SQLState class value
* is '<i>23</i>', or under vendor-specified conditions.
* This indicates that an integrity
* constraint (foreign key, primary key or unique key) has been violated.
*
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
public class SQLIntegrityConstraintViolationException extends SQLNonTransientException {
......
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,9 +26,13 @@
package java.sql;
/**
* The subclass of {@link SQLException} thrown when the SQLState class value is '<i>28</i>'. This indicated that the
* authorization credentials presented during connection establishment are not valid.
*
* The subclass of {@link SQLException} thrown when the SQLState class value
* is '<i>28</i>', or under vendor-specified conditions. This indicates that
* the authorization credentials presented during connection establishment
* are not valid.
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
public class SQLInvalidAuthorizationSpecException extends SQLNonTransientException {
......
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,11 +26,13 @@
package java.sql;
/**
* <P> The subclass of {@link SQLException} thrown for the SQLState
* class value '<i>08</i>', representing
* that the connection operation that failed will not succeed when
* The subclass of {@link SQLException} thrown for the SQLState
* class value '<i>08</i>', or under vendor-specified conditions. This
* indicates that the connection operation that failed will not succeed if
* the operation is retried without the cause of the failure being corrected.
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
public class SQLNonTransientConnectionException extends java.sql.SQLNonTransientException {
......
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,9 +26,12 @@
package java.sql;
/**
* The subclass of {@link SQLException} thrown when the SQLState class value is '<i>42</i>'. This indicates that the
* The subclass of {@link SQLException} thrown when the SQLState class value
* is '<i>42</i>', or under vendor-specified conditions. This indicates that the
* in-progress query has violated SQL syntax rules.
*
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
public class SQLSyntaxErrorException extends SQLNonTransientException {
......
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,10 +26,13 @@
package java.sql;
/**
* The subclass of {@link SQLException} thrown when the SQLState class value is '<i>40</i>'. This indicates that the
* current statement was automatically rolled back by the database becuase of deadlock or other
* transaction serialization failures.
*
* The subclass of {@link SQLException} thrown when the SQLState class value
* is '<i>40</i>', or under vendor-specified conditions. This indicates that the
* current statement was automatically rolled back by the database because
* of deadlock or other transaction serialization failures.
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
public class SQLTransactionRollbackException extends SQLTransientException {
......
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,11 +27,12 @@ package java.sql;
/**
* The subclass of {@link SQLException} for the SQLState class
* value '<i>08</i>', representing
* that the connection operation that failed might be able to succeed when
* value '<i>08</i>', or under vendor-specified conditions. This indicates
* that the connection operation that failed might be able to succeed if
* the operation is retried without any application-level changes.
*<p>
*
* <p>
* Please consult your driver vendor documentation for the vendor-specified
* conditions for which this <code>Exception</code> may be thrown.
* @since 1.6
*/
public class SQLTransientConnectionException extends java.sql.SQLTransientException {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册