Refactored LocationsDao.

Improved LocationsDao code security - also List parameters are escaped
by the JDBC driver.