Search in sources :

Example 21 with MetadataBuildingOptionsImpl

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;
}
Also used : InFlightMetadataCollector(org.hibernate.boot.spi.InFlightMetadataCollector) StandardServiceRegistryBuilder(org.hibernate.boot.registry.StandardServiceRegistryBuilder) MetadataBuildingOptionsImpl(org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl) MockDialect(org.jboss.tools.hibernate.runtime.v_5_3.internal.util.MockDialect) InFlightMetadataCollectorImpl(org.hibernate.boot.internal.InFlightMetadataCollectorImpl) MetadataBuildingContext(org.hibernate.boot.spi.MetadataBuildingContext) BootstrapContextImpl(org.hibernate.boot.internal.BootstrapContextImpl) MetadataBuildingContextRootImpl(org.hibernate.boot.internal.MetadataBuildingContextRootImpl) AbstractEntityPersister(org.hibernate.persister.entity.AbstractEntityPersister) StandardServiceRegistry(org.hibernate.boot.registry.StandardServiceRegistry)

Example 22 with MetadataBuildingOptionsImpl

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);
}
Also used : InFlightMetadataCollector(org.hibernate.boot.spi.InFlightMetadataCollector) StandardServiceRegistryBuilder(org.hibernate.boot.registry.StandardServiceRegistryBuilder) MetadataBuildingOptionsImpl(org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl) MockDialect(org.jboss.tools.hibernate.runtime.v_5_3.internal.util.MockDialect) InFlightMetadataCollectorImpl(org.hibernate.boot.internal.InFlightMetadataCollectorImpl) BootstrapContextImpl(org.hibernate.boot.internal.BootstrapContextImpl) MetadataBuildingContextRootImpl(org.hibernate.boot.internal.MetadataBuildingContextRootImpl) StandardServiceRegistry(org.hibernate.boot.registry.StandardServiceRegistry)

Example 23 with MetadataBuildingOptionsImpl

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;
    }
}
Also used : StandardServiceRegistryBuilder(org.hibernate.boot.registry.StandardServiceRegistryBuilder) TypeResolver(org.hibernate.type.TypeResolver) MetadataBuildingOptionsImpl(org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl) InFlightMetadataCollectorImpl(org.hibernate.boot.internal.InFlightMetadataCollectorImpl)

Example 24 with MetadataBuildingOptionsImpl

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;
}
Also used : MockConnectionProvider(org.jboss.tools.hibernate.runtime.v_5_4.internal.util.MockConnectionProvider) InFlightMetadataCollector(org.hibernate.boot.spi.InFlightMetadataCollector) StandardServiceRegistryBuilder(org.hibernate.boot.registry.StandardServiceRegistryBuilder) MetadataBuildingOptionsImpl(org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl) MockDialect(org.jboss.tools.hibernate.runtime.v_5_4.internal.util.MockDialect) InFlightMetadataCollectorImpl(org.hibernate.boot.internal.InFlightMetadataCollectorImpl) MetadataBuildingContext(org.hibernate.boot.spi.MetadataBuildingContext) BootstrapContextImpl(org.hibernate.boot.internal.BootstrapContextImpl) MetadataBuildingContextRootImpl(org.hibernate.boot.internal.MetadataBuildingContextRootImpl) AbstractEntityPersister(org.hibernate.persister.entity.AbstractEntityPersister) StandardServiceRegistry(org.hibernate.boot.registry.StandardServiceRegistry)

Aggregations

InFlightMetadataCollectorImpl (org.hibernate.boot.internal.InFlightMetadataCollectorImpl)24 MetadataBuildingOptionsImpl (org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl)24 StandardServiceRegistryBuilder (org.hibernate.boot.registry.StandardServiceRegistryBuilder)24 MetadataBuildingContextRootImpl (org.hibernate.boot.internal.MetadataBuildingContextRootImpl)21 StandardServiceRegistry (org.hibernate.boot.registry.StandardServiceRegistry)21 InFlightMetadataCollector (org.hibernate.boot.spi.InFlightMetadataCollector)20 MetadataBuildingContext (org.hibernate.boot.spi.MetadataBuildingContext)16 BootstrapContextImpl (org.hibernate.boot.internal.BootstrapContextImpl)15 TypeResolver (org.hibernate.type.TypeResolver)9 MetadataSources (org.hibernate.boot.MetadataSources)8 PersistentClass (org.hibernate.mapping.PersistentClass)7 RootClass (org.hibernate.mapping.RootClass)7 EntityMetamodel (org.hibernate.tuple.entity.EntityMetamodel)7 EntityTuplizer (org.hibernate.tuple.entity.EntityTuplizer)7 IEntityMetamodel (org.jboss.tools.hibernate.runtime.spi.IEntityMetamodel)7 ClassLoaderAccessImpl (org.hibernate.boot.internal.ClassLoaderAccessImpl)6 ClassLoaderService (org.hibernate.boot.registry.classloading.spi.ClassLoaderService)6 ClassLoaderAccess (org.hibernate.boot.spi.ClassLoaderAccess)6 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)5 AbstractEntityPersister (org.hibernate.persister.entity.AbstractEntityPersister)5