mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-09 04:34:49 +00:00
HHH-6141 - Develop scheme for ordered processing of MetadataSources sources
This commit is contained in:
parent
ddb79d1709
commit
363608a604
@ -28,4 +28,9 @@
|
|||||||
* @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 NamingStrategy getNamingStrategy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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…
x
Reference in New Issue
Block a user