/luni/src/main/java/java/sql/SQLRecoverableException.java

https://github.com/MIPS/libcore · Java · 142 lines · 31 code · 11 blank · 100 comment · 0 complexity · fc0483d6b4d5d741c7602107843889f0 MD5 · raw file

  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. package java.sql;
  18. public class SQLRecoverableException extends SQLException {
  19. private static final long serialVersionUID = -4144386502923131579L;
  20. /**
  21. * Creates an SQLRecoverableException object. The Reason string is set to
  22. * null, the SQLState string is set to null and the Error Code is set to 0.
  23. */
  24. public SQLRecoverableException() {
  25. super();
  26. }
  27. /**
  28. * Creates an SQLRecoverableException object. The Reason string is set to
  29. * the given reason string, the SQLState string is set to null and the Error
  30. * Code is set to 0.
  31. *
  32. * @param reason
  33. * the string to use as the Reason string
  34. */
  35. public SQLRecoverableException(String reason) {
  36. super(reason, null, 0);
  37. }
  38. /**
  39. * Creates an SQLRecoverableException object. The Reason string is set to
  40. * the given reason string, the SQLState string is set to the given SQLState
  41. * string and the Error Code is set to 0.
  42. *
  43. * @param reason
  44. * the string to use as the Reason string
  45. * @param sqlState
  46. * the string to use as the SQLState string
  47. */
  48. public SQLRecoverableException(String reason, String sqlState) {
  49. super(reason, sqlState, 0);
  50. }
  51. /**
  52. * Creates an SQLRecoverableException object. The Reason string is set to
  53. * the given reason string, the SQLState string is set to the given SQLState
  54. * string and the Error Code is set to the given error code value.
  55. *
  56. * @param reason
  57. * the string to use as the Reason string
  58. * @param sqlState
  59. * the string to use as the SQLState string
  60. * @param vendorCode
  61. * the integer value for the error code
  62. */
  63. public SQLRecoverableException(String reason, String sqlState,
  64. int vendorCode) {
  65. super(reason, sqlState, vendorCode);
  66. }
  67. /**
  68. * Creates an SQLRecoverableException object. The Reason string is set to
  69. * the null if cause == null or cause.toString() if cause!=null,and the
  70. * cause Throwable object is set to the given cause Throwable object.
  71. *
  72. * @param cause
  73. * the Throwable object for the underlying reason this
  74. * SQLException
  75. */
  76. public SQLRecoverableException(Throwable cause) {
  77. super(cause);
  78. }
  79. /**
  80. * Creates an SQLRecoverableException object. The Reason string is set to
  81. * the given and the cause Throwable object is set to the given cause
  82. * Throwable object.
  83. *
  84. * @param reason
  85. * the string to use as the Reason string
  86. * @param cause
  87. * the Throwable object for the underlying reason this
  88. * SQLException
  89. */
  90. public SQLRecoverableException(String reason, Throwable cause) {
  91. super(reason, cause);
  92. }
  93. /**
  94. * Creates an SQLRecoverableException object. The Reason string is set to
  95. * the given reason string, the SQLState string is set to the given SQLState
  96. * string and the cause Throwable object is set to the given cause Throwable
  97. * object.
  98. *
  99. * @param reason
  100. * the string to use as the Reason string
  101. * @param sqlState
  102. * the string to use as the SQLState string
  103. * @param cause
  104. * the Throwable object for the underlying reason this
  105. * SQLException
  106. */
  107. public SQLRecoverableException(String reason, String sqlState,
  108. Throwable cause) {
  109. super(reason, sqlState, cause);
  110. }
  111. /**
  112. * Creates an SQLRecoverableException object. The Reason string is set to
  113. * the given reason string, the SQLState string is set to the given SQLState
  114. * string , the Error Code is set to the given error code value, and the
  115. * cause Throwable object is set to the given cause Throwable object.
  116. *
  117. * @param reason
  118. * the string to use as the Reason string
  119. * @param sqlState
  120. * the string to use as the SQLState string
  121. * @param vendorCode
  122. * the integer value for the error code
  123. * @param cause
  124. * the Throwable object for the underlying reason this
  125. * SQLException
  126. */
  127. public SQLRecoverableException(String reason, String sqlState,
  128. int vendorCode, Throwable cause) {
  129. super(reason, sqlState, vendorCode, cause);
  130. }
  131. }