public static void pluginInsertNew(String pluginId) { PluginDataVersionDao dao = Services.getServices().getDbi().open(PluginDataVersionDao.class); dao.insert(pluginId, 0); Services.getServices().getDbi().close(dao); }
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); }
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()); }