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);
  }
}

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 ) ; } }
when an object is finished saving , it gets an objectid . then it should call this method to clean up the bookeeping around ids .
