Get rid of deprecated method in GetEntities

Change-Id: I753de50467924067307883969bb7520cd4cc4876
Merge "Get rid of deprecated method in GetEntities"