use of org.hibernate.cfg.Configuration in project API by ca-cwds.
the class ReferralClientDaoIT method setup.
@Override
@Before
public void setup() {
sessionFactory = new Configuration().configure().buildSessionFactory();
sessionFactory.getCurrentSession().beginTransaction();
referralClientDao = new ReferralClientDao(sessionFactory);
}
use of org.hibernate.cfg.Configuration in project API by ca-cwds.
the class StaffPersonDaoIT method beforeClass.
@SuppressWarnings("javadoc")
@BeforeClass
public static void beforeClass() {
sessionFactory = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
staffPersonDao = new StaffPersonDao(sessionFactory);
}
use of org.hibernate.cfg.Configuration in project API by ca-cwds.
the class PhoneNumberDaoIT method beforeClass.
@SuppressWarnings("javadoc")
@BeforeClass
public static void beforeClass() {
sessionFactory = new Configuration().configure("ns-hibernate.cfg.xml").buildSessionFactory();
phoneDao = new PhoneNumberDao(sessionFactory);
}
use of org.hibernate.cfg.Configuration in project API by ca-cwds.
the class AddressDaoIT method beforeClass.
@SuppressWarnings("javadoc")
@BeforeClass
public static void beforeClass() {
sessionFactory = new Configuration().configure("ns-hibernate.cfg.xml").buildSessionFactory();
addressDao = new AddressDao(sessionFactory);
}
use of org.hibernate.cfg.Configuration in project ignite by apache.
the class CacheHibernateStoreSessionListenerSelfTest method sessionListenerFactory.
/**
* {@inheritDoc}
*/
@Override
protected Factory<CacheStoreSessionListener> sessionListenerFactory() {
return new Factory<CacheStoreSessionListener>() {
@Override
public CacheStoreSessionListener create() {
CacheHibernateStoreSessionListener lsnr = new CacheHibernateStoreSessionListener();
SessionFactory sesFactory = new Configuration().setProperty("hibernate.connection.url", URL).addAnnotatedClass(Table1.class).addAnnotatedClass(Table2.class).buildSessionFactory();
lsnr.setSessionFactory(sesFactory);
return lsnr;
}
};
}
Aggregations