@Override
    public Stream<? extends Serializable> streamQuery(final jakarta.persistence.Query query) {
        val hibernateQuery = query.unwrap(Query.class);
        return hibernateQuery.stream();
    }
This is {@link CasHibernateJpaBeanFactory}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-jpa-hibernate/src/main/java/org/apereo/cas/hibernate/CasHibernateJpaBeanFactory.java