Search in sources :

Example 16 with JaxbEntity

use of org.hibernate.boot.jaxb.mapping.spi.JaxbEntity in project quarkus by quarkusio.

the class JpaJandexScavenger method enlistOrmXmlMapping.

private void enlistOrmXmlMapping(Collector collector, JaxbEntityMappings mapping) {
    String packageName = mapping.getPackage();
    String packagePrefix = packageName == null ? "" : packageName + ".";
    JaxbPersistenceUnitMetadata metadata = mapping.getPersistenceUnitMetadata();
    JaxbPersistenceUnitDefaults defaults = metadata == null ? null : metadata.getPersistenceUnitDefaults();
    if (defaults != null) {
        enlistOrmXmlMappingListeners(collector, packagePrefix, defaults.getEntityListeners());
    }
    for (JaxbEntity entity : mapping.getEntity()) {
        enlistOrmXmlMappingManagedClass(collector, packagePrefix, entity, "entity");
    }
    for (JaxbMappedSuperclass mappedSuperclass : mapping.getMappedSuperclass()) {
        enlistOrmXmlMappingManagedClass(collector, packagePrefix, mappedSuperclass, "mapped-superclass");
    }
    for (JaxbEmbeddable embeddable : mapping.getEmbeddable()) {
        String name = safeGetClassName(packagePrefix, embeddable, "embeddable");
        enlistExplicitClass(collector, name);
    }
    for (JaxbConverter converter : mapping.getConverter()) {
        collector.potentialCdiBeanTypes.add(DotName.createSimple(qualifyIfNecessary(packagePrefix, converter.getClazz())));
    }
}
Also used : JaxbConverter(org.hibernate.boot.jaxb.mapping.spi.JaxbConverter) JaxbMappedSuperclass(org.hibernate.boot.jaxb.mapping.spi.JaxbMappedSuperclass) JaxbEmbeddable(org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddable) JaxbPersistenceUnitDefaults(org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitDefaults) JaxbPersistenceUnitMetadata(org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitMetadata) JaxbEntity(org.hibernate.boot.jaxb.mapping.spi.JaxbEntity)

Aggregations

JaxbEntity (org.hibernate.boot.jaxb.mapping.spi.JaxbEntity)16 AnnotationDescriptor (org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor)13 SecondaryTable (jakarta.persistence.SecondaryTable)2 JaxbMappedSuperclass (org.hibernate.boot.jaxb.mapping.spi.JaxbMappedSuperclass)2 JaxbPersistenceUnitDefaults (org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitDefaults)2 JaxbPersistenceUnitMetadata (org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitMetadata)2 JaxbSecondaryTable (org.hibernate.boot.jaxb.mapping.spi.JaxbSecondaryTable)2 CollectionTable (jakarta.persistence.CollectionTable)1 Convert (jakarta.persistence.Convert)1 DiscriminatorColumn (jakarta.persistence.DiscriminatorColumn)1 DiscriminatorType (jakarta.persistence.DiscriminatorType)1 DiscriminatorValue (jakarta.persistence.DiscriminatorValue)1 Entity (jakarta.persistence.Entity)1 Inheritance (jakarta.persistence.Inheritance)1 InheritanceType (jakarta.persistence.InheritanceType)1 JoinTable (jakarta.persistence.JoinTable)1 NamedEntityGraph (jakarta.persistence.NamedEntityGraph)1 NamedEntityGraphs (jakarta.persistence.NamedEntityGraphs)1 NamedNativeQueries (jakarta.persistence.NamedNativeQueries)1 NamedNativeQuery (jakarta.persistence.NamedNativeQuery)1