public static Object entityToPojo(final Entity entity, final AbstractClassMetaData acmd,
final ClassLoaderResolver clr, ObjectManager om,
boolean ignoreCache, final FetchPlan fetchPlan) {
final DatastoreManager storeMgr = (DatastoreManager) om.getStoreManager();
storeMgr.validateMetaDataForClass(acmd, clr);
FieldValues fv = new FieldValues() {
public void fetchFields(StateManager sm) {
sm.replaceFields(
acmd.getPKMemberPositions(),
new DatastoreFieldManager(sm, storeMgr, entity, DatastoreFieldManager.Operation.READ));
}