org.hibernate.search.engine.impl
Class HibernateSessionLoadingInitializer

java.lang.Object
  extended by org.hibernate.search.engine.impl.HibernateStatelessInitializer
      extended by org.hibernate.search.engine.impl.HibernateSessionLoadingInitializer
All Implemented Interfaces:
InstanceInitializer

public class HibernateSessionLoadingInitializer
extends HibernateStatelessInitializer
implements InstanceInitializer

This EntityInitializer is relative to a specific Hibernate Session, so it's able to attach detached collections to it's Session.

Author:
Sanne Grinovero (C) 2011 Red Hat Inc.

Field Summary
 
Fields inherited from class org.hibernate.search.engine.impl.HibernateStatelessInitializer
INSTANCE
 
Constructor Summary
HibernateSessionLoadingInitializer(SessionImplementor hibernateSession)
           
 
Method Summary
<T> Collection<T>
initializeCollection(Collection<T> value)
           
<K,V> Map<K,V>
initializeMap(Map<K,V> value)
           
 
Methods inherited from class org.hibernate.search.engine.impl.HibernateStatelessInitializer
getClass, getClassFromWork, initializeArray, unproxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.search.spi.InstanceInitializer
getClass, getClassFromWork, initializeArray, unproxy
 

Constructor Detail

HibernateSessionLoadingInitializer

public HibernateSessionLoadingInitializer(SessionImplementor hibernateSession)
Method Detail

initializeCollection

public <T> Collection<T> initializeCollection(Collection<T> value)
Specified by:
initializeCollection in interface InstanceInitializer
Overrides:
initializeCollection in class HibernateStatelessInitializer
Parameters:
value - the collection to initialize
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 InstanceInitializer
Overrides:
initializeMap in class HibernateStatelessInitializer
Parameters:
value - the map to initialize
Returns:
the initialized Map, to be used on lazily-loading maps


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved