Refactored to use the criteria API instead of native SQL (cleaner and easier to test) and implemented integration tests with an in-memory database.
Updated .travis.yml to work with a grails app