/android/upstream/java/sql/SQLSyntaxErrorException.java

https://bitbucket.org/festevezga/xobotos · Java · 141 lines · 30 code · 11 blank · 100 comment · 0 complexity · 0ecac1f88bd1588fd4fe69e2a1f96228 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 SQLSyntaxErrorException extends SQLNonTransientException {
  19. private static final long serialVersionUID = -1843832610477496053L;
  20. /**
  21. * Creates an SQLSyntaxErrorException 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 SQLSyntaxErrorException() {
  25. }
  26. /**
  27. * Creates an SQLSyntaxErrorException object. The Reason string is set to
  28. * the 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 SQLSyntaxErrorException(String reason) {
  35. super(reason, null, 0);
  36. }
  37. /**
  38. * Creates an SQLSyntaxErrorException object. The Reason string is set to
  39. * the 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 SQLSyntaxErrorException(String reason, String sqlState) {
  48. super(reason, sqlState, 0);
  49. }
  50. /**
  51. * Creates an SQLSyntaxErrorException object. The Reason string is set to
  52. * the 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 SQLSyntaxErrorException(String reason, String sqlState,
  63. int vendorCode) {
  64. super(reason, sqlState, vendorCode);
  65. }
  66. /**
  67. * Creates an SQLSyntaxErrorException object. The Reason string is set to
  68. * the null if cause == null or cause.toString() if cause!=null,and the
  69. * cause 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 SQLSyntaxErrorException(Throwable cause) {
  76. super(cause);
  77. }
  78. /**
  79. * Creates an SQLSyntaxErrorException object. The Reason string is set to
  80. * the given and the cause Throwable object is set to the given cause
  81. * Throwable 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 SQLSyntaxErrorException(String reason, Throwable cause) {
  90. super(reason, cause);
  91. }
  92. /**
  93. * Creates an SQLSyntaxErrorException object. The Reason string is set to
  94. * the 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 SQLSyntaxErrorException(String reason, String sqlState,
  107. Throwable cause) {
  108. super(reason, sqlState, cause);
  109. }
  110. /**
  111. * Creates an SQLSyntaxErrorException object. The Reason string is set to
  112. * the given reason string, the SQLState string is set to the given SQLState
  113. * string , the Error Code is set to the given error code value, and the
  114. * cause Throwable object is set to the given cause Throwable object.
  115. *
  116. * @param reason
  117. * the string to use as the Reason string
  118. * @param sqlState
  119. * the string to use as the SQLState string
  120. * @param vendorCode
  121. * the integer value for the error code
  122. * @param cause
  123. * the Throwable object for the underlying reason this
  124. * SQLException
  125. */
  126. public SQLSyntaxErrorException(String reason, String sqlState,
  127. int vendorCode, Throwable cause) {
  128. super(reason, sqlState, vendorCode, cause);
  129. }
  130. }