Class DB2v7Delegate

  • All Implemented Interfaces:
    Constants, DriverDelegate, StdJDBCConstants

    public class DB2v7Delegate
    extends StdJDBCDelegate
    Quartz JDBC delegate for DB2 v7 databases.

    This differs from the StdJDBCDelegate in that it stores boolean values in an varchar(1) column, and saves serialized data in a byte array using PreparedStatement.setObject(int, java.lang.Object, int) rather than PreparedStatement.setBytes(int, byte[]).

    Author:
    Blair Jensen
    • Constructor Detail

      • DB2v7Delegate

        public DB2v7Delegate()
    • Method Detail

      • setBytes

        protected void setBytes​(java.sql.PreparedStatement ps,
                                int index,
                                java.io.ByteArrayOutputStream baos)
                         throws java.sql.SQLException
        Sets the designated parameter to the byte array of the given ByteArrayOutputStream. Will set parameter value to null if the ByteArrayOutputStream is null. Wraps PreparedStatement.setObject(int, java.lang.Object, int) rather than PreparedStatement.setBytes(int, byte[]) as required by the DB2 v7 database.
        Overrides:
        setBytes in class StdJDBCDelegate
        Throws:
        java.sql.SQLException
      • setBoolean

        protected void setBoolean​(java.sql.PreparedStatement ps,
                                  int index,
                                  boolean val)
                           throws java.sql.SQLException
        Sets the designated parameter to the given Java boolean value. This translates the boolean to 1/0 for true/false.
        Overrides:
        setBoolean in class StdJDBCDelegate
        Throws:
        java.sql.SQLException