@Test public void testSave(){ JobConfig config = new JobConfig(); config.setJobId(1L); config.setMisfire(Boolean.TRUE); config.setShardCount(4); config.setShardParams("0=0;1=1;2=2;3=3"); assertTrue(jobConfigManager.save(config)); }
public Boolean save(JobConfig config){ if (jobConfigDao.save(config)){ if (jobConfigDao.bindJob(config.getJobId(), config.getId())){ return Boolean.TRUE; } else { jobConfigDao.delete(config.getId()); } } return Boolean.FALSE; }
JobConfigManager { public Boolean save(JobConfig config){ if (jobConfigDao.save(config)){ if (jobConfigDao.bindJob(config.getJobId(), config.getId())){ return Boolean.TRUE; } else { jobConfigDao.delete(config.getId()); } } return Boolean.FALSE; } }
JobConfigManager { public Boolean save(JobConfig config){ if (jobConfigDao.save(config)){ if (jobConfigDao.bindJob(config.getJobId(), config.getId())){ return Boolean.TRUE; } else { jobConfigDao.delete(config.getId()); } } return Boolean.FALSE; }  }
JobConfigManager { public Boolean save(JobConfig config){ if (jobConfigDao.save(config)){ if (jobConfigDao.bindJob(config.getJobId(), config.getId())){ return Boolean.TRUE; } else { jobConfigDao.delete(config.getId()); } } return Boolean.FALSE; }  Boolean save(JobConfig config); Boolean delete(Long jobConfigId); Boolean delete(JobConfig cfg); Boolean deleteByJobId(Long jobId); }
JobConfigManager { public Boolean save(JobConfig config){ if (jobConfigDao.save(config)){ if (jobConfigDao.bindJob(config.getJobId(), config.getId())){ return Boolean.TRUE; } else { jobConfigDao.delete(config.getId()); } } return Boolean.FALSE; }  Boolean save(JobConfig config); Boolean delete(Long jobConfigId); Boolean delete(JobConfig cfg); Boolean deleteByJobId(Long jobId);  }