/projects/derby-10.9.1.0/db-derby-10.9.1.0-src/java/stubs/jdbc3/java/sql/Array.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus · Java · 133 lines · 17 code · 14 blank · 102 comment · 0 complexity · 97084e4d4361e88efcebc488cfc33f38 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. import java.util.Map;
  19. /**
  20. * A Java representation of the SQL ARRAY type.
  21. */
  22. public interface Array {
  23. /**
  24. * Retrieves the contents of the SQL ARRAY value as a Java array object.
  25. *
  26. * @return A Java array containing the elements of this Array
  27. * @throws SQLException
  28. */
  29. public Object getArray() throws SQLException;
  30. /**
  31. * Returns part of the SQL ARRAY associated with this Array, starting at a
  32. * particular index and comprising up to count successive elements of the
  33. * SQL array.
  34. *
  35. * @param index
  36. * @param count
  37. * @return A Java array containing the subportion of elements of this Array
  38. * @throws SQLException
  39. */
  40. public Object getArray(long index, int count) throws SQLException;
  41. /**
  42. * Returns part of the SQL ARRAY associated with this Array, starting at a
  43. * particular index and comprising up to count successive elements of the
  44. * SQL array.
  45. *
  46. * @param index
  47. * @param count
  48. * @param map
  49. * @return A Java array containing the subportion of elements of this Array
  50. * @throws SQLException
  51. */
  52. public Object getArray(long index, int count, Map map)
  53. throws SQLException;
  54. /**
  55. * Returns the SQL ARRAY associated with this Array.
  56. *
  57. * @param map
  58. * @return A Java array containing the elements of this Array
  59. * @throws SQLException
  60. */
  61. public Object getArray(Map map) throws SQLException;
  62. /**
  63. * Returns the JDBC type of the entries in this Array's associated array.
  64. *
  65. * @return An integer constant from the java.sql.Types class
  66. * @throws SQLException
  67. */
  68. public int getBaseType() throws SQLException;
  69. /**
  70. * Returns the SQL type name of the entries in the array associated with
  71. * this Array.
  72. *
  73. * @return The database specific name or a fully-qualified SQL type name.
  74. * @throws SQLException
  75. */
  76. public String getBaseTypeName() throws SQLException;
  77. /**
  78. * Returns a ResultSet object which holds the entries of the SQL ARRAY
  79. * associated with this Array.
  80. *
  81. * @return the ResultSet
  82. * @throws SQLException
  83. */
  84. public ResultSet getResultSet() throws SQLException;
  85. /**
  86. * Returns a ResultSet object that holds the entries of a subarray,
  87. * beginning at a particular index and comprising up to count successive
  88. * entries.
  89. *
  90. * @param index
  91. * @param count
  92. * @return the ResultSet
  93. * @throws SQLException
  94. */
  95. public ResultSet getResultSet(long index, int count) throws SQLException;
  96. /**
  97. * Returns a ResultSet object that holds the entries of a subarray,
  98. * beginning at a particular index and comprising up to count successive
  99. * entries.
  100. *
  101. * @param index
  102. * @param count
  103. * @param map
  104. * @return the ResultSet
  105. * @throws SQLException
  106. */
  107. public ResultSet getResultSet(long index, int count,
  108. Map map) throws SQLException;
  109. /**
  110. * Returns a ResultSet object which holds the entries of the SQL ARRAY
  111. * associated with this Array.
  112. *
  113. * @param map
  114. * @return the ResultSet
  115. * @throws SQLException
  116. */
  117. public ResultSet getResultSet(Map map)
  118. throws SQLException;
  119. }