private boolean isAutoInsertGeoDB() throws OwsExceptionReport{ HibernateSessionHolder sessionHolder = new HibernateSessionHolder(); Session session = sessionHolder.getSession(); Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect(); Properties props = ((SessionFactoryImplementor) session.getSessionFactory()).getProperties(); String url = null; Object urlObject = props.get(HIBERNATE_CONNECTION_URL); if (urlObject != null && urlObject instanceof String){ url = (String) urlObject; } sessionHolder.returnSession(session); return dialect != null & url != null && dialect instanceof GeoDBDialect && url.startsWith(AUTO_INSERT_H2_URL); }
@Override public String getDatabasePlatform() { return GeoDBDialect.class.getCanonicalName(); }