use of org.hibernate.cfg.AnnotationConfiguration in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newAnnotationConfiguration.
@Override
public IConfiguration newAnnotationConfiguration() {
getUsageTracker().trackNewConfigurationEvent(HIBERNATE_VERSION);
Configuration configuration = new AnnotationConfiguration();
return facadeFactory.createConfiguration(configuration);
}
use of org.hibernate.cfg.AnnotationConfiguration in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewAnnotationConfiguration.
@Test
public void testNewAnnotationConfiguration() {
IConfiguration configuration = service.newAnnotationConfiguration();
Assert.assertNotNull(configuration);
Object target = ((IFacade) configuration).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof AnnotationConfiguration);
}
use of org.hibernate.cfg.AnnotationConfiguration in project onebusaway-application-modules by camsys.
the class DatabaseCachingGeocoderImplTest method setup.
@Before
public void setup() {
Configuration config = new AnnotationConfiguration();
config = config.configure("org/onebusaway/geocoder/impl/hibernate-configuration.xml");
_sessionFactory = config.buildSessionFactory();
}
use of org.hibernate.cfg.AnnotationConfiguration in project selenium_java by sergueik.
the class HibernateUtil method getConfig.
private static Configuration getConfig(final Properties extraProperties) throws HibernateException {
LOGGER.log(Level.INFO, Messages.HibernateUtil_LoadConfig());
final Configuration config = new AnnotationConfiguration().configure();
if ((extraProperties != null) && !extraProperties.isEmpty()) {
LOGGER.log(Level.FINE, Messages.HibernateUtil_SettingExtraProps());
LOGGER.log(Level.FINE, extraProperties.toString());
config.addProperties(extraProperties);
}
return config;
}
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);
}
Aggregations