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 SqlServer2005DatabaseType
extends DatabaseTypeBase
{
22 protected String typeName
= "SQL Server";
25 protected String classString
= "com.microsoft.sqlserver.jdbc.SQLServerDriver";
28 protected String urlString
= "jdbc:sqlserver://";
30 //[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
33 private int defaultPort
= 1433;
36 private String hibernateDialect
= "SQLServerDialect";
38 public String
getConnectionString(ICdmDataSource ds
, int port
){
39 return getConnectionString(ds
, port
, null);
42 public String
getConnectionString(ICdmDataSource ds
, int port
, String instanceName
){
44 if (instanceName
!= null && ! instanceName
.equals("")){
45 instance
= "\\" + instanceName
;
47 return urlString
+ ds
.getServer() + instance
+ ":" + port
+ ";databaseName=" + ds
.getDatabase() +";SelectMethod=cursor";
51 public SqlServer2005DatabaseType() {
52 init (typeName
, classString
, urlString
, defaultPort
, hibernateDialect
);