Package oracle.sql

Class JAVA_STRUCT

All Implemented Interfaces:
Serializable, Struct, oracle.jdbc.internal.ACProxyable, oracle.jdbc.internal.OracleConcreteProxy, oracle.jdbc.internal.OracleDatumWithConnection, oracle.jdbc.internal.OracleStruct, OracleStruct

public class JAVA_STRUCT extends STRUCT
A class for structured data type.
See Also:
  • Constructor Details

    • JAVA_STRUCT

      public JAVA_STRUCT(StructDescriptor type, Connection conn, Object[] attributes) throws SQLException
      Constructor. The raw bytes are computed at this time or a copy of attributes is made. In any event the caller is free to modify the array without affecting the values held in the STRUCT.
      Parameters:
      type - the SQLStructType used to convert the type to
      attributes - the array specifying the attributes to be converted to raw bytes.
      Throws:
      SQLException
      See Also:
      • oracle.sql.SQLStructType
    • JAVA_STRUCT

      public JAVA_STRUCT(StructDescriptor type, byte[] elements, Connection conn) throws SQLException
      Constructor from the pickled bytes. (INTERNAL) Used by JDBC, not really intended for general use.
      Parameters:
      descriptor - an StructDescriptor describing the SQL Type
      bytes - the array containing the raw bytes
      Throws:
      SQLException
  • Method Details

    • toJdbc

      public Object toJdbc() throws SQLException
      Oracle extension. Returns the JDBC representation of the datum object
      Specified by:
      toJdbc in interface oracle.jdbc.internal.OracleDatumWithConnection
      Specified by:
      toJdbc in interface oracle.jdbc.internal.OracleStruct
      Overrides:
      toJdbc in class STRUCT
      Returns:
      an object containing the JDBC value
      Throws:
      SQLException - if conversion to JDBC representation results in an error