(no commit message)
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / database / types / SybaseDatabaseType.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9
10 package eu.etaxonomy.cdm.database.types;
11
12 import eu.etaxonomy.cdm.database.ICdmDataSource;
13
14
15 /**
16 * !! UNTESTED !!
17 * @author a.mueller
18 *
19 */
20 public class SybaseDatabaseType extends DatabaseTypeBase {
21
22 //typeName
23 protected String typeName = "Sybase";
24 //class
25 protected String classString = "com.sybase.jdbc2.jdbc.SybDriver";
26 //url
27 protected String urlString = "jdbc:sybase:Tds:";
28 //port
29 private int defaultPort = 4100;
30 //hibernate dialect
31 private String hibernateDialect = "SybaseDialect";
32
33
34 //connection String
35 public String getConnectionString(ICdmDataSource ds, int port){
36 return urlString + ds.getServer()+ ":" + port + "/" + ds.getDatabase();
37 }
38
39 public SybaseDatabaseType() {
40 init (typeName, classString, urlString, defaultPort, hibernateDialect );
41 }
42
43
44
45
46 }