예제 #1
0
 public static void pluginInsertNew(String pluginId) {
   PluginDataVersionDao dao = Services.getServices().getDbi().open(PluginDataVersionDao.class);
   dao.insert(pluginId, 0);
   Services.getServices().getDbi().close(dao);
 }
예제 #2
0
 public static void pluginUpdate(String pluginId, Integer version) {
   PluginDataVersionDao dao = Services.getServices().getDbi().open(PluginDataVersionDao.class);
   dao.update(pluginId, version);
   Services.getServices().getDbi().close(dao);
 }
예제 #3
0
 public static Integer getPluginDataVersion(String pluginId) {
   PluginDataVersionDao dao = Services.getServices().getDbi().open(PluginDataVersionDao.class);
   DataVersion dataVersion = dao.findDataUpdateVersion(pluginId);
   Services.getServices().getDbi().close(dao);
   return (dataVersion == null ? null : dataVersion.getDataVersion());
 }