Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba
Class HibernateSFManager

    java.lang.Object
      org.makumba.HibernateSFManager

    public class HibernateSFManager

extends Object

Hibernate Session Factory Manager: handles the configuration and generation of the Hibernate sessionFactory used by Makumba.
Additional settings can be provided in the configuration file (databaseName.cfg.xml), such as:

- makumba.seed: the name of the seed file, used to locate the root folder of where makumba should place the generated mappings and classes
- prefix: the prefix of all the makumba generated mappings (i.e. the name of the folder where they will be stored, also used as package name)
- makumba.mdd.root: the name of the folder in which the MDDs of the webapp are located. If none is provided, the default value is "dataDefinitions".
- makumba.mdd.list: a comma-separated list of MDDs that should be used. If none is provided, makumba will use all the MDDs in the root folder, if there are.
- makumba.mdd.additionalList: a comma-separated list of MDDs that should be used in addition to all MDDs found in the root folder. if none is provided, makumba will use all the MDDs in the root folder, if there are.
- schemaUpdate: indicates whether makumba should do a schema update with the session factory.

Other Hibernate settings are available at:

- http://www.hibernate.org/hib_docs/reference/en/html/configuration-hibernatejdbc.html
- http://www.hibernate.org/hib_docs/reference/en/html/configuration-optional.html

Additionaly, it is possible to:

- Add external mapping resources by providing a Vector containing the relative path to those resources (as one would do with Hibernate's Configuration.addResource()) using the setExternalConfigurationResources() method
- Tell Makumba to use an already existing session factory using the setHibernateSessionFactory() method

Version:
  $Id: HibernateSFManager.java 3575 2009-01-05 20:36:12Z manuel_gay $
Author:
  Manuel Gay, Rudolf Mayer, Cristian Bogdan

Field Summary
`static int` | `sessionFactories`

Constructor Summary
`HibernateSFManager()`

Method Summary
`static String` | `findClassesRootFolder(String locatorSeed)`
`static org.hibernate.cfg.Configuration` | `getConfiguration(String cfgFilePath)`
`static org.hibernate.cfg.Configuration` | `getConfiguredConfiguration()` Gets the Hibernate `Configuration` that was used to create the `SessionFactory`
`static String` | `getFullyQualifiedName(String className)`
`static Vector<String>` | `getGeneratedClasses()`
`static org.hibernate.SessionFactory` | `getSF()`
`static org.hibernate.SessionFactory` | `getSF(String dataSource)`
`static void` | `setExternalConfigurationResources(Vector<String> resources)` Sets additional resources to be included in the Configuration and used at `SessionFactory` creation time.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sessionFactories

    public static int sessionFactories

Constructor Detail

### HibernateSFManager

    public HibernateSFManager()

Method Detail

### findClassesRootFolder

    public static String findClassesRootFolder(String locatorSeed)

### getSF

    public static org.hibernate.SessionFactory getSF(String dataSource)

### getSF

    public static org.hibernate.SessionFactory getSF()

### getConfiguration

    public static org.hibernate.cfg.Configuration getConfiguration(String cfgFilePath)

### getConfiguredConfiguration

    public static org.hibernate.cfg.Configuration getConfiguredConfiguration()

  Gets the Hibernate `Configuration` that was used to create the `SessionFactory`

  Returns:

### setExternalConfigurationResources

    public static void setExternalConfigurationResources(Vector<String> resources)

  Sets additional resources to be included in the Configuration and used at `SessionFactory` creation time.

  Parameters:
    `resources` - a Vector of String containing the relative path to the additional mapping resources

### getFullyQualifiedName

    public static String getFullyQualifiedName(String className)

### getGeneratedClasses

    public static Vector<String> getGeneratedClasses()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20