org.specrunner.hibernate3
Class ObjectSelector

java.lang.Object
  extended by org.specrunner.hibernate3.ObjectSelector
All Implemented Interfaces:
IObjectSelector<org.hibernate.Session>

public class ObjectSelector
extends Object
implements IObjectSelector<org.hibernate.Session>

Hibernate object selector.

Author:
Thiago Santos

Field Summary
protected static ThreadLocal<ObjectSelector> instance
          Thread safe instance of ObjectSelector.
protected  org.hibernate.Session session
          The object session factory.
 
Constructor Summary
ObjectSelector()
           
 
Method Summary
 List<Object> all(AbstractPluginObject caller, IContext context, IResultSet result)
           
static ObjectSelector get()
          Gets the thread safe instance of finder.
 org.hibernate.Session getSource(AbstractPluginObject caller, IContext context)
           
 void release()
           
 List<Object> select(AbstractPluginObject caller, IContext context, Object instance, RowAdapter row, IResultSet result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static ThreadLocal<ObjectSelector> instance
Thread safe instance of ObjectSelector.


session

protected org.hibernate.Session session
The object session factory.

Constructor Detail

ObjectSelector

public ObjectSelector()
Method Detail

get

public static ObjectSelector get()
Gets the thread safe instance of finder.

Returns:
The finder instance.

getSource

public org.hibernate.Session getSource(AbstractPluginObject caller,
                                       IContext context)
                                throws Exception
Specified by:
getSource in interface IObjectSelector<org.hibernate.Session>
Throws:
Exception

all

public List<Object> all(AbstractPluginObject caller,
                        IContext context,
                        IResultSet result)
                 throws Exception
Specified by:
all in interface IObjectSelector<org.hibernate.Session>
Throws:
Exception

select

public List<Object> select(AbstractPluginObject caller,
                           IContext context,
                           Object instance,
                           RowAdapter row,
                           IResultSet result)
                    throws Exception
Specified by:
select in interface IObjectSelector<org.hibernate.Session>
Throws:
Exception

release

public void release()
             throws Exception
Specified by:
release in interface IObjectSelector<org.hibernate.Session>
Throws:
Exception


Copyright © 2016. All rights reserved.