summaryrefslogtreecommitdiff
path: root/src/main/DataFiller.java
AgeCommit message (Collapse)AuthorFilesLines
2014-05-11Are you stupid? Converting SQLException to RuntimeException?!Peter Wu1-15/+10
2014-05-11More data sanization (decode HTML entities, location fix)Peter Wu1-1/+18
2014-05-11Report status while importing (add --status option)Peter Wu1-4/+0
* Add status reporting to know how many tweets are already imported. * Remove spam from DataFiller when no brand is detected
2014-05-10Fix tweetUrl, userUrl table names, fix retweetsPeter Wu1-0/+5
2014-05-10Move SQLException processing in processTweet to MainPeter Wu1-36/+32
Huge diff comes from whitespace diff. Now the tweet is printed with its line number in error cases, and all further insertions are aborted.
2014-05-10Split url to tweetUrl and userUrl, misc fixesPeter Wu1-35/+30
* Insert User URLs. * Fix hash insertion query (copy/paste error...). * Split url to tweetUrl and userUrl as there is no "url" table anymore. * Do not execute queries directly via getStmt(), but execute them via NamedPreparedStatement such that faulty queries can be printed. * Fix buildQuery for more than two primary keys. * Drop comments from prepared statements members in DataFiller, there is nothing that you cannot learn from the variable name. Besides there was a copy/paste error for mentions. * Change order of insertion to ensure consistency. * Inline setting parameters for queries, it is now more transparant.
2014-05-09Use upsert queries, convert to named parameter statementsPeter Wu1-26/+20
Get rid of ispostedby, move it to tweet table ("userid")
2014-05-09Get rid of useless methodPeter Wu1-8/+7
2014-05-09Get rid of DBConnectionPeter Wu1-17/+17
That construct was hiding the Connection instance. Very bad abstraction as I really need it to support transactions. While at it, make the prepared statement objects final such that it is detected when those are not properly initialized. In Main, use try-with-resources, remove a noisy "exit succesfull" [sic] message. Due to the extra try/catch for the db connection (RuntimeException is not OK my friend!), the indentation had to be changed.
2014-05-08Replace JSON by GSON, adding extra validationsPeter Wu1-59/+48
Also change reader method, tweets are not received via an observed but by submitting from the caller. Added TODO WTF here and there, formatted with Alt + Shift + F.
2014-05-07data querries into databaseS1297781-1/+92
2014-05-07Removed the extranous DBQuery and simpel propertyMaurice Laveaux1-10/+25
* InputReader reads from Scanner.
2014-05-07Two different inputs (file and stdin).Maurice Laveaux1-0/+43
* DataFiller fills the database with given input.