org.musicontroller.core.jobs
Class ReviewRefreshJob

java.lang.Object
  extended by org.musicontroller.core.jobs.ReviewRefreshJob

public class ReviewRefreshJob
extends java.lang.Object

The ReviewRefreshJob refreshes all Playlist-reviews. For each Playlist, the reviews are retrieved again, and new reviews will be added. Every review will be scanned for occurences of strings that happen to be 'linkable'. A 'linkable' string is for instance 'The Beatles'. Whenever such a string is found, a link to the Band 'The Beatles' is inserted, provided of course, such a Band is in the MusiController database.

Author:
Varienaja

Constructor Summary
ReviewRefreshJob()
           
 
Method Summary
 int execute()
          Starts the ReviewRefreshJob.
 Dao getDao()
           
 org.hibernate.SessionFactory getSessionFactory()
           
 void setDao(Dao _dao)
           
 void setSessionFactory(org.hibernate.SessionFactory factory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReviewRefreshJob

public ReviewRefreshJob()
Method Detail

getDao

public Dao getDao()

setDao

public void setDao(Dao _dao)

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory factory)

execute

public int execute()
Starts the ReviewRefreshJob. Refreshes all playlist-reviews. This method creates a Session per Playlist, to guarantee that not too many object will hog resources.

Returns:
The amount of playlists that were processed.


Copyright © 2010 A.J.V.. All Rights Reserved.