1 17 18 21 package org.quartz.impl.jdbcjobstore; 22 23 import java.io.ByteArrayOutputStream ; 24 import java.sql.PreparedStatement ; 25 import java.sql.SQLException ; 26 27 import org.apache.commons.logging.Log; 28 29 41 public class DB2v7Delegate extends StdJDBCDelegate { 42 43 public DB2v7Delegate(Log logger, String tablePrefix, String instanceId) { 44 super(logger, tablePrefix, instanceId); 45 } 46 47 public DB2v7Delegate(Log log, String tablePrefix, String instanceId, 48 Boolean useProperties) { 49 super(log, tablePrefix, instanceId, useProperties); 50 } 51 52 60 protected void setBytes(PreparedStatement ps, int index, ByteArrayOutputStream baos) throws SQLException { 61 ps.setObject(index, ((baos == null) ? null : baos.toByteArray()), java.sql.Types.BLOB); 62 } 63 64 68 protected void setBoolean(PreparedStatement ps, int index, boolean val) throws SQLException { 69 ps.setString(index, ((val) ? "1" : "0")); 70 } 71 72 } 73 | Popular Tags |