Package oracle.sql

Class TypeDescriptor

    • Method Detail

      • isV2available

        public static boolean isV2available​(byte[] toid)
      • toDatum

        public Datum toDatum​(Connection c)
                      throws SQLException
        Description copied from interface: ORAData
        Extract an oracle.sql.Datum object.

        This method is invoked by setORAData() to extract a Datum. The implementation of this method must return the correct type of Datum.

        Although most implementation will ignore the connection, it is occassionally needed. For example, if the class embeds CHAR attributes, connection may be needed to determine the database character set.

        Specified by:
        toDatum in interface ORAData
        Parameters:
        c - The connection into which the value is being sent.
        Returns:
        a Datum contaning the value to be sent into the connection.
        Throws:
        SQLException - if an error occurred.
      • toJDBCObject

        public Object toJDBCObject​(Connection c)
                            throws SQLException
        Description copied from interface: OracleData
        Extract a jdbc Object.

        This method is invoked by setObject() to extract the jdbc Object. The implementation must return the jdbc Object that correctly represents the underlying SQLType.

        Although most implementation will ignore the connection, it is ocassionally needed. for example, if the class embeds CHAR attributes, connection may be needed to determine the database character set.

        Specified by:
        toJDBCObject in interface OracleData
        Parameters:
        c - The connection into which the value is being sent.
        Returns:
        a jdbc Object contianing the value to be sent into the connection.
        Throws:
        SQLException - if an error occurred.
      • isTransient

        public boolean isTransient()
      • setPrecision

        public void setPrecision​(long _precision)
      • getPrecision

        public long getPrecision()
      • setScale

        public void setScale​(byte _scale)
      • getScale

        public byte getScale()
      • toXMLString

        public String toXMLString()
                           throws SQLException
        Creates a String which is an XML representation of this type and all OracleTypes within. Metadata for object types and collections is relatively expensive to get from the server. Not all of it is necessary depending on how the TypeDescriptor is used. In normal operation it is fetched as needed. This method will provide a representation of this type in its current state without fetching additional data
        Throws:
        SQLException
      • toXMLString

        public String toXMLString​(boolean fetchAllMetaDataAsNeeded)
                           throws SQLException
        Creates a String which is an XML representation of this type and all OracleTypes within. Optionally causes any metadata which has not been previously fetched from the server to be obtained so as to provide a complete representation. See toXMLString()
        Parameters:
        fetchAllMetaDataAsNeeded - if set to true and if necessary the driver will fetch the metadata from the server
        Throws:
        SQLException
      • printXML

        public void printXML​(PrintStream s)
                      throws SQLException
        Print an XML representation of this type and all OracleTypes within.
        Parameters:
        s - a PrintStream upon which to write
        Throws:
        SQLException
      • printXML

        public void printXML​(PrintStream stream,
                             boolean fetchAllMetaDataAsNeeded)
                      throws SQLException
        Print an XML representation of this type and all OracleTypes within.
        Parameters:
        stream - a PrintStream upon which to write
        fetchAllMetaDataAsNeeded - if set to true and if necessary the driver will fetch the metadata from the server
        Throws:
        SQLException
      • getConnectionDuringExceptionHandling

        protected oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling()
      • convToUpperCase

        public static String convToUpperCase​(String str)
        Convert the String to UpperCase character by character
        Parameters:
        String -
        Returns:
        String converted to Uppercase