Implemented (mostly) BaseDAO.stg based on QueryJ-2.0.6 template. refs #354