fixed some null in delete method and add set method in DaoFactory