@Override public void updateTrigger(final Trigger t) throws TriggerLoaderException { logger.info("Updating trigger " + t.getTriggerId() + " into db."); t.setLastModifyTime(System.currentTimeMillis()); updateTrigger(t, this.defaultEncodingType); }
@Override public synchronized void updateTrigger(final Trigger t) throws TriggerLoaderException { t.setLastModifyTime(System.currentTimeMillis()); this.triggers.put(t.getTriggerId(), t); }
@Override public synchronized void addTrigger(final Trigger t) throws TriggerLoaderException { t.setTriggerId(this.triggerCount); t.setLastModifyTime(System.currentTimeMillis()); this.triggers.put(t.getTriggerId(), t); this.triggerCount++; }
@Override public void updateTrigger(final Trigger t) throws TriggerLoaderException { logger.info("Updating trigger " + t.getTriggerId() + " into db."); t.setLastModifyTime(System.currentTimeMillis()); updateTrigger(t, this.defaultEncodingType); }
@Override public void addTrigger(Trigger t) throws TriggerLoaderException { logger.info("Inserting trigger " + t.toString() + " into db."); t.setLastModifyTime(System.currentTimeMillis()); Connection connection = getConnection(); try { addTrigger(connection, t, defaultEncodingType); } catch (Exception e) { throw new TriggerLoaderException("Error uploading trigger", e); } finally { DbUtils.closeQuietly(connection); } }
@Override public void updateTrigger(Trigger t) throws TriggerLoaderException { logger.info("Updating trigger " + t.getTriggerId() + " into db."); t.setLastModifyTime(System.currentTimeMillis()); Connection connection = getConnection(); try{ updateTrigger(connection, t, defaultEncodingType); } catch(Exception e) { e.printStackTrace(); throw new TriggerLoaderException("Failed to update trigger " + t.toString() + " into db!"); } finally { DbUtils.closeQuietly(connection); } }