(no commit message)
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / database / ICdmDataSource.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;
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
23 */
24 public BeanDefinition getDatasourceBean();
25
26 /**
27 * @param hbm2dll
28 * @param showSql
29 * @return
30 */
31 public BeanDefinition getHibernatePropertiesBean(DbSchemaValidation hbm2dll);
32
33 /**
34 * @param hbm2dll
35 * @param showSql
36 * @return
37 */
38 public BeanDefinition getHibernatePropertiesBean(DbSchemaValidation hbm2dll, Boolean showSql, Boolean formatSql, Class<? extends CacheProvider> cacheProviderClass);
39
40
41 /**
42 * @param hbm2dll
43 * @param showSql
44 * @return
45 */
46 public String getName();
47
48 }