/luni/src/main/java/java/sql/SQLTransactionRollbackException.java

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