code: protected boolean setFieldIfNecessary(String field, Object value) {
  		if (!isOpen())
  			throw new ClosedObjectException("The Document object is closed.");
  
  		if (!compareFieldValue(field, value)) {
  			_doc.setField(field, value);
  			return true;
  		}
  
  		return false;
  	}
docs: Verifies if the new value is different from the field's old value. It's
  useful, for example, in NoSQL databases that replicates data between
  servers. This verification prevents to mark a field as modified and to be
  replicated needlessly.
  
  @param field
  the field that we are checking before to be modified
  @param value
  the new value
  @return true if the new and the old values are different and the value
  was changed.