Class JDBCAdapter


  • public class JDBCAdapter
    extends java.lang.Object
    This Class helps to encapsulate calls to Oracle JDBC Extensions that does not work with some J2EE connection pools implementations. If initialize is not call, casting to oracle.sql.STRUCT and oracle.sql.ARRAY will be used.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void clearStatementCache​(java.sql.Connection conn)  
      static void closeOracleConnection​(oracle.jdbc.OracleConnection conn)  
      static oracle.sql.ArrayDescriptor getArrayDescriptor​(java.lang.Object obj)
      Deprecated.
      Use OracleConnection.createOracleArray(...);
      static javax.sql.DataSource[] getDataSource​(java.lang.String... dataSourceName)  
      static JGeometry getJGeometry​(java.lang.Object obj)  
      static oracle.sql.Datum[] getOracleArray​(java.lang.Object obj)
      Deprecated.
      Use java.sql.Array array = resultSet.getArray(...);
      static oracle.sql.Datum[] getOracleAttributes​(java.lang.Object obj)
      Deprecated.
      Use java.sql.Struct.getAttributes();
      static oracle.jdbc.OracleConnection getOracleConnection​(java.sql.Connection conn)  
      static oracle.sql.StructDescriptor getStructDescriptor​(java.lang.Object obj)  
      static oracle.xdb.XMLType getXMLType​(java.lang.Object obj)
      Deprecated.
      Use SQLXML newXML = resultSet.getSQLXML(columnNumber);
      static void initialize​(JDBCExtensionInterface oracleExtension)
      This method should be called before any interaction with the db.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • initialize

        public static void initialize​(JDBCExtensionInterface oracleExtension)
        This method should be called before any interaction with the db. JDBCExtensionInterface provides the implementation details to deal with Connection Wrappers.
        Parameters:
        oracleExtension -
      • getOracleConnection

        public static oracle.jdbc.OracleConnection getOracleConnection​(java.sql.Connection conn)
                                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • clearStatementCache

        public static void clearStatementCache​(java.sql.Connection conn)
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getJGeometry

        public static JGeometry getJGeometry​(java.lang.Object obj)
                                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getOracleAttributes

        public static oracle.sql.Datum[] getOracleAttributes​(java.lang.Object obj)
                                                      throws java.sql.SQLException
        Deprecated.
        Use java.sql.Struct.getAttributes();
        Parameters:
        obj -
        Returns:
        Throws:
        java.sql.SQLException
      • getStructDescriptor

        public static oracle.sql.StructDescriptor getStructDescriptor​(java.lang.Object obj)
                                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getOracleArray

        public static oracle.sql.Datum[] getOracleArray​(java.lang.Object obj)
                                                 throws java.sql.SQLException
        Deprecated.
        Use java.sql.Array array = resultSet.getArray(...);
        Parameters:
        obj -
        Returns:
        Throws:
        java.sql.SQLException
      • getArrayDescriptor

        public static oracle.sql.ArrayDescriptor getArrayDescriptor​(java.lang.Object obj)
                                                             throws java.sql.SQLException
        Deprecated.
        Use OracleConnection.createOracleArray(...);
        Parameters:
        obj -
        Returns:
        Throws:
        java.sql.SQLException
      • closeOracleConnection

        public static void closeOracleConnection​(oracle.jdbc.OracleConnection conn)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDataSource

        public static javax.sql.DataSource[] getDataSource​(java.lang.String... dataSourceName)
      • getXMLType

        public static oracle.xdb.XMLType getXMLType​(java.lang.Object obj)
                                             throws java.sql.SQLException
        Deprecated.
        Use SQLXML newXML = resultSet.getSQLXML(columnNumber);
        Parameters:
        obj -
        Returns:
        Throws:
        java.sql.SQLException