code: public void addCurrentEntity(Object entity) {
          Object identifier = identifier(entity);
          Object o = memento.get(identifier);
          if (o == null) {
              inserted.add(entity);
          } else {
              potentiallyChanged.put(identifier, entity);
          }
      }
docs: Use this entity as the new
  
  @param entity
  the entity to be used as the new