protected String getSchemaVersionString(String bundleSymbolicName) { Release release = _releaseLocalService.fetchRelease(bundleSymbolicName); if ((release == null) || Validator.isNull(release.getSchemaVersion())) { return "0.0.0"; } return release.getSchemaVersion(); }
protected long readTimeHibernate() { Session session = _sessionFactory.openSession(); try { Release release = (Release) session.get(ReleaseImpl.class, 1L); Date date = release.getModifiedDate(); return date.getTime(); } finally { _sessionFactory.closeSession(session); } }
protected void writeTimeHibernate(long time) { Session session = _sessionFactory.openSession(); try { Release release = (Release) session.get(ReleaseImpl.class, 1L); release.setModifiedDate(new Timestamp(time)); session.saveOrUpdate(release); session.flush(); session.clear(); } finally { _sessionFactory.closeSession(session); } }