Search in sources :

Example 6 with AnnotationConfiguration

use of org.hibernate.cfg.AnnotationConfiguration in project onebusaway-application-modules by camsys.

the class UserReportingDaoImplTest method setup.

@Before
public void setup() throws IOException {
    _dao = new UserReportingDaoImpl();
    Configuration config = new AnnotationConfiguration();
    config = config.configure("org/onebusaway/transit_data_federation/hibernate-configuration.xml");
    _sessionFactory = config.buildSessionFactory();
    _dao.setSessionFactory(_sessionFactory);
}
Also used : AnnotationConfiguration(org.hibernate.cfg.AnnotationConfiguration) Configuration(org.hibernate.cfg.Configuration) AnnotationConfiguration(org.hibernate.cfg.AnnotationConfiguration) Before(org.junit.Before)

Example 7 with AnnotationConfiguration

use of org.hibernate.cfg.AnnotationConfiguration in project onebusaway-application-modules by camsys.

the class UserDaoImplTest method setup.

@Before
public void setup() throws IOException {
    Configuration config = new AnnotationConfiguration();
    config = config.configure("org/onebusaway/users/hibernate-configuration.xml");
    _sessionFactory = config.buildSessionFactory();
    _dao = new UserDaoImpl();
    _dao.setSessionFactory(_sessionFactory);
}
Also used : AnnotationConfiguration(org.hibernate.cfg.AnnotationConfiguration) Configuration(org.hibernate.cfg.Configuration) AnnotationConfiguration(org.hibernate.cfg.AnnotationConfiguration) Before(org.junit.Before)

Aggregations

AnnotationConfiguration (org.hibernate.cfg.AnnotationConfiguration)7 Configuration (org.hibernate.cfg.Configuration)5 Before (org.junit.Before)3 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)2 File (java.io.File)1 InputStream (java.io.InputStream)1 Properties (java.util.Properties)1 JDBCMetaDataConfiguration (org.hibernate.cfg.JDBCMetaDataConfiguration)1 Ejb3Configuration (org.hibernate.ejb.Ejb3Configuration)1 IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)1 BeforeClass (org.junit.BeforeClass)1 Test (org.junit.Test)1