use of org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method setupFooBarPersister.
private ClassMetadata setupFooBarPersister() {
StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
builder.applySetting(AvailableSettings.DIALECT, MockDialect.class.getName());
StandardServiceRegistry serviceRegistry = builder.build();
MetadataBuildingOptionsImpl metadataBuildingOptions = new MetadataBuildingOptionsImpl(serviceRegistry);
BootstrapContextImpl bootstrapContext = new BootstrapContextImpl(serviceRegistry, metadataBuildingOptions);
metadataBuildingOptions.setBootstrapContext(bootstrapContext);
InFlightMetadataCollector inFlightMetadataCollector = new InFlightMetadataCollectorImpl(bootstrapContext, metadataBuildingOptions);
MetadataBuildingContext metadataBuildingContext = new MetadataBuildingContextRootImpl(bootstrapContext, metadataBuildingOptions, inFlightMetadataCollector);
AbstractEntityPersister result = new TestEntityPersister(createPersistentClass(metadataBuildingContext), createPersisterCreationContext(serviceRegistry, bootstrapContext));
return result;
}
use of org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl in project jbosstools-hibernate by jbosstools.
the class ColumnFacadeTest method createMetadataBuildingContext.
private MetadataBuildingContext createMetadataBuildingContext() {
StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
builder.applySetting(AvailableSettings.DIALECT, MockDialect.class.getName());
StandardServiceRegistry serviceRegistry = builder.build();
MetadataBuildingOptionsImpl metadataBuildingOptions = new MetadataBuildingOptionsImpl(serviceRegistry);
BootstrapContextImpl bootstrapContext = new BootstrapContextImpl(serviceRegistry, metadataBuildingOptions);
metadataBuildingOptions.setBootstrapContext(bootstrapContext);
InFlightMetadataCollector inFlightMetadataCollector = new InFlightMetadataCollectorImpl(bootstrapContext, metadataBuildingOptions);
return new MetadataBuildingContextRootImpl(bootstrapContext, metadataBuildingOptions, inFlightMetadataCollector);
}
use of org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl in project jbosstools-hibernate by jbosstools.
the class DummyMetadataImplementor method createInstance.
private static MetadataImplementor createInstance() {
try {
StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder();
ssrb.applySetting("hibernate.dialect", DummyDialect.class.getName());
return new InFlightMetadataCollectorImpl(new MetadataBuildingOptionsImpl(ssrb.build()), new TypeResolver());
} catch (Throwable t) {
t.printStackTrace();
return null;
}
}
use of org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method setupFooBarPersister.
private ClassMetadata setupFooBarPersister() {
StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
builder.applySetting(AvailableSettings.DIALECT, MockDialect.class.getName());
builder.applySetting(AvailableSettings.CONNECTION_PROVIDER, MockConnectionProvider.class.getName());
StandardServiceRegistry serviceRegistry = builder.build();
MetadataBuildingOptionsImpl metadataBuildingOptions = new MetadataBuildingOptionsImpl(serviceRegistry);
BootstrapContextImpl bootstrapContext = new BootstrapContextImpl(serviceRegistry, metadataBuildingOptions);
metadataBuildingOptions.setBootstrapContext(bootstrapContext);
InFlightMetadataCollector inFlightMetadataCollector = new InFlightMetadataCollectorImpl(bootstrapContext, metadataBuildingOptions);
MetadataBuildingContext metadataBuildingContext = new MetadataBuildingContextRootImpl(bootstrapContext, metadataBuildingOptions, inFlightMetadataCollector);
AbstractEntityPersister result = new TestEntityPersister(createPersistentClass(metadataBuildingContext), createPersisterCreationContext(serviceRegistry, bootstrapContext));
return result;
}
Aggregations