Implemented generic EntityManager class