protected String getSchemaVersionString(String bundleSymbolicName) {
    Release release = _releaseLocalService.fetchRelease(bundleSymbolicName);

    if ((release == null) || Validator.isNull(release.getSchemaVersion())) {
      return "0.0.0";
    }

    return release.getSchemaVersion();
  }
Ejemplo n.º 2
0
  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);
    }
  }
Ejemplo n.º 3
0
  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);
    }
  }