org.hibernate.search.engine.impl
Class HibernateStatelessInitializer
java.lang.Object
org.hibernate.search.engine.impl.HibernateStatelessInitializer
- All Implemented Interfaces:
- EntityInitializer
- Direct Known Subclasses:
- HibernateSessionLoadingInitializer
public class HibernateStatelessInitializer
- extends Object
- implements EntityInitializer
To be used for Hibernate initializations which don't need a specific Session.
initializeCollection(Collection)
and initializeMap(Map)
are not supported.
- Author:
- Sanne Grinovero (C) 2011 Red Hat Inc.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final HibernateStatelessInitializer INSTANCE
HibernateStatelessInitializer
protected HibernateStatelessInitializer()
getClass
public <T> Class<T> getClass(T entity)
- Specified by:
getClass
in interface EntityInitializer
- Parameters:
entity
- an instance or proxy of T
- Returns:
- the class from the instance, or the underlying class from a proxy.
unproxy
public Object unproxy(Object instance)
- Specified by:
unproxy
in interface EntityInitializer
- Returns:
- if value is a proxy, unwraps it, otherwise works as a pass-through function.
initializeCollection
public <T> Collection<T> initializeCollection(Collection<T> value)
- Specified by:
initializeCollection
in interface EntityInitializer
- Returns:
- the initialized Collection, to be used on lazily-loading collections
initializeMap
public <K,V> Map<K,V> initializeMap(Map<K,V> value)
- Specified by:
initializeMap
in interface EntityInitializer
- Returns:
- the initialized Map, to be used on lazily-loading maps
initializeArray
public Object[] initializeArray(Object[] value)
- Specified by:
initializeArray
in interface EntityInitializer
- Returns:
- the initialized array, to be used on lazily-loading arrays
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved