question: void updateObjectId ( ParseObject object , String oldObjectId , String newObjectId ) { if ( oldObjectId != null ) { if ( oldObjectId . equals ( newObjectId ) ) { return ; } throw new RuntimeException ( "objectIds cannot be changed in offline mode." ) ; } String className = object . getClassName ( ) ; Pair < String , String > classNameAndNewObjectId = Pair . create ( className , newObjectId ) ; synchronized ( lock ) { ParseObject existing = classNameAndObjectIdToObjectMap . get ( classNameAndNewObjectId ) ; if ( existing != null && existing != object ) { throw new RuntimeException ( "Attempted to change an objectId to one that's " + "already known to the Offline Store." ) ; } classNameAndObjectIdToObjectMap . put ( classNameAndNewObjectId , object ) ; } }
target:  When an object is finished saving, it gets an objectId. Then it should call this method to clean up the bookeeping around ids.