/android/upstream/java/sql/SQLTimeoutException.java

https://bitbucket.org/festevezga/xobotos · Java · 139 lines · 28 code · 11 blank · 100 comment · 0 complexity · c0df8d29a7c4abfb21c1009bb058373e 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 SQLTimeoutException extends SQLTransientException {
  19. private static final long serialVersionUID = -4487171280562520262L;
  20. /**
  21. * Creates an SQLTimeoutException object. The Reason string is set to null,
  22. * the SQLState string is set to null and the Error Code is set to 0.
  23. */
  24. public SQLTimeoutException() {
  25. }
  26. /**
  27. * Creates an SQLTimeoutException object. The Reason string is set to the
  28. * given reason string, the SQLState string is set to null and the Error
  29. * Code is set to 0.
  30. *
  31. * @param reason
  32. * the string to use as the Reason string
  33. */
  34. public SQLTimeoutException(String reason) {
  35. super(reason, null, 0);
  36. }
  37. /**
  38. * Creates an SQLTimeoutException object. The Reason string is set to the
  39. * given reason string, the SQLState string is set to the given SQLState
  40. * string and the Error Code is set to 0.
  41. *
  42. * @param reason
  43. * the string to use as the Reason string
  44. * @param sqlState
  45. * the string to use as the SQLState string
  46. */
  47. public SQLTimeoutException(String reason, String sqlState) {
  48. super(reason, sqlState, 0);
  49. }
  50. /**
  51. * Creates an SQLTimeoutException object. The Reason string is set to the
  52. * given reason string, the SQLState string is set to the given SQLState
  53. * string and the Error Code is set to the given error code value.
  54. *
  55. * @param reason
  56. * the string to use as the Reason string
  57. * @param sqlState
  58. * the string to use as the SQLState string
  59. * @param vendorCode
  60. * the integer value for the error code
  61. */
  62. public SQLTimeoutException(String reason, String sqlState, int vendorCode) {
  63. super(reason, sqlState, vendorCode);
  64. }
  65. /**
  66. * Creates an SQLTimeoutException object. The Reason string is set to the
  67. * null if cause == null or cause.toString() if cause!=null,and the cause
  68. * Throwable object is set to the given cause Throwable object.
  69. *
  70. * @param cause
  71. * the Throwable object for the underlying reason this
  72. * SQLException
  73. */
  74. public SQLTimeoutException(Throwable cause) {
  75. super(cause);
  76. }
  77. /**
  78. * Creates an SQLTimeoutException object. The Reason string is set to the
  79. * given and the cause Throwable object is set to the given cause Throwable
  80. * object.
  81. *
  82. * @param reason
  83. * the string to use as the Reason string
  84. * @param cause
  85. * the Throwable object for the underlying reason this
  86. * SQLException
  87. */
  88. public SQLTimeoutException(String reason, Throwable cause) {
  89. super(reason, cause);
  90. }
  91. /**
  92. * Creates an SQLTimeoutException object. The Reason string is set to the
  93. * given reason string, the SQLState string is set to the given SQLState
  94. * string and the cause Throwable object is set to the given cause Throwable
  95. * object.
  96. *
  97. * @param reason
  98. * the string to use as the Reason string
  99. * @param sqlState
  100. * the string to use as the SQLState string
  101. * @param cause
  102. * the Throwable object for the underlying reason this
  103. * SQLException
  104. */
  105. public SQLTimeoutException(String reason, String sqlState, Throwable cause) {
  106. super(reason, sqlState, cause);
  107. }
  108. /**
  109. * Creates an SQLTimeoutException object. The Reason string is set to the
  110. * given reason string, the SQLState string is set to the given SQLState
  111. * string , the Error Code is set to the given error code value, and the
  112. * cause Throwable object is set to the given cause Throwable object.
  113. *
  114. * @param reason
  115. * the string to use as the Reason string
  116. * @param sqlState
  117. * the string to use as the SQLState string
  118. * @param vendorCode
  119. * the integer value for the error code
  120. * @param cause
  121. * the Throwable object for the underlying reason this
  122. * SQLException
  123. */
  124. public SQLTimeoutException(String reason, String sqlState, int vendorCode,
  125. Throwable cause) {
  126. super(reason, sqlState, vendorCode, cause);
  127. }
  128. }