Class MetadataBuildingProcess
- java.lang.Object
-
- org.hibernate.boot.model.process.spi.MetadataBuildingProcess
-
public class MetadataBuildingProcess extends java.lang.Object
Represents the process of of transforming aMetadataSources
reference into aMetadata
reference. 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 aManagedResources
instance. The second step is defined by callingcomplete(org.hibernate.boot.model.process.spi.ManagedResources, org.hibernate.boot.spi.BootstrapContext, org.hibernate.boot.spi.MetadataBuildingOptions)
-
Single step : as defined by the
-
-
Constructor Summary
Constructors Constructor Description MetadataBuildingProcess()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MetadataImplementor
build(MetadataSources sources, BootstrapContext bootstrapContext, MetadataBuildingOptions options)
Unified single phase for MetadataSources->Metadata processstatic MetadataImplementor
complete(ManagedResources managedResources, BootstrapContext bootstrapContext, MetadataBuildingOptions options)
Second step of 2-phase for MetadataSources->Metadata processstatic ManagedResources
prepare(MetadataSources sources, BootstrapContext bootstrapContext)
First step of 2-phase for MetadataSources->Metadata process
-
-
-
Method Detail
-
build
public static MetadataImplementor build(MetadataSources sources, BootstrapContext bootstrapContext, MetadataBuildingOptions options)
Unified single phase for MetadataSources->Metadata process- Parameters:
sources
- The MetadataSourcesoptions
- The building options- Returns:
- The built Metadata
-
prepare
public static ManagedResources prepare(MetadataSources sources, BootstrapContext bootstrapContext)
First step of 2-phase for MetadataSources->Metadata process- Parameters:
sources
- The MetadataSourcesbootstrapContext
- The bootstrapContext- Returns:
- 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- Parameters:
managedResources
- The token/memento from 1st phaseoptions
- The building options- Returns:
- Token/memento representing all known users resources (classes, packages, mapping files, etc).
-
-