org.specrunner.hibernate
Class ObjectSelector

java.lang.Object
  extended by org.specrunner.hibernate.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  org.hibernate.Session session
          The object session factory.
 
Constructor Summary
ObjectSelector()
           
 
Method Summary
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

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

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 © 2014. All rights reserved.