Example usage for org.hibernate.spatial.dialect.postgis PostgisDialect PostgisDialect

List of usage examples for org.hibernate.spatial.dialect.postgis PostgisDialect PostgisDialect

Introduction

In this page you can find the example usage for org.hibernate.spatial.dialect.postgis PostgisDialect PostgisDialect.

Prototype

PostgisDialect

Source Link

Usage

From source file:org.n52.sos.ds.datasource.AbstractPostgresDatasource.java

License:Open Source License

@Override
protected Dialect createDialect() {
    return new PostgisDialect();
}

From source file:org.n52.sos.SQLScriptGenerator.java

License:Open Source License

private Dialect getDialect(int selection) throws Exception {
    switch (selection) {
    case 1://from w  w  w . ja  va  2 s .  c  o m
        return new PostgisDialect();
    case 2:
        try {
            return new OracleSpatial10gDialect();
        } catch (ExceptionInInitializerError eiie) {
            printToScreen("The Oracle JDBC driver is missing!");
            printToScreen(
                    "To execute the SQL script generator for Oracle you have to uncomment the dependency in the pom.xml.");
            printToScreen("If the Oracle JDBC driver is not installed in your local Maven repository, ");
            printToScreen("follow the first steps describes here: ");
            printToScreen(
                    "https://wiki.52north.org/bin/view/SensorWeb/SensorObservationServiceIVDocumentation#Oracle_support.");
            throw new MissingDriverException();
        }

    case 3:
        return new GeoDBDialect();
    case 4:
        return new MySQLSpatial5InnoDBDialect();
    case 5:
        return new SqlServer2008SpatialDialect();
    default:
        throw new Exception("The entered value is invalid!");
    }
}