HHH-6141 - Develop scheme for ordered processing of MetadataSources sources
This commit is contained in:
parent
ddb79d1709
commit
363608a604
|
@ -28,4 +28,9 @@ package org.hibernate.metamodel.source;
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface Metadata {
|
public interface Metadata {
|
||||||
|
public static enum ProcessingOrder {
|
||||||
|
ANNOTATIONS_FIRST,
|
||||||
|
HBM_FIRST
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,11 @@ public class MetadataSources {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Metadata buildMetadata() {
|
public Metadata buildMetadata() {
|
||||||
return new MetadataImpl( this );
|
return buildMetadata( Metadata.ProcessingOrder.ANNOTATIONS_FIRST );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Metadata buildMetadata(Metadata.ProcessingOrder preferredProcessingOrder) {
|
||||||
|
return new MetadataImpl( this, preferredProcessingOrder );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class MetadataImpl implements Metadata, MetadataImplementor, Serializable
|
||||||
private Map<String, FetchProfile> fetchProfiles = new HashMap<String, FetchProfile>();
|
private Map<String, FetchProfile> fetchProfiles = new HashMap<String, FetchProfile>();
|
||||||
private Map<String, String> imports;
|
private Map<String, String> imports;
|
||||||
|
|
||||||
public MetadataImpl(MetadataSources metadataSources) {
|
public MetadataImpl(MetadataSources metadataSources, ProcessingOrder preferredProcessingOrder) {
|
||||||
this.serviceRegistry = metadataSources.getServiceRegistry();
|
this.serviceRegistry = metadataSources.getServiceRegistry();
|
||||||
this.namingStrategy = metadataSources.getNamingStrategy();
|
this.namingStrategy = metadataSources.getNamingStrategy();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue