Package oracle.sql

Class StructDescriptor

java.lang.Object
oracle.sql.TypeDescriptor
oracle.sql.StructDescriptor
All Implemented Interfaces:
Serializable, oracle.jdbc.diagnostics.Diagnosable, oracle.jdbc.diagnostics.PropertyChangeListener, oracle.jdbc.internal.ACProxyable, oracle.jdbc.internal.ObjectData, oracle.jdbc.internal.OracleTypeMetaData, oracle.jdbc.internal.OracleTypeMetaData.Struct, OracleData, OracleTypeMetaData, OracleTypeMetaData.Struct, ORAData

public class StructDescriptor extends TypeDescriptor implements oracle.jdbc.internal.OracleTypeMetaData.Struct, Serializable
Deprecated.
Use factory method Connection.createStruct to create an instance of java.sql.Struct directly.
Descriptor of a SQL structured object. (That is an SQL Object type). Its main responsibility is understanding how to convert between various representations of such a struct.

There should be a method to return information about the fields (beyond their number. But there is no public representation for that.

See Also:
  • Method Details

    • createDescriptor

      public static StructDescriptor createDescriptor(String name, Connection conn) throws SQLException
      Deprecated.
      Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.
      Parameters:
      name - a String naming the type. (Not necessarily fully qualified)
      conn - a Connection to a database
      Returns:
      the descriptor created.
      Throws:
      SQLException
    • createDescriptor

      public static StructDescriptor createDescriptor(String name, Connection conn, boolean recurse, boolean force) throws SQLException
      Deprecated.
      Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.
      Parameters:
      name - a String naming the type. (Not necessarily fully qualified)
      connection - a Connection to a database
      recurse - a boolean to specify whether to create descriptors for component objects
      force - a boolean to specify whether to replace any cached descriptor.
      Returns:
      the descriptor created.
      Throws:
      SQLException - if a database error occurs
    • createDescriptor

      public static StructDescriptor createDescriptor(oracle.sql.SQLName sqlName, Connection conn, boolean recurse, boolean force) throws SQLException
      Deprecated.
      Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.
      Parameters:
      name - a String naming the type. (Not necessarily fully qualified)
      connection - a Connection to a database
      recurse - a boolean to specify whether to create descriptors for component objects
      force - a boolean to specify whether to replace any cached descriptor.
      Returns:
      the descriptor created. Use connection.createStruct intead
      Throws:
      SQLException
    • createDescriptor

      public static StructDescriptor createDescriptor(oracle.sql.SQLName name, Connection conn) throws SQLException
      Deprecated.
      Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.
      Parameters:
      name - a String naming the type. (Not necessarily fully qualified)
      connection - a Connection to a database
      Returns:
      the descriptor created. Use connection.createStruct intead
      Throws:
      SQLException
    • getKind

      public OracleTypeMetaData.Kind getKind()
      Deprecated.
      Description copied from interface: OracleTypeMetaData
      Return the kind of type.
      Specified by:
      getKind in interface OracleTypeMetaData
      Overrides:
      getKind in class TypeDescriptor
      Returns:
      the kind, STRUCT
    • getTypeCode

      public int getTypeCode() throws SQLException
      Deprecated.
      Description copied from class: TypeDescriptor
      Returns type code.
      Specified by:
      getTypeCode in interface OracleTypeMetaData
      Overrides:
      getTypeCode in class TypeDescriptor
      Throws:
      SQLException
    • getTypeVersion

      public int getTypeVersion() throws SQLException
      Deprecated.
      Specified by:
      getTypeVersion in interface OracleTypeMetaData.Struct
      Throws:
      SQLException
    • getAttributesDescriptor

      public AttributeDescriptor[] getAttributesDescriptor()
      Deprecated.
    • getLength

      public int getLength() throws SQLException
      Deprecated.
      The number of fields in the Object Type.
      Specified by:
      getLength in interface OracleTypeMetaData.Struct
      Returns:
      the size.
      Throws:
      SQLException
    • toOracleArray

      public Datum[] toOracleArray(Map attributes) throws SQLException
      Deprecated.
      Throws:
      SQLException
    • getMetaData

      public ResultSetMetaData getMetaData() throws SQLException
      Deprecated.
      Gets the metadata regarding this type. The return ResultSetMetaData contains the attribute name, attribute type id and attribute type precision information. The column index in ResultSetMetaData maps to the position of the attribute in a Struct (with the first attribute being at index 1).
      Specified by:
      getMetaData in interface OracleTypeMetaData.Struct
      Returns:
      a ResultSetMetaData object that contains the type info
      Throws:
      SQLException
    • isFinalType

      public boolean isFinalType() throws SQLException
      Deprecated.
      Indicates whether the object type is a final type.
      Specified by:
      isFinalType in interface OracleTypeMetaData.Struct
      Returns:
      true if the object type is a final type and false otherwise.
      Throws:
      SQLException
      Since:
      8.2.0
    • isSubtype

      public boolean isSubtype() throws SQLException
      Deprecated.
      Indicates whether the object type is a subtype.
      Specified by:
      isSubtype in interface OracleTypeMetaData.Struct
      Returns:
      true if the object type is a subtype and false otherwise.
      Throws:
      SQLException
      Since:
      8.2.0
    • isInstantiable

      public boolean isInstantiable() throws SQLException
      Deprecated.
      Indicates whether the object type is instantiable.
      Specified by:
      isInstantiable in interface OracleTypeMetaData.Struct
      Returns:
      true if the object type is instantiable and false otherwise.
      Throws:
      SQLException
      Since:
      8.2.0
    • isJavaObject

      public boolean isJavaObject() throws SQLException
      Deprecated.
      Indicates whether the object type is a JAVA_STRUCT type or a STRUCT type.
      Returns:
      true if the object type is a JAVA_STRUCT type and false if the object type is a STRUCT type.
      Throws:
      SQLException
      Since:
      8.2.0
    • getSupertypeName

      public String getSupertypeName() throws SQLException
      Deprecated.
      Returns the SQL type name of the direct subtype.
      Specified by:
      getSupertypeName in interface OracleTypeMetaData.Struct
      Returns:
      the fully qualified name of the supertype. Returns null if the object type is not a subtype.
      Throws:
      SQLException
      Since:
      8.2.0
    • getLocalAttributeCount

      public int getLocalAttributeCount() throws SQLException
      Deprecated.
      Returns the number of attributes defined in the subtype.
      Specified by:
      getLocalAttributeCount in interface OracleTypeMetaData.Struct
      Returns:
      number of subtype attributes.
      Throws:
      SQLException
      Since:
      8.2.0
    • getSubtypeNames

      public String[] getSubtypeNames() throws SQLException
      Deprecated.
      Returns the SQL type names of the direct subtypes.
      Specified by:
      getSubtypeNames in interface OracleTypeMetaData.Struct
      Returns:
      the fully qualifed name of the direct subtypes. Returns an empty String array if there is no subtypes.
      Throws:
      SQLException
      Since:
      8.2.0
    • getJavaClassName

      public String getJavaClassName() throws SQLException
      Deprecated.
      Returns the external name of the JAVA_STRUCT type.
      Returns:
      the JAVA_STRUCT's Java type name. Returns null if the object type is not a JAVA_STRUCT type.
      Throws:
      SQLException
      Since:
      8.2.0
    • getLanguage

      public String getLanguage() throws SQLException
      Deprecated.
      Returns:
      JAVA if this is a JAVA_STRUCT, SQL otherwise
      Throws:
      SQLException
      Since:
      8.2.0
    • descType

      public String descType() throws SQLException
      Deprecated.
      Describe this type.
      Returns:
      the type information.
      Throws:
      SQLException