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;
|
11
|
|
12
|
import org.hibernate.cache.CacheProvider;
|
13
|
import org.springframework.beans.factory.config.BeanDefinition;
|
14
|
|
15
|
import eu.etaxonomy.cdm.database.DbSchemaValidation;
|
16
|
|
17
|
public interface ICdmDataSource {
|
18
|
|
19
|
/**
|
20
|
* Returns a BeanDefinition object of type DriverManagerDataSource that contains
|
21
|
* datsource properties (url, username, password, ...)
|
22
|
* @return BeanDefinition
|
23
|
*/
|
24
|
public BeanDefinition getDatasourceBean();
|
25
|
|
26
|
/**
|
27
|
* @param hbm2dll
|
28
|
* @return BeanDefinition
|
29
|
*/
|
30
|
public BeanDefinition getHibernatePropertiesBean(DbSchemaValidation hbm2dll);
|
31
|
|
32
|
/**
|
33
|
* @param hbm2dll
|
34
|
* @param showSql
|
35
|
* @param formatSql
|
36
|
* @param cacheProviderClass
|
37
|
* @return BeanDefinition
|
38
|
*/
|
39
|
public BeanDefinition getHibernatePropertiesBean(DbSchemaValidation hbm2dll, Boolean showSql, Boolean formatSql, Class<? extends CacheProvider> cacheProviderClass);
|
40
|
|
41
|
|
42
|
/**
|
43
|
* The name representation of thie Datasource
|
44
|
* @return
|
45
|
*/
|
46
|
public String getName();
|
47
|
|
48
|
|
49
|
/**
|
50
|
* @return
|
51
|
*/
|
52
|
public String getServer();
|
53
|
|
54
|
/**
|
55
|
* @return
|
56
|
*/
|
57
|
public String getDatabase();
|
58
|
|
59
|
public DatabaseTypeEnum getDatabaseType();
|
60
|
|
61
|
/**
|
62
|
* @return
|
63
|
*/
|
64
|
public int getPort();
|
65
|
|
66
|
/**
|
67
|
* @return
|
68
|
*/
|
69
|
public String getFilePath();
|
70
|
|
71
|
/**
|
72
|
* @return
|
73
|
*/
|
74
|
public H2Mode getMode();
|
75
|
//
|
76
|
// public void setFilePath(String filePath);
|
77
|
//
|
78
|
// public void setMode(H2Mode mode);
|
79
|
|
80
|
}
|