public final class Search extends Object
| Modifier and Type | Method and Description |
|---|---|
static SearchSession |
getSearchSession(EntityManager entityManager)
Retrieve the
SearchSession from a JPA EntityManager. |
static SearchSession |
getSearchSession(Session session)
Retrieve the
SearchSession from a Hibernate ORM Session. |
public static SearchSession getSearchSession(Session session)
SearchSession from a Hibernate ORM Session.
The resulting instance depends on the passed Session:
closing the Session will close the SearchSession.
The SearchSession will share the Session's persistence context.
session - A Hibernate ORM session.SearchSession.public static SearchSession getSearchSession(EntityManager entityManager)
SearchSession from a JPA EntityManager.
The resulting instance depends on the passed EntityManager:
closing the EntityManager will close the SearchSession.
The SearchSession will share the EntityManager's persistence context.
entityManager - A JPA entity manager.SearchSession.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.