JdbcTriggerImpl implements TriggerLoader { @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); } @Inject  JdbcTriggerImpl(final DatabaseOperator databaseOperator); @Override List<Trigger> getUpdatedTriggers(final long lastUpdateTime); @Override List<Trigger> loadTriggers(); @Override void removeTrigger(final Trigger t); @Override synchronized void addTrigger(final Trigger t); @Override void updateTrigger(final Trigger t); @Override Trigger loadTrigger(final int triggerId);  }
@Test public void testUpdateTrigger() throws Exception { final Trigger t1 = createTrigger("testProj1", "testFlow1", "source1"); t1.setResetOnExpire(true); this.loader.addTrigger(t1); List<Trigger> ts = this.loader.loadTriggers(); assertTrue(ts.get(0).isResetOnExpire() == true); t1.setResetOnExpire(false); this.loader.updateTrigger(t1); ts = this.loader.loadTriggers(); assertTrue(ts.get(0).isResetOnExpire() == false); }