/** * <p> * Update the job data map for the given job. * </p> * * @param conn * the DB Connection * @param job * the job to update * @return the number of rows updated */ @Override public int updateJobData(Connection conn, JobDetail job) throws IOException, SQLException { //log.debug( "Updating Job Data for Job " + job ); ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); int len = baos.toByteArray().length; ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); ps.setBinaryStream(1, bais, len); ps.setString(2, job.getKey().getName()); ps.setString(3, job.getKey().getGroup()); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Update the job data map for the given job. * </p> * * @param conn * the DB Connection * @param job * the job to update * @return the number of rows updated */ @Override public int updateJobData(Connection conn, JobDetail job) throws IOException, SQLException { //log.debug( "Updating Job Data for Job " + job ); ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); int len = baos.toByteArray().length; ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); ps.setBinaryStream(1, bais, len); ps.setString(2, job.getKey().getName()); ps.setString(3, job.getKey().getGroup()); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Update the job data map for the given job. * </p> * * @param conn * the DB Connection * @param job * the job to update * @return the number of rows updated */ public int updateJobData(Connection conn, JobDetail job) throws IOException, SQLException { //log.debug( "Updating Job Data for Job " + job ); ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); int len = baos.toByteArray().length; ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); ps.setBinaryStream(1, bais, len); ps.setString(2, job.getName()); ps.setString(3, job.getGroup()); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Update the job data map for the given job. * </p> * * @param conn * the DB Connection * @param job * the job to update * @return the number of rows updated */ public int updateJobData(Connection conn, JobDetail job) throws IOException, SQLException { //log.debug( "Updating Job Data for Job " + job ); ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); int len = baos.toByteArray().length; ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); ps.setBinaryStream(1, bais, len); ps.setString(2, job.getName()); ps.setString(3, job.getGroup()); return ps.executeUpdate(); } finally { closeStatement(ps); } }