net.databinder.hib
Interface SessionUnit
public interface SessionUnit
Unit of work to be used with DataStaticService.ensureSession()
when a session is required but might not be bound to the current thread.
- Author:
- Nathan Hamblen
- See Also:
Databinder.ensureSession(SessionUnit)
|
Method Summary |
java.lang.Object |
run(org.hibernate.Session sess)
Perform work with a thread-bound session available thorugh
DataStaticService.getHibernateSession(). |
run
java.lang.Object run(org.hibernate.Session sess)
- Perform work with a thread-bound session available thorugh
DataStaticService.getHibernateSession(). Be careful of returning lazy loaded collections
in objects whose sessions may have been closed.
- Parameters:
sess - Hibernate session, for convenience
- Returns:
- object to be returned by DataStaticService.ensureSession()
- See Also:
Databinder
Copyright © 2005-2008 Nathan Hamblen. All Rights Reserved.