HHH-16012 - Develop an abstraction for domain model Class refs
This commit is contained in:
parent
3092eed9b0
commit
8e1247c909
|
@ -54,8 +54,12 @@ public class JPAXMLOverriddenMetadataProvider implements MetadataProvider {
|
|||
private Map<AnnotatedElement, AnnotationReader> cache;
|
||||
|
||||
public JPAXMLOverriddenMetadataProvider(BootstrapContext bootstrapContext) {
|
||||
this.classLoaderAccess = bootstrapContext.getClassLoaderAccess();
|
||||
this.xmlContext = new XMLContext( bootstrapContext );
|
||||
this( bootstrapContext.getClassLoaderAccess(), bootstrapContext );
|
||||
}
|
||||
|
||||
public JPAXMLOverriddenMetadataProvider(ClassLoaderAccess classLoaderAccess, BootstrapContext bootstrapContext) {
|
||||
this.classLoaderAccess = classLoaderAccess;
|
||||
this.xmlContext = new XMLContext( classLoaderAccess, bootstrapContext.getClassmateContext() );
|
||||
this.xmlMappingEnabled = bootstrapContext.getMetadataBuildingOptions().isXmlMappingEnabled();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,13 +57,16 @@ public class XMLContext implements Serializable {
|
|||
private boolean hasContext = false;
|
||||
|
||||
public XMLContext(BootstrapContext bootstrapContext) {
|
||||
this.classLoaderAccess = bootstrapContext.getClassLoaderAccess();
|
||||
this.classmateContext = bootstrapContext.getClassmateContext();
|
||||
this( bootstrapContext.getClassLoaderAccess(), bootstrapContext.getClassmateContext() );
|
||||
}
|
||||
|
||||
public XMLContext(ClassLoaderAccess classLoaderAccess, ClassmateContext classmateContext) {
|
||||
this.classLoaderAccess = classLoaderAccess;
|
||||
this.classmateContext = classmateContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param entityMappings The xml document to add
|
||||
* @return Add an xml document to this context and return the list of added class names.
|
||||
* Add the JAXB binding to this context and return the list of added class names.
|
||||
*/
|
||||
public List<String> addDocument(JaxbEntityMappings entityMappings) {
|
||||
hasContext = true;
|
||||
|
|
Loading…
Reference in New Issue