uk.ac.cam.juliet.twitter.main
Class OldTweetsHandler

java.lang.Object
  extended by uk.ac.cam.juliet.twitter.main.OldTweetsHandler

public class OldTweetsHandler
extends java.lang.Object

handles cleaning the database from old tweets so that the database does not grow indefinitely

Author:
Ahmad Akra

Field Summary
(package private)  FrequencyCounter counter
          the frequency counter used to delete all side effects of old tweets
(package private)  IDatabase db
          the database to clean
 
Constructor Summary
OldTweetsHandler(IDatabase db)
          class constructor
 
Method Summary
static void main(java.lang.String[] args)
           
 void removeOldTweets(java.util.Date olderThan)
          removes from the database all tweets that are older than the argument date and all their side effects (word frequencies, sentiment analysis)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

IDatabase db
the database to clean


counter

FrequencyCounter counter
the frequency counter used to delete all side effects of old tweets

Constructor Detail

OldTweetsHandler

public OldTweetsHandler(IDatabase db)
class constructor

Parameters:
db - the database clean
Method Detail

removeOldTweets

public void removeOldTweets(java.util.Date olderThan)
removes from the database all tweets that are older than the argument date and all their side effects (word frequencies, sentiment analysis)

Parameters:
olderThan - the oldest date to keep in home

main

public static void main(java.lang.String[] args)
                 throws java.sql.SQLException,
                        java.lang.ClassNotFoundException
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException