类 MetadataBuildingProcess
- java.lang.Object
-
- org.hibernate.boot.model.process.spi.MetadataBuildingProcess
-
public class MetadataBuildingProcess extends Object
Represents the process of of transforming aMetadataSourcesreference into aMetadatareference. Allows for 2 different process paradigms:-
Single step : as defined by the
build(org.hibernate.boot.MetadataSources, org.hibernate.boot.spi.BootstrapContext, org.hibernate.boot.spi.MetadataBuildingOptions)method; internally leverages the 2-step paradigm -
Two step : a first step coordinates resource scanning and some other preparation work; a second step
builds the
Metadata. A hugely important distinction in the need for the steps is that the first phase should strive to not load user entity/component classes so that we can still perform enhancement on them later. This approach caters to the 2-phase bootstrap we use in regards to WildFly Hibernate-JPA integration. The first step is defined byprepare(org.hibernate.boot.MetadataSources, org.hibernate.boot.spi.BootstrapContext)which returns aManagedResourcesinstance. The second step is defined by callingcomplete(org.hibernate.boot.model.process.spi.ManagedResources, org.hibernate.boot.spi.BootstrapContext, org.hibernate.boot.spi.MetadataBuildingOptions)
- 作者:
- Steve Ebersole
-
Single step : as defined by the
-
-
构造器概要
构造器 构造器 说明 MetadataBuildingProcess()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static MetadataImplementorbuild(MetadataSources sources, BootstrapContext bootstrapContext, MetadataBuildingOptions options)Unified single phase for MetadataSources->Metadata processstatic MetadataImplementorcomplete(ManagedResources managedResources, BootstrapContext bootstrapContext, MetadataBuildingOptions options)Second step of 2-phase for MetadataSources->Metadata processstatic ManagedResourcesprepare(MetadataSources sources, BootstrapContext bootstrapContext)First step of 2-phase for MetadataSources->Metadata process
-
-
-
方法详细资料
-
build
public static MetadataImplementor build(MetadataSources sources, BootstrapContext bootstrapContext, MetadataBuildingOptions options)
Unified single phase for MetadataSources->Metadata process- 参数:
sources- The MetadataSourcesoptions- The building options- 返回:
- The built Metadata
-
prepare
public static ManagedResources prepare(MetadataSources sources, BootstrapContext bootstrapContext)
First step of 2-phase for MetadataSources->Metadata process- 参数:
sources- The MetadataSourcesbootstrapContext- The bootstrapContext- 返回:
- Token/memento representing all known users resources (classes, packages, mapping files, etc).
-
complete
public static MetadataImplementor complete(ManagedResources managedResources, BootstrapContext bootstrapContext, MetadataBuildingOptions options)
Second step of 2-phase for MetadataSources->Metadata process- 参数:
managedResources- The token/memento from 1st phaseoptions- The building options- 返回:
- Token/memento representing all known users resources (classes, packages, mapping files, etc).
-
-