org.riotfamily.riot.hibernate.support
Class LongConversationTask

java.lang.Object
  extended by org.riotfamily.riot.hibernate.support.LongConversationTask
All Implemented Interfaces:
ScheduledTask, LongConversationCallback, Ordered

public abstract class LongConversationTask
extends Object
implements ScheduledTask, Ordered, LongConversationCallback

Scheduled task that executes code within a Hibernate session.

Since:
8.0
Author:
Felix Gnass [fgnass at neteye dot de]

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
LongConversationTask(org.hibernate.SessionFactory sessionFactory)
           
 
Method Summary
 void execute()
          Executes the task.
 int getOrder()
           
protected  org.hibernate.SessionFactory getSessionFactory()
           
 String[] getTriggerNames()
          Returns the name of the triggers on which the task should be executed.
 void setOrder(int order)
           
 void setTriggerNames(String[] triggerNames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.riotfamily.riot.hibernate.support.LongConversationCallback
doInHibernate
 

Constructor Detail

LongConversationTask

public LongConversationTask(org.hibernate.SessionFactory sessionFactory)
Method Detail

getSessionFactory

protected org.hibernate.SessionFactory getSessionFactory()

getTriggerNames

public String[] getTriggerNames()
Description copied from interface: ScheduledTask
Returns the name of the triggers on which the task should be executed.

Specified by:
getTriggerNames in interface ScheduledTask

setTriggerNames

public void setTriggerNames(String[] triggerNames)

getOrder

public int getOrder()
Specified by:
getOrder in interface Ordered

setOrder

public void setOrder(int order)

execute

public void execute()
             throws Exception
Description copied from interface: ScheduledTask
Executes the task. The method is invoked by the Quartz scheduler when one of the configured triggers fires.

Specified by:
execute in interface ScheduledTask
Throws:
Exception