Class HibernateOrmUtils


  • public final class HibernateOrmUtils
    extends Object
    • Method Detail

      • toSessionFactoryImplementor

        public static org.hibernate.engine.spi.SessionFactoryImplementor toSessionFactoryImplementor​(EntityManagerFactory entityManagerFactory)
      • toSession

        public static org.hibernate.Session toSession​(EntityManager entityManager)
      • toSessionImplementor

        public static org.hibernate.engine.spi.SessionImplementor toSessionImplementor​(EntityManager entityManager)
      • toMostSpecificCommonEntitySuperType

        public static org.hibernate.metamodel.mapping.EntityMappingType toMostSpecificCommonEntitySuperType​(org.hibernate.metamodel.mapping.EntityMappingType type1,
                                                                                                            org.hibernate.metamodel.mapping.EntityMappingType type2)
      • targetsAllConcreteSubTypes

        public static boolean targetsAllConcreteSubTypes​(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory,
                                                         org.hibernate.metamodel.mapping.EntityMappingType parentType,
                                                         Collection<?> targetConcreteSubTypes)
      • getServiceOrFail

        @SuppressForbiddenApis(reason="Safer wrapper")
        public static <T extends org.hibernate.service.Service> T getServiceOrFail​(org.hibernate.service.ServiceRegistry serviceRegistry,
                                                                                   Class<T> serviceClass)
      • getServiceOrEmpty

        @SuppressForbiddenApis(reason="Safer wrapper")
        public static <T extends org.hibernate.service.Service> Optional<T> getServiceOrEmpty​(org.hibernate.service.ServiceRegistry serviceRegistry,
                                                                                              Class<T> serviceClass)
      • sortedNonSyntheticProperties

        public static List<org.hibernate.mapping.Property> sortedNonSyntheticProperties​(Iterator<org.hibernate.mapping.Property> propertyIterator)