org.rhq.core.domain.util.serial
Class HibernateUtil

java.lang.Object
  extended by org.rhq.core.domain.util.serial.HibernateUtil

public class HibernateUtil
extends Object


Constructor Summary
HibernateUtil()
           
 
Method Summary
static
<T> Collection<T>
safeCollection(Collection<T> collection)
          If the pass-in List is a Hibernate type, replace it with a java type.
static
<T> List<T>
safeList(List<T> list)
          If the pass-in List is a Hibernate type, replace it with a java type.
static
<K,V> Map<K,V>
safeMap(Map<K,V> map)
          If the pass-in Map is a Hibernate type, replace it with a java type.
static
<T> Set<T>
safeSet(Set<T> set)
          If the pass-in List is a Hibernate type, replace it with a java type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateUtil

public HibernateUtil()
Method Detail

safeList

public static <T> List<T> safeList(List<T> list)
If the pass-in List is a Hibernate type, replace it with a java type. This is typically used for ensuring that we don't serialize Hibernate types.

Type Parameters:
T -
Parameters:
list -
Returns:

safeSet

public static <T> Set<T> safeSet(Set<T> set)
If the pass-in List is a Hibernate type, replace it with a java type. This is typically used for ensuring that we don't serialize Hibernate types.

Type Parameters:
T -
Parameters:
set -
Returns:

safeCollection

public static <T> Collection<T> safeCollection(Collection<T> collection)
If the pass-in List is a Hibernate type, replace it with a java type. This is typically used for ensuring that we don't serialize Hibernate types.

Type Parameters:
T -
Parameters:
collection -
Returns:

safeMap

public static <K,V> Map<K,V> safeMap(Map<K,V> map)
If the pass-in Map is a Hibernate type, replace it with a java type. This is typically used for ensuring that we don't serialize Hibernate types.

Type Parameters:
K -
V -
Parameters:
map -
Returns:


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.