2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.database
.types
;
12 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
19 public class PostgreSQLDatabaseType
extends DatabaseTypeBase
{
22 protected String typeName
= "PostgreSQL";
24 protected String classString
= "org.postgresql.Driver";
26 protected String urlString
= "jdbc:postgresql://";
28 private int defaultPort
= 5432;
30 private String hibernateDialect
= "PostgreSQLDialect";
34 public String
getConnectionString(ICdmDataSource ds
, int port
){
35 return urlString
+ ds
.getServer() + ":" + port
+ "/" + ds
.getDatabase();
38 public PostgreSQLDatabaseType() {
39 init (typeName
, classString
, urlString
, defaultPort
, hibernateDialect
);