Search in sources :

Example 61 with Configuration

use of org.hibernate.cfg.Configuration in project API by ca-cwds.

the class AllegationPerpetratorHistoryDaoIT method setup.

/**
   * 
   */
@Override
@Before
public void setup() {
    sessionFactory = new Configuration().configure().buildSessionFactory();
    sessionFactory.getCurrentSession().beginTransaction();
    allegationPerpetratorHistoryDao = new AllegationPerpetratorHistoryDao(sessionFactory);
}
Also used : Configuration(org.hibernate.cfg.Configuration) Before(org.junit.Before)

Example 62 with Configuration

use of org.hibernate.cfg.Configuration in project API by ca-cwds.

the class ChildClientDaoIT method setup.

@Override
@Before
public void setup() {
    sessionFactory = new Configuration().configure().buildSessionFactory();
    sessionFactory.getCurrentSession().beginTransaction();
    childClientDao = new ChildClientDao(sessionFactory);
}
Also used : Configuration(org.hibernate.cfg.Configuration) Before(org.junit.Before)

Example 63 with Configuration

use of org.hibernate.cfg.Configuration in project API by ca-cwds.

the class CountyOwnershipDaoIT method setup.

/**
   * 
   */
@Override
@Before
public void setup() {
    sessionFactory = new Configuration().configure().buildSessionFactory();
    sessionFactory.getCurrentSession().beginTransaction();
    countyOwnershipDao = new CountyOwnershipDao(sessionFactory);
}
Also used : Configuration(org.hibernate.cfg.Configuration) Before(org.junit.Before)

Example 64 with Configuration

use of org.hibernate.cfg.Configuration in project API by ca-cwds.

the class CountyTriggerDaoIT method setup.

/**
   * 
   */
@Override
@Before
public void setup() {
    sessionFactory = new Configuration().configure().buildSessionFactory();
    sessionFactory.getCurrentSession().beginTransaction();
    countyTriggerDao = new CountyTriggerDao(sessionFactory);
}
Also used : Configuration(org.hibernate.cfg.Configuration) Before(org.junit.Before)

Example 65 with Configuration

use of org.hibernate.cfg.Configuration in project API by ca-cwds.

the class RaceDaoIT method beforeClass.

@SuppressWarnings("javadoc")
@BeforeClass
public static void beforeClass() {
    sessionFactory = new Configuration().configure("ns-hibernate.cfg.xml").buildSessionFactory();
    raceDao = new RaceDao(sessionFactory);
}
Also used : Configuration(org.hibernate.cfg.Configuration) BeforeClass(org.junit.BeforeClass)

Aggregations

Configuration (org.hibernate.cfg.Configuration)190 Test (org.junit.Test)66 Session (org.hibernate.Session)37 SessionFactory (org.hibernate.SessionFactory)35 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)27 Before (org.junit.Before)20 BeforeClass (org.junit.BeforeClass)20 File (java.io.File)18 ServiceRegistry (org.hibernate.service.ServiceRegistry)14 Properties (java.util.Properties)13 StandardServiceRegistryBuilder (org.hibernate.boot.registry.StandardServiceRegistryBuilder)9 HibernateException (org.hibernate.HibernateException)8 EncapsulatedCompositeIdResultSetProcessorTest (org.hibernate.test.loadplans.process.EncapsulatedCompositeIdResultSetProcessorTest)8 MappingException (org.hibernate.MappingException)7 Transaction (org.hibernate.Transaction)7 URL (java.net.URL)6 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)6 TestForIssue (org.hibernate.testing.TestForIssue)6 EntityTuplizer (org.hibernate.tuple.entity.EntityTuplizer)6 BigDecimal (java.math.BigDecimal)5