upgrade EntityFactory to EntityManager which has fanctionalities of getEntity and getArray