Java 类org.hibernate.spatial.dialect.h2geodb.GeoDBDialect 实例源码

项目:i52n-sos    文件:TestDataConfiguratorInitializedListener.java   
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);
}
项目:oma-riista-web    文件:JPAConfig.java   
@Override
public String getDatabasePlatform() {
    return GeoDBDialect.class.getCanonicalName();
}