1
|
/**
|
2
|
* Copyright (C) 2015 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
|
package org.unitils.orm.hibernate;
|
10
|
|
11
|
import org.hibernate.SessionFactory;
|
12
|
import org.hibernate.cfg.Configuration;
|
13
|
import org.unitils.orm.common.util.OrmConfig;
|
14
|
import org.unitils.orm.common.util.OrmPersistenceUnitLoader;
|
15
|
import org.unitils.orm.hibernate.util.Hibernate5SessionFactoryLoader;
|
16
|
|
17
|
/**
|
18
|
* @author a.mueller
|
19
|
\* @since 03.11.2015
|
20
|
*
|
21
|
*/
|
22
|
public class Hibernate5Module extends HibernateModule {
|
23
|
|
24
|
@Override
|
25
|
protected OrmPersistenceUnitLoader<SessionFactory, Configuration, OrmConfig> createOrmPersistenceUnitLoader() {
|
26
|
return new Hibernate5SessionFactoryLoader(databaseName);
|
27
|
}
|
28
|
|
29
|
}
|