Use factory pathern in DAOAbstract.

  - Fix previus commit.

Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com>