Class ClientJDBCObjectFactoryImpl

  • All Implemented Interfaces:
    ClientJDBCObjectFactory
    Direct Known Subclasses:
    ClientJDBCObjectFactoryImpl42

    public class ClientJDBCObjectFactoryImpl
    extends java.lang.Object
    implements ClientJDBCObjectFactory
    Implements the the ClientJDBCObjectFactory interface and returns the classes that implement the JDBC3.0/2.0 interfaces For example, newCallableStatement would return ClientCallableStatement
    • Field Detail

      • msgutil_

        private static final MessageUtil msgutil_
        The message utility instance we use to find messages It's primed with the name of the client message bundle so that it knows to look there if the message isn't found in the shared message bundle.
    • Constructor Detail

      • ClientJDBCObjectFactoryImpl

        public ClientJDBCObjectFactoryImpl()
    • Method Detail

      • newCallableStatement

        public ClientCallableStatement newCallableStatement​(Agent agent,
                                                            ClientConnection connection,
                                                            java.lang.String sql,
                                                            int type,
                                                            int concurrency,
                                                            int holdability,
                                                            ClientPooledConnection cpc)
                                                     throws SqlException
        Returns an instance of ClientCallableStatement.
        Specified by:
        newCallableStatement in interface ClientJDBCObjectFactory
        Parameters:
        agent - The instance of NetAgent associated with this ClientCallableStatement object.
        connection - The connection object associated with this PreparedStatement Object.
        sql - A String object that is the SQL statement to be sent to the database.
        type - One of the ResultSet type constants
        concurrency - One of the ResultSet concurrency constants
        holdability - One of the ResultSet holdability constants
        cpc - The PooledConnection object that will be used to notify the PooledConnection reference of the Error Occurred and the Close events.
        Returns:
        a ClientCallableStatement object
        Throws:
        SqlException
      • newPreparedStatement

        public ClientPreparedStatement newPreparedStatement​(Agent agent,
                                                            ClientConnection connection,
                                                            java.lang.String sql,
                                                            Section section,
                                                            ClientPooledConnection cpc)
                                                     throws SqlException
        This method returns an instance of ClientPreparedStatement which implements java.sql.PreparedStatement. It has the ClientPooledConnection as one of its parameters this is used to raise the Statement Events when the prepared statement is closed.
        Specified by:
        newPreparedStatement in interface ClientJDBCObjectFactory
        Parameters:
        agent - The instance of NetAgent associated with this ClientCallableStatement object.
        connection - The connection object associated with this PreparedStatement Object.
        sql - A String object that is the SQL statement to be sent to the database.
        section - Section
        cpc - The ClientPooledConnection wraps the underlying physical connection associated with this prepared statement. It is used to pass the Statement closed and the Statement error occurred events that occur back to the ClientPooledConnection.
        Returns:
        a PreparedStatement object
        Throws:
        SqlException
      • newPreparedStatement

        public ClientPreparedStatement newPreparedStatement​(Agent agent,
                                                            ClientConnection connection,
                                                            java.lang.String sql,
                                                            int type,
                                                            int concurrency,
                                                            int holdability,
                                                            int autoGeneratedKeys,
                                                            java.lang.String[] columnNames,
                                                            int[] columnIndexes,
                                                            ClientPooledConnection cpc)
                                                     throws SqlException
        This method returns an instance of ClientPreparedStatement which implements java.sql.PreparedStatement. It has the ClientPooledConnection as one of its parameters this is used to raise the Statement Events when the prepared statement is closed.
        Specified by:
        newPreparedStatement in interface ClientJDBCObjectFactory
        Parameters:
        agent - The instance of NetAgent associated with this ClientCallableStatement object.
        connection - The connection object associated with this PreparedStatement Object.
        sql - A String object that is the SQL statement to be sent to the database.
        type - One of the ResultSet type constants.
        concurrency - One of the ResultSet concurrency constants.
        holdability - One of the ResultSet holdability constants.
        autoGeneratedKeys - a flag indicating whether auto-generated keys should be returned.
        columnNames - an array of column names indicating the columns that should be returned from the inserted row or rows.
        cpc - The ClientPooledConnection wraps the underlying physical connection associated with this prepared statement it is used to pass the Statement closed and the Statement error occurred events that occur back to the ClientPooledConnection.
        columnIndexes - an array of column indexes indicating the columns that should be returned form the inserted row.
        Returns:
        a PreparedStatement object
        Throws:
        SqlException
      • newNetConnection

        public ClientConnection newNetConnection​(LogWriter logWriter,
                                                 java.lang.String user,
                                                 java.lang.String password,
                                                 BasicClientDataSource40 dataSource,
                                                 int rmId,
                                                 boolean isXAConn,
                                                 ClientPooledConnection cpc)
                                          throws SqlException
        Returns an instance of NetConnection.
        Specified by:
        newNetConnection in interface ClientJDBCObjectFactory
        Parameters:
        logWriter - LogWriter object associated with this connection.
        user - user id for this connection.
        password - password for this connection.
        dataSource - The DataSource object passed from the PooledConnection object from which this constructor was called.
        rmId - The Resource Manager ID for XA Connections
        isXAConn - true if this is a XA connection
        cpc - The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object.
        Returns:
        a ClientConnection object
        Throws:
        SqlException
      • newStatement

        public ClientStatement newStatement​(Agent agent,
                                            ClientConnection connection,
                                            int type,
                                            int concurrency,
                                            int holdability,
                                            int autoGeneratedKeys,
                                            java.lang.String[] columnNames,
                                            int[] columnIndexes)
                                     throws SqlException
        This method provides an instance of Statement
        Specified by:
        newStatement in interface ClientJDBCObjectFactory
        Parameters:
        agent - Agent
        connection - Connection
        type - int
        concurrency - int
        holdability - int
        autoGeneratedKeys - int
        columnNames - String[]
        columnIndexes - int[]
        Returns:
        a ClientStatement implementation
        Throws:
        SqlException
      • newColumnMetaData

        public ColumnMetaData newColumnMetaData​(LogWriter logWriter,
                                                int upperBound)
        Returns an instance of ColumnMetaData or ColumnMetaData40 depending on the JDK version under use
        Specified by:
        newColumnMetaData in interface ClientJDBCObjectFactory
        Parameters:
        logWriter - LogWriter
        upperBound - int
        Returns:
        a ColumnMetaData implementation
      • newBatchUpdateException

        protected java.sql.BatchUpdateException newBatchUpdateException​(java.lang.String message,
                                                                        java.lang.String sqlState,
                                                                        int errorCode,
                                                                        long[] updateCounts,
                                                                        SqlException cause)
        This method is overridden on JVM 8