home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / sql / ArrayLocator.java next >
Encoding:
Java Source  |  1998-03-20  |  2.4 KB  |  83 lines

  1. /*
  2.  * @(#)ArrayLocator.java    1.3 98/03/18
  3.  *
  4.  * Copyright 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.sql;
  16.  
  17. /**
  18.  * JDBC 2.0
  19.  *
  20.  * <p>An ArrayLocator is a transaction duration reference to an array in the 
  21.  * DBMS server.
  22.  */
  23.  
  24. public interface ArrayLocator {
  25.  
  26.   /**
  27.   * Return the SQL type of elements of the array designated by 
  28. áá* this locator.
  29.   *
  30.   * @returns object representing SQL type of array element
  31.   */
  32.   SQLType getBaseType();
  33.  
  34.   /**
  35.   * Retrieve from the database the SQL Array 
  36. áá* designated by the locator.  
  37.   * Use the type-map associated with the connection 
  38. áá* for customizations of the type-mappings.
  39.   *
  40.   * @return an array containing the ordered elements of 
  41. áá* the SQL Array designated by the locator.
  42.   */
  43.   Object[] getArray();
  44.  
  45.   /**
  46.   * Retrieve from the database the SQL Array designated by 
  47.   * the locator. Use the given @map for type-map customizations.
  48.   *
  49.   * @param map contains mapping of SQL user-defined types to 
  50. áá* classes
  51.   * @return an array containing the ordered elements of 
  52. áá* the SQL Array 
  53.   * designated by the locator.
  54.   */
  55.   Object[] getArray(java.util.Map map);
  56.  
  57.   /**
  58.   * Materialize the item designated by the locator as a ResultSet
  59.   * that returns a "row" for each element of the array, in which
  60.   * the single "column" of that "row" contains that array element.
  61.   * The rows are ordered in ascending order of the array-element
  62.   * indexes.
  63.   *  
  64.   * @return a result set containing the elements of the array
  65.   */
  66.   ResultSet getResultSet ();
  67.  
  68.   /**
  69.   * Materialize the item designated by the locator as a ResultSet
  70.   * that returns a "row" for each element of the array, in which
  71.   * the single "column" of that "row" contains that array element.
  72.   * The rows are ordered in ascending order of the array-element
  73.   * indexes.
  74.   * Use the given @map for type-map customizations.
  75.   *
  76.   * @param map contains mapping of SQL user-defined types to 
  77. áá* classes
  78.   *  
  79.   * @return a result set containing the elements of the array
  80.   */
  81.   ResultSet getResultSet (java.util.Map map);
  82. }
  83.