Search in sources :

Example 1 with XMLMappingHelper

use of org.hibernate.orm.test.internal.util.xml.XMLMappingHelper in project hibernate-orm by hibernate.

the class XMLContextTest method testAll.

@Test
public void testAll() throws Exception {
    XMLMappingHelper xmlHelper = new XMLMappingHelper();
    final XMLContext context = new XMLContext(bootstrapContext);
    JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings("org/hibernate/orm/test/annotations/reflection/orm.xml");
    context.addDocument(mappings);
}
Also used : JaxbEntityMappings(org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappings) XMLMappingHelper(org.hibernate.orm.test.internal.util.xml.XMLMappingHelper) XMLContext(org.hibernate.cfg.annotations.reflection.internal.XMLContext) Test(org.junit.jupiter.api.Test)

Example 2 with XMLMappingHelper

use of org.hibernate.orm.test.internal.util.xml.XMLMappingHelper in project hibernate-orm by hibernate.

the class Ejb3XmlTestCase method getContext.

protected XMLContext getContext(InputStream is, String resourceName) throws Exception {
    XMLMappingHelper xmlHelper = new XMLMappingHelper();
    JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings(is, resourceName);
    XMLContext context = new XMLContext(bootstrapContext);
    context.addDocument(mappings);
    return context;
}
Also used : JaxbEntityMappings(org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappings) XMLMappingHelper(org.hibernate.orm.test.internal.util.xml.XMLMappingHelper) XMLContext(org.hibernate.cfg.annotations.reflection.internal.XMLContext)

Example 3 with XMLMappingHelper

use of org.hibernate.orm.test.internal.util.xml.XMLMappingHelper in project hibernate-orm by hibernate.

the class JPAXMLOverriddenAnnotationReaderTest method buildContext.

private XMLContext buildContext(String ormfile) throws IOException {
    XMLMappingHelper xmlHelper = new XMLMappingHelper();
    JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings(ormfile);
    XMLContext context = new XMLContext(bootstrapContext);
    context.addDocument(mappings);
    return context;
}
Also used : JaxbEntityMappings(org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappings) XMLMappingHelper(org.hibernate.orm.test.internal.util.xml.XMLMappingHelper) XMLContext(org.hibernate.cfg.annotations.reflection.internal.XMLContext)

Aggregations

JaxbEntityMappings (org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappings)3 XMLContext (org.hibernate.cfg.annotations.reflection.internal.XMLContext)3 XMLMappingHelper (org.hibernate.orm.test.internal.util.xml.XMLMappingHelper)3 Test (org.junit.jupiter.api.Test)1