/** * <p> * Update a calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows updated * @throws IOException * if there were problems serializing the calendar */ public int updateCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_CALENDAR)); setBytes(ps, 1, baos); ps.setString(2, calendarName); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Update a calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows updated * @throws IOException * if there were problems serializing the calendar */ public int updateCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_CALENDAR)); setBytes(ps, 1, baos); ps.setString(2, calendarName); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Insert a new calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows inserted * @throws IOException * if there were problems serializing the calendar */ public int insertCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_CALENDAR)); ps.setString(1, calendarName); setBytes(ps, 2, baos); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Insert a new calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows inserted * @throws IOException * if there were problems serializing the calendar */ public int insertCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_CALENDAR)); ps.setString(1, calendarName); setBytes(ps, 2, baos); 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 { ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); setBytes(ps, 1, baos); 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 { ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); setBytes(ps, 1, baos); ps.setString(2, job.getKey().getName()); ps.setString(3, job.getKey().getGroup()); return ps.executeUpdate(); } finally { closeStatement(ps); } }
ps.setString(12, trigger.getCalendarName()); ps.setInt(13, trigger.getMisfireInstruction()); setBytes(ps, 14, baos); ps.setInt(15, trigger.getPriority());
ps.setString(12, trigger.getCalendarName()); ps.setInt(13, trigger.getMisfireInstruction()); setBytes(ps, 14, baos); ps.setInt(15, trigger.getPriority());
setBoolean(ps, 5, job.isPersistJobDataAfterExecution()); setBoolean(ps, 6, job.requestsRecovery()); setBytes(ps, 7, baos); ps.setString(8, job.getKey().getName()); ps.setString(9, job.getKey().getGroup());
setBytes(ps, 13, baos); ps.setString(14, trigger.getKey().getName()); ps.setString(15, trigger.getKey().getGroup());
setBytes(ps, 13, baos); ps.setString(14, trigger.getKey().getName()); ps.setString(15, trigger.getKey().getGroup());
setBoolean(ps, 7, job.isPersistJobDataAfterExecution()); setBoolean(ps, 8, job.requestsRecovery()); setBytes(ps, 9, baos);
setBoolean(ps, 7, job.isPersistJobDataAfterExecution()); setBoolean(ps, 8, job.requestsRecovery()); setBytes(ps, 9, baos);
setBoolean(ps, 5, job.isPersistJobDataAfterExecution()); setBoolean(ps, 6, job.requestsRecovery()); setBytes(ps, 7, baos); ps.setString(8, job.getKey().getName()); ps.setString(9, job.getKey().getGroup());
/** * <p> * Insert a new calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows inserted * @throws IOException * if there were problems serializing the calendar */ public int insertCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_CALENDAR)); ps.setString(1, calendarName); setBytes(ps, 2, baos); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Update a calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows updated * @throws IOException * if there were problems serializing the calendar */ public int updateCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_CALENDAR)); setBytes(ps, 1, baos); ps.setString(2, calendarName); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Update a calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows updated * @throws IOException * if there were problems serializing the calendar */ public int updateCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_CALENDAR)); setBytes(ps, 1, baos); ps.setString(2, calendarName); return ps.executeUpdate(); } finally { closeStatement(ps); } }
/** * <p> * Insert a new calendar. * </p> * * @param conn * the DB Connection * @param calendarName * the name for the new calendar * @param calendar * the calendar * @return the number of rows inserted * @throws IOException * if there were problems serializing the calendar */ public int insertCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException { ByteArrayOutputStream baos = serializeObject(calendar); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_CALENDAR)); ps.setString(1, calendarName); setBytes(ps, 2, baos); 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 { ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); setBytes(ps, 1, baos); 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 { ByteArrayOutputStream baos = serializeJobData(job.getJobDataMap()); PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_JOB_DATA)); setBytes(ps, 1, baos); ps.setString(2, job.getName()); ps.setString(3, job.getGroup()); return ps.executeUpdate(); } finally { closeStatement(ps); } }