Refactored LocationsDao.

Improved LocationsDao code security - modified code so that query
parameters will be escaped appropriately by the JDBC driver.