KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > setup > config > HibernateConfig


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.setup.config;
10
11
12 import org.w3c.dom.Element JavaDoc;
13 import org.jboss.portal.setup.PortalSetupException;
14
15 import java.util.Properties JavaDoc;
16 import java.util.List JavaDoc;
17
18 /**
19  * @author <a HREF="mailto:palber@novell.com">Polina Alber</a>
20  * Date: Apr 13, 2005; Time: 12:30:31 PM
21  * @since JBoss portal 2.0
22  * Interface org.jboss.portal.setup.config.HibernateConfig is an
23  * abstraction of hibernate configuration used to setup a portal
24  */

25 public interface HibernateConfig extends Configuration
26 {
27
28
29    /**
30     * @param dbConfig an instance of DbAccessConfig service
31     */

32    void setDbAccessConfig(DbAccessConfig dbConfig);
33
34    /**
35     * @return database access configuration
36     */

37    DbAccessConfig getDbAccessConfig();
38
39
40    /**
41     * @param classesElmt an XML elemnt that defines schema classes
42     * to use for hibernate configuration, session builder setup.
43     */

44    void setSchemaClasses(Element JavaDoc classesElmt);
45
46    /**
47     * @return n XML elemnt that defines schema classes
48     * to use for hibernate configuration, session builder setup.
49     */

50    Element JavaDoc getSchemaClasses();
51
52    /**
53     * @param cacheProvider a hibernate cache provider class name
54     */

55    void setCacheProvider(String JavaDoc cacheProvider);
56
57    /**
58     * @return a cache provider class name
59     */

60    String JavaDoc getCacheProvider();
61
62
63    /**
64     * @return hibernate dialect class name
65     */

66    String JavaDoc getHibernateDialect() throws PortalSetupException;
67
68    /**
69     * @param dialectClassName - hibernate dialect class name
70     */

71    void setHibernateDialect(String JavaDoc dialectClassName);
72
73    /**
74     * @return a set of hibernate configuration propertiies
75     * @see net.sf.hibernate.cfg.Configuration
76     */

77    Properties JavaDoc getHibernateProperties() throws PortalSetupException;
78
79    /**
80     * @param props a set of hibernate configuration properties
81     * @see net.sf.hibernate.cfg.Configuration
82     */

83    void setHibernateProperties(Properties JavaDoc props);
84
85    /**
86     * @param key a property name to be added to a set of hibernate configuration properties
87     * @param value a proverty value to be added to a set of hibernate configuration properties
88     * @see net.sf.hibernate.cfg.Configuration
89     */

90    void addPropery(String JavaDoc key, String JavaDoc value);
91
92    void setSchemaClasses(List JavaDoc classes);
93
94    void addSchemaClass(Class JavaDoc schemaClass);
95
96    List JavaDoc getSchemaClassesList();
97 }
98
Popular Tags