Package de.xima.fc.utils
Class HibernateUtils
- java.lang.Object
-
- de.xima.fc.utils.HibernateUtils
-
public class HibernateUtils extends Object
Utility class for dealing withHibernate
objects- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
initialize(Object proxy)
static <T> void
initialize(List<T> objects, Class<T> clazz)
static <T> void
initialize(T object, Class<T> clazz)
static <T> List<T>
unproxyList(List<T> objects, Class<T> clazz)
Unproxies any of the given objects that areHibernateProxy
s and returns all objectsstatic <T> T
unproxyObject(T object, Class<T> clazz)
Unproxies the object if it is aHibernateProxy
and returns the unproxied objectstatic <T> Set<T>
unproxySet(Set<T> objects, Class<T> clazz)
-
-
-
Method Detail
-
unproxyList
public static final <T> List<T> unproxyList(List<T> objects, Class<T> clazz)
Unproxies any of the given objects that areHibernateProxy
s and returns all objects- Type Parameters:
T
- type of the objects- Parameters:
objects
- to unproxyclazz
- of the objects- Returns:
List
of all the objects with all the objects unproxied
-
unproxyObject
public static final <T> T unproxyObject(T object, Class<T> clazz)
Unproxies the object if it is aHibernateProxy
and returns the unproxied object- Type Parameters:
T
- type of the objects- Parameters:
object
- to unproxyclazz
- of the object- Returns:
- unproxied value or the original if the object is no
HibernateProxy
-
initialize
public static final <T> void initialize(T object, Class<T> clazz)
-
initialize
public static final void initialize(Object proxy)
-
-