// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst 
// Source File Name:   STRUCT.java
// Class Version:      45.3

package oracle.sql;

import java.io.StringWriter;
import java.sql.Connection;
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.Struct;
import java.util.Hashtable;
import java.util.Map;
import oracle.jdbc.OracleConnection;
import oracle.jdbc.OracleTypes;
import oracle.jdbc.dbaccess.DBError;
import oracle.jdbc.driver.OracleLog;

// Referenced classes of package oracle.sql:
//            Datum, CustomDatum, CustomDatumFactory, ORAData, 
//            ORADataFactory, OracleSQLOutput, StructDescriptor, TypeDescriptor

// flag ACC_SUPER is set
public class STRUCT extends Datum
    implements Struct
{
    // Constants:          347
    // Interfaces:         1
    // Fields:             9
    // Methods:            33
    // Class Attributes:   1


    StructDescriptor m_descriptor;
    OracleConnection m_conn;
    Datum m_datumArray[];
    Object m_objArray[];
    boolean m_enableLocalCache;
    long m_imgOffset;
    long m_imgLength;
    static Class class$oracle$sql$STRUCT; /* synthetic field */
    static Class class$java$sql$Struct; /* synthetic field */

    // Decompiling method: <init>  Signature: (Loracle/sql/StructDescriptor;Ljava/sql/Connection;[Ljava/lang/Object;)V
    // Max stack: 3, #locals: 4, #params: 4
    // Code length: 92 bytes, Code offset: 5039
    // Line Number Table found: 18 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 92 Range 0 91 Init 0 fixed
    // Parameter  1 added: Name structdescriptor Type Loracle/sql/StructDescriptor; At 0 92 Range 0 91 Init 0
    // Parameter  2 added: Name connection Type Ljava/sql/Connection; At 0 92 Range 0 91 Init 0
    // Parameter  3 added: Name aobj Type [Ljava/lang/Object; At 0 92 Range 0 91 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 92 Range 0 91 Init 0 fixed
    public STRUCT(StructDescriptor structdescriptor, Connection connection, Object aobj[])
        throws SQLException
    {
        super();
        m_enableLocalCache = false;
        if(structdescriptor != null)
        {
            m_descriptor = structdescriptor;
            if(!m_descriptor.isInstantiable())
            {
                throw new SQLException("Cannot construct STRUCT instance for a non-instantiable object type");
            }
        } else
        {
            DBError.check_error(61, "STRUCT");
        }
        if(connection != null)
        {
            _setConnection(connection);
        } else
        {
            DBError.check_error(8, "Connection is null");
        }
        if(aobj != null)
        {
            m_datumArray = m_descriptor.toArray(aobj);
        } else
        {
            m_datumArray = new Datum[0];
        }
        return;
    }

    // Decompiling method: <init>  Signature: (Loracle/sql/StructDescriptor;[BLjava/sql/Connection;)V
    // Max stack: 2, #locals: 4, #params: 4
    // Code length: 40 bytes, Code offset: 5247
    // Line Number Table found: 9 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 40 Range 0 39 Init 0 fixed
    // Parameter  1 added: Name structdescriptor Type Loracle/sql/StructDescriptor; At 0 40 Range 0 39 Init 0
    // Parameter  2 added: Name abyte0 Type [B At 0 40 Range 0 39 Init 0
    // Parameter  3 added: Name connection Type Ljava/sql/Connection; At 0 40 Range 0 39 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 40 Range 0 39 Init 0 fixed
    public STRUCT(StructDescriptor structdescriptor, byte abyte0[], Connection connection)
        throws SQLException
    {
        super(abyte0);
        m_enableLocalCache = false;
        if(connection != null)
        {
            _setConnection(connection);
        } else
        {
            DBError.check_error(8, "Connection is null");
        }
        m_descriptor = structdescriptor;
        m_datumArray = null;
        return;
    }

    // Decompiling method: _setConnection  Signature: (Ljava/sql/Connection;)V
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 44 bytes, Code offset: 5367
    // Line Number Table found: 5 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 44 Range 0 43 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 44 Range 0 43 Init 0
    // RetValue   2 added: Name <returnValue> Type V At 0 44 Range 0 43 Init 0 fixed
    private void _setConnection(Connection connection)
    {
        if(connection != null && ((OracleConnection)connection).isLogicalConnection())
        {
            m_conn = (OracleConnection)((OracleConnection)connection)._getPC();
        } else
        {
            m_conn = (OracleConnection)connection;
        }
        return;
    }

    // Decompiling method: class$  Signature: (Ljava/lang/String;)Ljava/lang/Class;
    // Max stack: 3, #locals: 2, #params: 1
    // Code length: 18 bytes, Code offset: 5465
    // Exception table: 1 entries
    //           start  0 end 5 handler 5 type ClassNotFoundException
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name s Type Ljava/lang/String; At 0 18 Range 0 17 Init 0
    // RetValue   2 added: Name <returnValue> Type Ljava/lang/Class; At 0 18 Range 0 17 Init 0 fixed
    // LocalVar   1 added: Name classnotfoundexception Type Ljava/lang/ClassNotFoundException; At 5 6 Range 5 10 Init 5
    static Class class$(String s)
    {
        try
        {
            return Class.forName(s);
        }
        catch(ClassNotFoundException classnotfoundexception)
        {
            throw new NoClassDefFoundError(classnotfoundexception.getMessage());
        }
    }

    // Decompiling method: debugString  Signature: ()Ljava/lang/String;
    // Max stack: 4, #locals: 6, #params: 1
    // Code length: 128 bytes, Code offset: 5535
    // Exception table: 1 entries
    //           start  8 end 116 handler 119 type SQLException
    // Line Number Table found: 13 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 128 Range 0 127 Init 0 fixed
    // RetValue   6 added: Name <returnValue> Type Ljava/lang/String; At 0 128 Range 0 127 Init 0 fixed
    // LocalVar   2 added: Name stringwriter Type Ljava/io/StringWriter; At 7 117 Range 7 123 Init 7
    // LocalVar   3 added: Name structdescriptor Type Loracle/sql/StructDescriptor; At 12 35 Range 12 46 Init 12
    // LocalVar   1 added: Name i Type I At 51 62 Range 51 112 Init 51
    // LocalVar   4 added: Name aobj Type [Ljava/lang/Object; At 65 30 Range 65 94 Init 65
    // LocalVar   5 added: Name flag Type Z At 68 44 Range 68 111 Init 68
    // LocalVar   5 chged: Name j Oname flag Type I At 110 2 Range 68 111 Init 68
    public String debugString()
    {
        StringWriter stringwriter = new StringWriter();
        try
        {
            StructDescriptor structdescriptor = getDescriptor();
            stringwriter.write("name = " + structdescriptor.getName());
            int i;
            stringwriter.write(" length = " + (i = structdescriptor.getLength()));
            Object aobj[] = getAttributes();
            for(int j = 0; j < i; j++)
            {
                stringwriter.write(" attribute[" + j + "] = " + aobj[j]);
            }

        }
        catch(SQLException _ex)
        {
            return "StructDescriptor missing or bad";
        }
        return stringwriter.toString();
    }

    // Decompiling method: getAttributes  Signature: ()[Ljava/lang/Object;
    // Max stack: 2, #locals: 1, #params: 1
    // Code length: 9 bytes, Code offset: 5757
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 9 Range 0 8 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type [Ljava/lang/Object; At 0 9 Range 0 8 Init 0 fixed
    public synchronized Object[] getAttributes()
        throws SQLException
    {
        return getAttributes(getMap());
    }

    // Decompiling method: getAttributes  Signature: (Ljava/util/Map;)[Ljava/lang/Object;
    // Max stack: 4, #locals: 2, #params: 2
    // Code length: 14 bytes, Code offset: 5814
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 14 Range 0 13 Init 0 fixed
    // Parameter  1 added: Name map Type Ljava/util/Map; At 0 14 Range 0 13 Init 0
    // RetValue   2 added: Name <returnValue> Type [Ljava/lang/Object; At 0 14 Range 0 13 Init 0 fixed
    public synchronized Object[] getAttributes(Map map)
        throws SQLException
    {
        return m_descriptor.toArray(this, map, m_enableLocalCache);
    }

    // Decompiling method: getAutoBuffering  Signature: ()Z
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 5 bytes, Code offset: 5876
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 5 Range 0 4 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Z At 0 5 Range 0 4 Init 0 fixed
    public synchronized boolean getAutoBuffering()
        throws SQLException
    {
        return m_enableLocalCache;
    }

    // Decompiling method: getConnection  Signature: ()Loracle/jdbc/driver/OracleConnection;
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 16 bytes, Code offset: 5929
    // Exception table: 1 entries
    //           start  0 end 8 handler 8 type ClassCastException
    // Line Number Table found: 5 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 16 Range 0 15 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Loracle/jdbc/driver/OracleConnection; At 0 16 Range 0 15 Init 0 fixed
    public oracle.jdbc.driver.OracleConnection getConnection()
        throws SQLException
    {
        try
        {
            return (oracle.jdbc.driver.OracleConnection)getJavaSqlConnection();
        }
        catch(ClassCastException _ex)
        {
            DBError.throwSqlException(103);
        }
        return null;
    }

    // Decompiling method: getDescriptor  Signature: ()Loracle/sql/StructDescriptor;
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 5 bytes, Code offset: 6023
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 5 Range 0 4 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Loracle/sql/StructDescriptor; At 0 5 Range 0 4 Init 0 fixed
    public synchronized StructDescriptor getDescriptor()
        throws SQLException
    {
        return m_descriptor;
    }

    // Decompiling method: getFactory  Signature: (Ljava/util/Hashtable;Ljava/lang/String;)Loracle/sql/CustomDatumFactory;
    // Max stack: 5, #locals: 5, #params: 3
    // Code length: 70 bytes, Code offset: 6076
    // Line Number Table found: 8 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 70 Range 0 69 Init 0 fixed
    // Parameter  1 added: Name hashtable Type Ljava/util/Hashtable; At 0 70 Range 0 69 Init 0
    // Parameter  2 added: Name s Type Ljava/lang/String; At 0 70 Range 0 69 Init 0
    // RetValue   5 added: Name <returnValue> Type Loracle/sql/CustomDatumFactory; At 0 70 Range 0 69 Init 0 fixed
    // LocalVar   3 added: Name s1 Type Ljava/lang/String; At 4 27 Range 4 30 Init 4
    // LocalVar   4 added: Name obj Type Ljava/lang/Object; At 10 56 Range 10 65 Init 10
    public CustomDatumFactory getFactory(Hashtable hashtable, String s)
        throws SQLException
    {
        String s1 = getSQLTypeName();
        Object obj = hashtable.get(s1);
        if(obj == null)
        {
            throw new SQLException("Unable to convert a \"" + s1 + "\" to a \"" + s + "\" or a subclass of \"" + s + "\"");
        } else
        {
            return (CustomDatumFactory)obj;
        }
    }

    // Decompiling method: getImageLength  Signature: ()J
    // Max stack: 2, #locals: 1, #params: 1
    // Code length: 5 bytes, Code offset: 6222
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 5 Range 0 4 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type J At 0 5 Range 0 4 Init 0 fixed
    public long getImageLength()
    {
        return m_imgLength;
    }

    // Decompiling method: getImageOffset  Signature: ()J
    // Max stack: 2, #locals: 1, #params: 1
    // Code length: 5 bytes, Code offset: 6265
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 5 Range 0 4 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type J At 0 5 Range 0 4 Init 0 fixed
    public long getImageOffset()
    {
        return m_imgOffset;
    }

    // Decompiling method: getJavaSqlConnection  Signature: ()Ljava/sql/Connection;
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 5 bytes, Code offset: 6308
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 5 Range 0 4 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Ljava/sql/Connection; At 0 5 Range 0 4 Init 0 fixed
    public Connection getJavaSqlConnection()
        throws SQLException
    {
        return m_conn;
    }

    // Decompiling method: getMap  Signature: ()Ljava/util/Map;
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 13 bytes, Code offset: 6361
    // Exception table: 1 entries
    //           start  0 end 10 handler 10 type SQLException
    // Line Number Table found: 4 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 13 Range 0 12 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Ljava/util/Map; At 0 13 Range 0 12 Init 0 fixed
    public Map getMap()
    {
        try
        {
            return getConnection().getTypeMap();
        }
        catch(SQLException _ex)
        {
            return null;
        }
    }

    // Decompiling method: getORADataFactory  Signature: (Ljava/util/Hashtable;Ljava/lang/String;)Loracle/sql/ORADataFactory;
    // Max stack: 5, #locals: 5, #params: 3
    // Code length: 70 bytes, Code offset: 6432
    // Line Number Table found: 8 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 70 Range 0 69 Init 0 fixed
    // Parameter  1 added: Name hashtable Type Ljava/util/Hashtable; At 0 70 Range 0 69 Init 0
    // Parameter  2 added: Name s Type Ljava/lang/String; At 0 70 Range 0 69 Init 0
    // RetValue   5 added: Name <returnValue> Type Loracle/sql/ORADataFactory; At 0 70 Range 0 69 Init 0 fixed
    // LocalVar   3 added: Name s1 Type Ljava/lang/String; At 4 27 Range 4 30 Init 4
    // LocalVar   4 added: Name obj Type Ljava/lang/Object; At 10 56 Range 10 65 Init 10
    public ORADataFactory getORADataFactory(Hashtable hashtable, String s)
        throws SQLException
    {
        String s1 = getSQLTypeName();
        Object obj = hashtable.get(s1);
        if(obj == null)
        {
            throw new SQLException("Unable to convert a \"" + s1 + "\" to a \"" + s + "\" or a subclass of \"" + s + "\"");
        } else
        {
            return (ORADataFactory)obj;
        }
    }

    // Decompiling method: getOracleAttributes  Signature: ()[Loracle/sql/Datum;
    // Max stack: 3, #locals: 1, #params: 1
    // Code length: 13 bytes, Code offset: 6578
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 13 Range 0 12 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type [Loracle/sql/Datum; At 0 13 Range 0 12 Init 0 fixed
    public synchronized Datum[] getOracleAttributes()
        throws SQLException
    {
        return m_descriptor.toOracleArray(this, m_enableLocalCache);
    }

    // Decompiling method: getSQLTypeName  Signature: ()Ljava/lang/String;
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 8 bytes, Code offset: 6639
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 8 Range 0 7 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Ljava/lang/String; At 0 8 Range 0 7 Init 0 fixed
    public synchronized String getSQLTypeName()
        throws SQLException
    {
        return m_descriptor.getName();
    }

    // Decompiling method: isConvertibleTo  Signature: (Ljava/lang/Class;)Z
    // Max stack: 1, #locals: 2, #params: 2
    // Code length: 2 bytes, Code offset: 6695
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 2 Range 0 1 Init 0 fixed
    // Parameter  1 added: Name class1 Type Ljava/lang/Class; At 0 2 Range 0 1 Init 0
    // RetValue   2 added: Name <returnValue> Type Z At 0 2 Range 0 1 Init 0 fixed
    public boolean isConvertibleTo(Class class1)
    {
        return false;
    }

    // Decompiling method: isInHierarchyOf  Signature: (Ljava/lang/String;)Z
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 9 bytes, Code offset: 6735
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 9 Range 0 8 Init 0 fixed
    // Parameter  1 added: Name s Type Ljava/lang/String; At 0 9 Range 0 8 Init 0
    // RetValue   2 added: Name <returnValue> Type Z At 0 9 Range 0 8 Init 0 fixed
    public boolean isInHierarchyOf(String s)
        throws SQLException
    {
        return getDescriptor().isInHierarchyOf(s);
    }

    // Decompiling method: makeJdbcArray  Signature: (I)Ljava/lang/Object;
    // Max stack: 1, #locals: 2, #params: 2
    // Code length: 5 bytes, Code offset: 6792
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 5 Range 0 4 Init 0 fixed
    // Parameter  1 added: Name i Type I At 0 5 Range 0 4 Init 0
    // RetValue   2 added: Name <returnValue> Type Ljava/lang/Object; At 0 5 Range 0 4 Init 0 fixed
    public Object makeJdbcArray(int i)
    {
        return ((Object) (new Object[i]));
    }

    // Decompiling method: setAutoBuffering  Signature: (Z)V
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 6 bytes, Code offset: 6835
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 6 Range 0 5 Init 0 fixed
    // Parameter  1 added: Name flag Type Z At 0 6 Range 0 5 Init 0
    // RetValue   2 added: Name <returnValue> Type V At 0 6 Range 0 5 Init 0 fixed
    public synchronized void setAutoBuffering(boolean flag)
        throws SQLException
    {
        m_enableLocalCache = flag;
        return;
    }

    // Decompiling method: setDatumArray  Signature: ([Loracle/sql/Datum;)V
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 17 bytes, Code offset: 6893
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 17 Range 0 16 Init 0 fixed
    // Parameter  1 added: Name adatum Type [Loracle/sql/Datum; At 0 17 Range 0 16 Init 0
    // RetValue   2 added: Name <returnValue> Type V At 0 17 Range 0 16 Init 0 fixed
    public synchronized void setDatumArray(Datum adatum[])
    {
        m_datumArray = adatum != null ? adatum : new Datum[0];
        return;
    }

    // Decompiling method: setDescriptor  Signature: (Loracle/sql/StructDescriptor;)V
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 6 bytes, Code offset: 6952
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 6 Range 0 5 Init 0 fixed
    // Parameter  1 added: Name structdescriptor Type Loracle/sql/StructDescriptor; At 0 6 Range 0 5 Init 0
    // RetValue   2 added: Name <returnValue> Type V At 0 6 Range 0 5 Init 0 fixed
    public synchronized void setDescriptor(StructDescriptor structdescriptor)
    {
        m_descriptor = structdescriptor;
        return;
    }

    // Decompiling method: setImage  Signature: ([BJJ)V
    // Max stack: 3, #locals: 6, #params: 6
    // Code length: 17 bytes, Code offset: 7000
    // Line Number Table found: 4 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 17 Range 0 16 Init 0 fixed
    // Parameter  1 added: Name abyte0 Type [B At 0 17 Range 0 16 Init 0
    // Parameter  2 added: Name l Type J At 0 17 Range 0 16 Init 0
    // Parameter  4 added: Name l1 Type J At 0 17 Range 0 16 Init 0
    // RetValue   6 added: Name <returnValue> Type V At 0 17 Range 0 16 Init 0 fixed
    public void setImage(byte abyte0[], long l, long l1)
        throws SQLException
    {
        setShareBytes(abyte0);
        m_imgOffset = l;
        m_imgLength = l1;
        return;
    }

    // Decompiling method: setImageLength  Signature: (J)V
    // Max stack: 3, #locals: 3, #params: 3
    // Code length: 6 bytes, Code offset: 7077
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 6 Range 0 5 Init 0 fixed
    // Parameter  1 added: Name l Type J At 0 6 Range 0 5 Init 0
    // RetValue   3 added: Name <returnValue> Type V At 0 6 Range 0 5 Init 0 fixed
    public void setImageLength(long l)
        throws SQLException
    {
        m_imgLength = l;
        return;
    }

    // Decompiling method: setObjArray  Signature: ([Ljava/lang/Object;)V
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 17 bytes, Code offset: 7135
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 17 Range 0 16 Init 0 fixed
    // Parameter  1 added: Name aobj Type [Ljava/lang/Object; At 0 17 Range 0 16 Init 0
    // RetValue   2 added: Name <returnValue> Type V At 0 17 Range 0 16 Init 0 fixed
    public synchronized void setObjArray(Object aobj[])
        throws SQLException
    {
        m_objArray = aobj != null ? aobj : new Object[0];
        return;
    }

    // Decompiling method: toBytes  Signature: ()[B
    // Max stack: 3, #locals: 1, #params: 1
    // Code length: 13 bytes, Code offset: 7204
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 13 Range 0 12 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type [B At 0 13 Range 0 12 Init 0 fixed
    public synchronized byte[] toBytes()
        throws SQLException
    {
        return m_descriptor.toBytes(this, m_enableLocalCache);
    }

    // Decompiling method: toClass  Signature: (Ljava/lang/Class;)Ljava/lang/Object;
    // Max stack: 3, #locals: 2, #params: 2
    // Code length: 10 bytes, Code offset: 7265
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 10 Range 0 9 Init 0 fixed
    // Parameter  1 added: Name class1 Type Ljava/lang/Class; At 0 10 Range 0 9 Init 0
    // RetValue   2 added: Name <returnValue> Type Ljava/lang/Object; At 0 10 Range 0 9 Init 0 fixed
    public Object toClass(Class class1)
        throws SQLException
    {
        return toClass(class1, getMap());
    }

    // Decompiling method: toClass  Signature: (Ljava/lang/Class;Ljava/util/Map;)Ljava/lang/Object;
    // Max stack: 4, #locals: 6, #params: 3
    // Code length: 233 bytes, Code offset: 7323
    // Exception table: 2 entries
    //           start  0 end 178 handler 178 type InstantiationException
    //           start  0 end 178 handler 206 type IllegalAccessException
    // Line Number Table found: 36 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 233 Range 0 232 Init 0 fixed
    // Parameter  1 added: Name class1 Type Ljava/lang/Class; At 0 233 Range 0 232 Init 0
    // Parameter  2 added: Name map Type Ljava/util/Map; At 0 233 Range 0 232 Init 0
    // RetValue   6 added: Name <returnValue> Type Ljava/lang/Object; At 0 233 Range 0 232 Init 0 fixed
    // LocalVar   3 added: Name obj Type A At 57 120 Range 57 176 Init 57
    // LocalVar   4 added: Name obj1 Type Ljava/lang/Object; At 62 82 Range 62 143 Init 62
    // LocalVar   3 chged: Name obj Oname obj Type Ljava/lang/Object; At 100 77 Range 57 176 Init 57
    // LocalVar   5 added: Name oradatafactory Type Loracle/sql/ORADataFactory; At 117 4 Range 117 120 Init 117
    // LocalVar   5 added: Name customdatumfactory Type Loracle/sql/CustomDatumFactory; At 147 4 Range 147 150 Init 147
    // LocalVar   3 added: Name instantiationexception Type Ljava/lang/InstantiationException; At 178 13 Range 178 190 Init 178
    // LocalVar   3 added: Name illegalaccessexception Type Ljava/lang/IllegalAccessException; At 206 13 Range 206 218 Init 206
    public Object toClass(Class class1, Map map)
        throws SQLException
    {
        try
        {
            if(class1 == null || class1 == (class$oracle$sql$STRUCT == null ? (class$oracle$sql$STRUCT = class$("oracle.sql.STRUCT")) : class$oracle$sql$STRUCT) || class1 == (class$java$sql$Struct == null ? (class$java$sql$Struct = class$("java.sql.Struct")) : class$java$sql$Struct))
            {
                return this;
            }
            Object obj = null;
            Object obj1 = class1.newInstance();
            if(obj1 instanceof SQLData)
            {
                ((SQLData)obj1).readSQL(m_descriptor.toJdbc2SQLInput(this, map), m_descriptor.getName());
                obj = obj1;
            } else
            if(obj1 instanceof ORADataFactory)
            {
                ORADataFactory oradatafactory = (ORADataFactory)obj1;
                obj = oradatafactory.create(this, 2002);
            } else
            if(obj1 instanceof CustomDatumFactory)
            {
                CustomDatumFactory customdatumfactory = (CustomDatumFactory)obj1;
                obj = customdatumfactory.create(this, 2002);
            } else
            {
                DBError.throwSqlException(49, m_descriptor.getName());
            }
            return obj;
        }
        catch(InstantiationException instantiationexception)
        {
            DBError.throwSqlException(49, "InstantiationException: " + instantiationexception.getMessage());
        }
        catch(IllegalAccessException illegalaccessexception)
        {
            DBError.throwSqlException(49, "IllegalAccessException: " + illegalaccessexception.getMessage());
        }
        return null;
    }

    // Decompiling method: toJdbc  Signature: ()Ljava/lang/Object;
    // Max stack: 2, #locals: 2, #params: 1
    // Code length: 11 bytes, Code offset: 7760
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 11 Range 0 10 Init 0 fixed
    // RetValue   2 added: Name <returnValue> Type Ljava/lang/Object; At 0 11 Range 0 10 Init 0 fixed
    // LocalVar   1 added: Name map Type Ljava/util/Map; At 4 3 Range 4 6 Init 4
    public Object toJdbc()
        throws SQLException
    {
        Map map = getMap();
        return toJdbc(map);
    }

    // Decompiling method: toJdbc  Signature: (Ljava/util/Map;)Ljava/lang/Object;
    // Max stack: 3, #locals: 4, #params: 2
    // Code length: 28 bytes, Code offset: 7823
    // Line Number Table found: 5 entries
    // Parameter  0 added: Name this Type Loracle/sql/STRUCT; At 0 28 Range 0 27 Init 0 fixed
    // Parameter  1 added: Name map Type Ljava/util/Map; At 0 28 Range 0 27 Init 0
    // RetValue   4 added: Name <returnValue> Type Ljava/lang/Object; At 0 28 Range 0 27 Init 0 fixed
    // LocalVar   2 added: Name struct Type Loracle/sql/STRUCT; At 1 26 Range 1 26 Init 1
    // LocalVar   3 added: Name class1 Type Ljava/lang/Class; At 14 7 Range 14 20 Init 14
    // LocalVar   2 chged: Name obj Oname struct Type Ljava/lang/Object; At 25 2 Range 1 26 Init 1
    public Object toJdbc(Map map)
        throws SQLException
    {
        Object obj = this;
        if(map != null)
        {
            Class class1 = m_descriptor.getClass(map);
            if(class1 != null)
            {
                obj = toClass(class1, map);
            }
        }
        return obj;
    }

    // Decompiling method: toSTRUCT  Signature: (Ljava/lang/Object;Loracle/jdbc/OracleConnection;)Loracle/sql/STRUCT;
    // Max stack: 2, #locals: 6, #params: 2
    // Code length: 133 bytes, Code offset: 7915
    // Line Number Table found: 21 entries
    // Parameter  0 added: Name obj Type Ljava/lang/Object; At 0 133 Range 0 132 Init 0
    // Parameter  1 added: Name oracleconnection Type Loracle/jdbc/OracleConnection; At 0 133 Range 0 132 Init 0
    // RetValue   6 added: Name <returnValue> Type Loracle/sql/STRUCT; At 0 133 Range 0 132 Init 0 fixed
    // LocalVar   2 added: Name obj1 Type A At 7 125 Range 7 131 Init 7
    // LocalVar   2 chged: Name struct Oname obj1 Type Loracle/sql/STRUCT; At 19 113 Range 7 131 Init 7
    // LocalVar   3 added: Name sqldata Type Ljava/sql/SQLData; At 85 21 Range 85 105 Init 85
    // LocalVar   4 added: Name structdescriptor Type Loracle/sql/StructDescriptor; At 96 4 Range 96 99 Init 96
    // LocalVar   5 added: Name sqloutput Type Ljava/sql/SQLOutput; At 103 12 Range 103 114 Init 103
    public static STRUCT toSTRUCT(Object obj, OracleConnection oracleconnection)
        throws SQLException
    {
        if(obj == null)
        {
            return null;
        }
        STRUCT struct = null;
        if(obj instanceof STRUCT)
        {
            struct = (STRUCT)obj;
        } else
        if(obj instanceof ORAData)
        {
            struct = (STRUCT)((ORAData)obj).toDatum(oracleconnection);
        } else
        if(obj instanceof CustomDatum)
        {
            struct = (STRUCT)((CustomDatum)obj).toDatum((oracle.jdbc.driver.OracleConnection)oracleconnection);
        } else
        if(obj instanceof SQLData)
        {
            SQLData sqldata = (SQLData)obj;
            StructDescriptor structdescriptor = StructDescriptor.createDescriptor(sqldata.getSQLTypeName(), oracleconnection);
            java.sql.SQLOutput sqloutput = structdescriptor.toJdbc2SQLOutput();
            sqldata.writeSQL(sqloutput);
            struct = ((OracleSQLOutput)sqloutput).getSTRUCT();
        } else
        {
            DBError.check_error(59, obj);
        }
        return struct;
    }
}
