0N/A/*
2362N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.sql;
0N/A
0N/A/**
0N/A * <p>The standard mapping in the Java programming language for an SQL
0N/A * structured type. A <code>Struct</code> object contains a
0N/A * value for each attribute of the SQL structured type that
0N/A * it represents.
0N/A * By default, an instance of<code>Struct</code> is valid as long as the
0N/A * application has a reference to it.
0N/A * <p>
0N/A * All methods on the <code>Struct</code> interface must be fully implemented if the
0N/A * JDBC driver supports the data type.
0N/A * @since 1.2
0N/A */
0N/A
0N/Apublic interface Struct {
0N/A
0N/A /**
0N/A * Retrieves the SQL type name of the SQL structured type
0N/A * that this <code>Struct</code> object represents.
0N/A *
0N/A * @return the fully-qualified type name of the SQL structured
0N/A * type for which this <code>Struct</code> object
0N/A * is the generic representation
0N/A * @exception SQLException if a database access error occurs
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.2
0N/A */
0N/A String getSQLTypeName() throws SQLException;
0N/A
0N/A /**
0N/A * Produces the ordered values of the attributes of the SQL
0N/A * structured type that this <code>Struct</code> object represents.
0N/A * As individual attributes are processed, this method uses the type map
0N/A * associated with the
0N/A * connection for customizations of the type mappings.
0N/A * If there is no
0N/A * entry in the connection's type map that matches the structured
0N/A * type that an attribute represents,
0N/A * the driver uses the standard mapping.
0N/A * <p>
0N/A * Conceptually, this method calls the method
0N/A * <code>getObject</code> on each attribute
0N/A * of the structured type and returns a Java array containing
0N/A * the result.
0N/A *
0N/A * @return an array containing the ordered attribute values
0N/A * @exception SQLException if a database access error occurs
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.2
0N/A */
0N/A Object[] getAttributes() throws SQLException;
0N/A
0N/A /**
0N/A * Produces the ordered values of the attributes of the SQL
0N/A * structured type that this <code>Struct</code> object represents.
0N/A * As individual attrbutes are proccessed, this method uses the given type map
0N/A * for customizations of the type mappings.
0N/A * If there is no
0N/A * entry in the given type map that matches the structured
0N/A * type that an attribute represents,
0N/A * the driver uses the standard mapping. This method never
0N/A * uses the type map associated with the connection.
0N/A * <p>
0N/A * Conceptually, this method calls the method
0N/A * <code>getObject</code> on each attribute
0N/A * of the structured type and returns a Java array containing
0N/A * the result.
0N/A *
0N/A * @param map a mapping of SQL type names to Java classes
0N/A * @return an array containing the ordered attribute values
0N/A * @exception SQLException if a database access error occurs
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.2
0N/A */
0N/A Object[] getAttributes(java.util.Map<String,Class<?>> map)
0N/A throws SQLException;
0N/A}