Package java.sql
Interface Struct
-
public interface StructAn interface which provides facilities for manipulating an SQL structured type as a Java object. TheStructobject has a value for each attribute of the SQL structured type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object[]getAttributes()Gets the values of the attributes of this SQL structured type.Object[]getAttributes(Map<String,Class<?>> theMap)Gets the values of the attributes of this SQL structured type.StringgetSQLTypeName()Gets the SQL Type name of the SQL structured type that thisStructrepresents.
-
-
-
Method Detail
-
getSQLTypeName
String getSQLTypeName() throws SQLException
Gets the SQL Type name of the SQL structured type that thisStructrepresents.- Returns:
- the fully qualified name of SQL structured type.
- Throws:
SQLException- if a database error occurs.
-
getAttributes
Object[] getAttributes() throws SQLException
Gets the values of the attributes of this SQL structured type. This method uses the type map associated with theConnectionfor customized type mappings. Where there is no entry in the type mapping which matches this structured type, the JDBC driver uses the standard mapping.- Returns:
- an
Objectarray containing the ordered attributes. - Throws:
SQLException- if a database error occurs.
-
getAttributes
Object[] getAttributes(Map<String,Class<?>> theMap) throws SQLException
Gets the values of the attributes of this SQL structured type. This method uses the supplied type mapping to determine how to map SQL types to their corresponding Java objects. In the case where there is no entry in the type mapping which matches this structured type, the JDBC driver uses the default mapping. TheConnectiontype map is never utilized by this method.- Parameters:
theMap- a Map describing how SQL Type names are mapped to classes.- Returns:
- an Object array containing the ordered attributes,.
- Throws:
SQLException- if a database error occurs.
-
-