Search in sources :

Example 1 with JaxbHbmSimpleIdType

use of org.hibernate.boot.jaxb.hbm.spi.JaxbHbmSimpleIdType in project hibernate-orm by hibernate.

the class EntityModeConverterTest method generateXml.

private JaxbHbmHibernateMapping generateXml(boolean includeEntityMode) throws Exception {
    JaxbHbmHibernateMapping hm = new JaxbHbmHibernateMapping();
    JaxbHbmRootEntityType clazz = new JaxbHbmRootEntityType();
    JaxbHbmTuplizerType tuplizer = new JaxbHbmTuplizerType();
    tuplizer.setClazz(DynamicMapEntityTuplizer.class.getCanonicalName());
    if (includeEntityMode) {
        tuplizer.setEntityMode(EntityMode.MAP);
    }
    clazz.getTuplizer().add(tuplizer);
    JaxbHbmSimpleIdType id = new JaxbHbmSimpleIdType();
    clazz.setId(id);
    hm.getClazz().add(clazz);
    return hm;
}
Also used : JaxbHbmSimpleIdType(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmSimpleIdType) JaxbHbmTuplizerType(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmTuplizerType) JaxbHbmRootEntityType(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmRootEntityType) JaxbHbmHibernateMapping(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping) DynamicMapEntityTuplizer(org.hibernate.tuple.entity.DynamicMapEntityTuplizer)

Example 2 with JaxbHbmSimpleIdType

use of org.hibernate.boot.jaxb.hbm.spi.JaxbHbmSimpleIdType in project hibernate-orm by hibernate.

the class GenerationTimingConverterTest method testMashallAttributeWithNullGenerationTiming.

@Test
public void testMashallAttributeWithNullGenerationTiming() throws Exception {
    JaxbHbmHibernateMapping hm = new JaxbHbmHibernateMapping();
    JaxbHbmRootEntityType clazz = new JaxbHbmRootEntityType();
    JaxbHbmSimpleIdType id = new JaxbHbmSimpleIdType();
    JaxbHbmBasicAttributeType att = new JaxbHbmBasicAttributeType();
    att.setName("attributeName");
    clazz.getAttributes().add(att);
    clazz.setId(id);
    hm.getClazz().add(clazz);
    XmlBindingChecker.checkValidGeneration(hm);
}
Also used : JaxbHbmSimpleIdType(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmSimpleIdType) JaxbHbmRootEntityType(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmRootEntityType) JaxbHbmBasicAttributeType(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmBasicAttributeType) JaxbHbmHibernateMapping(org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping) Test(org.junit.Test)

Aggregations

JaxbHbmHibernateMapping (org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping)2 JaxbHbmRootEntityType (org.hibernate.boot.jaxb.hbm.spi.JaxbHbmRootEntityType)2 JaxbHbmSimpleIdType (org.hibernate.boot.jaxb.hbm.spi.JaxbHbmSimpleIdType)2 JaxbHbmBasicAttributeType (org.hibernate.boot.jaxb.hbm.spi.JaxbHbmBasicAttributeType)1 JaxbHbmTuplizerType (org.hibernate.boot.jaxb.hbm.spi.JaxbHbmTuplizerType)1 DynamicMapEntityTuplizer (org.hibernate.tuple.entity.DynamicMapEntityTuplizer)1 Test (org.junit.Test)1