Refactor DAO code to adapt android development environment