public boolean isUnchanged(CalendarEventModel originalModel){
  if (this == originalModel) {
    return true;
  }
  if (originalModel == null) {
    return false;
  }
  if (!checkOriginalModelFields(originalModel)) {
    return false;
  }
  if (TextUtils.isEmpty(mLocation)) {
    if (!TextUtils.isEmpty(originalModel.mLocation)) {
      return false;
    }
  }
 else   if (!mLocation.equals(originalModel.mLocation)) {
    return false;
  }
  if (TextUtils.isEmpty(mTitle)) {
    if (!TextUtils.isEmpty(originalModel.mTitle)) {
      return false;
    }
  }
 else   if (!mTitle.equals(originalModel.mTitle)) {
    return false;
  }
  if (TextUtils.isEmpty(mDescription)) {
    if (!TextUtils.isEmpty(originalModel.mDescription)) {
      return false;
    }
  }
 else   if (!mDescription.equals(originalModel.mDescription)) {
    return false;
  }
  if (TextUtils.isEmpty(mDuration)) {
    if (!TextUtils.isEmpty(originalModel.mDuration)) {
      return false;
    }
  }
 else   if (!mDuration.equals(originalModel.mDuration)) {
    return false;
  }
  if (mEnd != mOriginalEnd) {
    return false;
  }
  if (mStart != mOriginalStart) {
    return false;
  }
  if (mOriginalId != originalModel.mOriginalId && mOriginalId != originalModel.mId) {
    return false;
  }
  if (TextUtils.isEmpty(mRrule)) {
    if (!TextUtils.isEmpty(originalModel.mRrule)) {
      boolean syncIdNotReferenced=mOriginalSyncId == null || !mOriginalSyncId.equals(originalModel.mSyncId);
      boolean localIdNotReferenced=mOriginalId == -1 || !(mOriginalId == originalModel.mId);
      if (syncIdNotReferenced && localIdNotReferenced) {
        return false;
      }
    }
  }
 else   if (!mRrule.equals(originalModel.mRrule)) {
    return false;
  }
  return true;
}

public boolean isUnchanged ( CalendarEventModel originalModel ) { if ( this == originalModel ) { return true ; } if ( originalModel == null ) { return false ; } if ( ! checkOriginalModelFields ( originalModel ) ) { return false ; } if ( TextUtils . isEmpty ( mLocation ) ) { if ( ! TextUtils . isEmpty ( originalModel . mLocation ) ) { return false ; } } else if ( ! mLocation . equals ( originalModel . mLocation ) ) { return false ; } if ( TextUtils . isEmpty ( mTitle ) ) { if ( ! TextUtils . isEmpty ( originalModel . mTitle ) ) { return false ; } } else if ( ! mTitle . equals ( originalModel . mTitle ) ) { return false ; } if ( TextUtils . isEmpty ( mDescription ) ) { if ( ! TextUtils . isEmpty ( originalModel . mDescription ) ) { return false ; } } else if ( ! mDescription . equals ( originalModel . mDescription ) ) { return false ; } if ( TextUtils . isEmpty ( mDuration ) ) { if ( ! TextUtils . isEmpty ( originalModel . mDuration ) ) { return false ; } } else if ( ! mDuration . equals ( originalModel . mDuration ) ) { return false ; } if ( mEnd != mOriginalEnd ) { return false ; } if ( mStart != mOriginalStart ) { return false ; } if ( mOriginalId != originalModel . mOriginalId && mOriginalId != originalModel . mId ) { return false ; } if ( TextUtils . isEmpty ( mRrule ) ) { if ( ! TextUtils . isEmpty ( originalModel . mRrule ) ) { boolean syncIdNotReferenced = mOriginalSyncId == null || ! mOriginalSyncId . equals ( originalModel . mSyncId ) ; boolean localIdNotReferenced = mOriginalId == - 1 || ! ( mOriginalId == originalModel . mId ) ; if ( syncIdNotReferenced && localIdNotReferenced ) { return false ; } } } else if ( ! mRrule . equals ( originalModel . mRrule ) ) { return false ; } return true ; }
whether the event has been modified based on its original model .
