Move the XML files to the impl so we can have tests use them with out cross project dependencies.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124023 66ffb92e-73f9-0310-93c1-f5514f145a0a
Extract API call to see if event is a valid one.

This makes testing easier and creates cleaner seperation.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124024 66ffb92e-73f9-0310-93c1-f5514f145a0a
Add some performance testing.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124025 66ffb92e-73f9-0310-93c1-f5514f145a0a
Here we are optimistic about events already existing in the database.

This optimises for when rows already exist and pays the penalty of multiple SQL statements when it's the first time we see the event. It also stops the read, update save loop by doing the increment in the DB.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124026 66ffb92e-73f9-0310-93c1-f5514f145a0a
Make EventStat sortable.

This is so that all transactions insert events in the same order so deadlocks don't occur. If this works it should be done to other types being updated.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124030 66ffb92e-73f9-0310-93c1-f5514f145a0a