All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.weaverplatform.protocol.model.RemoveRelationOperation Maven / Gradle / Ivy

There is a newer version: 3.7.2
Show newest version
package com.weaverplatform.protocol.model;

import java.util.Objects;

/**
 * @author Mohamad Alamili
 */
public class RemoveRelationOperation extends RemovePropertyOperation {

  private CreateRelationOperation _previous;

  public RemoveRelationOperation(String id) {
    super(id);
  }

  @Deprecated
  public RemoveRelationOperation(String id, String removeId) {
    super(id, removeId);
  }

  public WriteOperationAction getAction(){
    return WriteOperationAction.REMOVE_RELATION;
  }

  public void setPrevious(CreateRelationOperation previous) {
    this._previous = previous;
  }

  public CreateRelationOperation getPrevious() {
    return _previous;
  }

  @Override
  public boolean equals(Object obj) {
    if(!(obj instanceof RemoveRelationOperation)) {
      return false;
    }
    RemoveRelationOperation other = (RemoveRelationOperation) obj;
    return Objects.equals(getId(), other.getId())
      && Objects.equals(getGraph(), other.getGraph());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy