/luni/src/main/java/java/sql/SQLTransientException.java

https://github.com/mkedwards/platform__libcore · Java · 140 lines · 29 code · 11 blank · 100 comment · 0 complexity · 5dc521edf7deed349cff7a5b1acb0c89 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 SQLTransientException extends SQLException {
  19. private static final long serialVersionUID = -9042733978262274539L;
  20. /**
  21. * Creates an SQLTransientException 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 SQLTransientException() {
  25. super();
  26. }
  27. /**
  28. * Creates an SQLTransientException object. The Reason string is set to the
  29. * 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 SQLTransientException(String reason) {
  36. super(reason, null, 0);
  37. }
  38. /**
  39. * Creates an SQLTransientException object. The Reason string is set to the
  40. * 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 SQLTransientException(String reason, String sqlState) {
  49. super(reason, sqlState, 0);
  50. }
  51. /**
  52. * Creates an SQLTransientException object. The Reason string is set to the
  53. * 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 SQLTransientException(String reason, String sqlState, int vendorCode) {
  64. super(reason, sqlState, vendorCode);
  65. }
  66. /**
  67. * Creates an SQLTransientException object. The Reason string is set to the
  68. * null if cause == null or cause.toString() if cause!=null,and the cause
  69. * Throwable object is set to the given cause Throwable object.
  70. *
  71. * @param cause
  72. * the Throwable object for the underlying reason this
  73. * SQLException
  74. */
  75. public SQLTransientException(Throwable cause) {
  76. super(cause);
  77. }
  78. /**
  79. * Creates an SQLTransientException object. The Reason string is set to the
  80. * given and the cause Throwable object is set to the given cause Throwable
  81. * object.
  82. *
  83. * @param reason
  84. * the string to use as the Reason string
  85. * @param cause
  86. * the Throwable object for the underlying reason this
  87. * SQLException
  88. */
  89. public SQLTransientException(String reason, Throwable cause) {
  90. super(reason, cause);
  91. }
  92. /**
  93. * Creates an SQLTransientException object. The Reason string is set to the
  94. * given reason string, the SQLState string is set to the given SQLState
  95. * string and the cause Throwable object is set to the given cause Throwable
  96. * object.
  97. *
  98. * @param reason
  99. * the string to use as the Reason string
  100. * @param sqlState
  101. * the string to use as the SQLState string
  102. * @param cause
  103. * the Throwable object for the underlying reason this
  104. * SQLException
  105. */
  106. public SQLTransientException(String reason, String sqlState, Throwable cause) {
  107. super(reason, sqlState, cause);
  108. }
  109. /**
  110. * Creates an SQLTransientException object. The Reason string is set to the
  111. * given reason string, the SQLState string is set to the given SQLState
  112. * string , the Error Code is set to the given error code value, and the
  113. * cause Throwable object is set to the given cause Throwable object.
  114. *
  115. * @param reason
  116. * the string to use as the Reason string
  117. * @param sqlState
  118. * the string to use as the SQLState string
  119. * @param vendorCode
  120. * the integer value for the error code
  121. * @param cause
  122. * the Throwable object for the underlying reason this
  123. * SQLException
  124. */
  125. public SQLTransientException(String reason, String sqlState,
  126. int vendorCode, Throwable cause) {
  127. super(reason, sqlState, vendorCode, cause);
  128. }
  129. }