private SessionFactory getSessionFactory() {
Configuration cfg = new Configuration();
cfg.addAnnotatedClass( Author.class );
cfg.addAnnotatedClass( Book.class );
cfg.addProperties( getHibernateProperties() );
return cfg.buildSessionFactory();
}
private Properties getHibernateProperties() {
Properties properties = scenario.getHibernateProperties();
setDefaultProperty( properties, "hibernate.dialect", "org.hibernate.dialect.H2Dialect" );