Class CmsSqlManager

    • Method Detail

      • closeAllInTransaction

        public static void closeAllInTransaction​(CmsSqlManager sqlManager,
                                                 CmsDbContext dbc,
                                                 java.sql.Connection con,
                                                 java.sql.PreparedStatement stmnt,
                                                 java.sql.ResultSet res,
                                                 java.sql.PreparedStatement commit,
                                                 boolean wasInTransaction)
        Attempts to close the connection, statement and result set after a statement has been executed.

        Parameters:
        sqlManager - the sql manager to use
        dbc - the current database context
        con - the JDBC connection
        stmnt - the statement
        res - the result set
        commit - the additional statement for the 'commit' command
        wasInTransaction - if using transactions
      • getBytes

        public byte[] getBytes​(java.sql.ResultSet res,
                               java.lang.String attributeName)
                        throws java.sql.SQLException
        Description copied from class: CmsSqlManager
        Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.

        The bytes represent the raw values returned by the driver. Overwrite this method if another database server requires a different handling of byte attributes in tables.

        Overrides:
        getBytes in class CmsSqlManager
        Parameters:
        res - the result set
        attributeName - the name of the table attribute
        Returns:
        byte[] the column value; if the value is SQL NULL, the value returned is null
        Throws:
        java.sql.SQLException - if a database access error occurs
        See Also:
        CmsSqlManager.getBytes(java.sql.ResultSet, java.lang.String)