| Modifier and Type | Method and Description |
|---|---|
static void |
close(Iterator iterator)
Close an
Iterator instances obtained from Query.iterate() immediately
instead of waiting until the session is closed or disconnected. |
static Class |
getClass(Object proxy)
Get the true, underlying class of a proxied persistent class.
|
static LobCreator |
getLobCreator(Session session)
Obtain a lob creator for the given session.
|
static LobCreator |
getLobCreator(SessionImplementor session)
Obtain a lob creator for the given session.
|
static LobCreator |
getLobCreator(SharedSessionContractImplementor session)
Obtain a lob creator for the given session.
|
static void |
initialize(Object proxy)
Force initialization of a proxy or persistent collection.
|
static boolean |
isInitialized(Object proxy)
Check if the proxy or persistent collection is initialized.
|
static boolean |
isPropertyInitialized(Object proxy,
String propertyName)
Check if the property is initialized.
|
static Object |
unproxy(Object proxy)
Unproxies a
HibernateProxy. |
static <T> T |
unproxy(T proxy,
Class<T> entityClass)
Unproxies a
HibernateProxy. |
public static void initialize(Object proxy) throws HibernateException
proxy - a persistable object, proxy, persistent collection or nullHibernateException - if we can't initialize the proxy at this time, eg. the Session was closedpublic static boolean isInitialized(Object proxy)
proxy - a persistable object, proxy, persistent collection or nullpublic static Class getClass(Object proxy)
proxy - a persistable object or proxyHibernateExceptionpublic static LobCreator getLobCreator(Session session)
session - The session for which to obtain a lob creatorpublic static LobCreator getLobCreator(SharedSessionContractImplementor session)
session - The session for which to obtain a lob creatorpublic static LobCreator getLobCreator(SessionImplementor session)
session - The session for which to obtain a lob creatorpublic static void close(Iterator iterator) throws HibernateException
Iterator instances obtained from Query.iterate() immediately
instead of waiting until the session is closed or disconnected.iterator - an Iterator created by iterate()HibernateException - Indicates a problem closing the Hibernate iterator.IllegalArgumentException - If the Iterator is not a "Hibernate Iterator".Query.iterate()public static boolean isPropertyInitialized(Object proxy, String propertyName)
proxy - The potential proxypropertyName - the name of a persistent attribute of the objectpublic static Object unproxy(Object proxy)
HibernateProxy. If the proxy is uninitialized, it automatically triggers an initialization.
In case the supplied object is null or not a proxy, the object will be returned as-is.proxy - the HibernateProxy to be unproxiedpublic static <T> T unproxy(T proxy,
Class<T> entityClass)
HibernateProxy. If the proxy is uninitialized, it automatically triggers an initialization.
In case the supplied object is null or not a proxy, the object will be returned as-is.proxy - the HibernateProxy to be unproxiedentityClass - the entity typeCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.