Refactored code for base abstract dao and single PK dao functionality