
com.weaverplatform.protocol.model.ChangeRelationKeyOperation Maven / Gradle / Ivy
package com.weaverplatform.protocol.model;
import java.util.Objects;
public class ChangeRelationKeyOperation extends WriteOperation{
private String relationKey, newRelationKey;
public ChangeRelationKeyOperation(String id, String graph, String relationKey, String newRelationKey) {
super(id);
this.setGraph(graph);
this.relationKey = relationKey;
this.newRelationKey = newRelationKey;
}
public String getRelationKey() {
return relationKey;
}
public String getNewRelationKey() {
return newRelationKey;
}
@Override
public WriteOperationAction getAction() {
return WriteOperationAction.CHANGE_RELATION_KEY;
}
@Override
public boolean equals(Object obj) {
if(!(obj instanceof ChangeRelationKeyOperation)) {
return false;
}
ChangeRelationKeyOperation other = (ChangeRelationKeyOperation) obj;
return Objects.equals(getId(), other.getId())
&& Objects.equals(getGraph(), other.getGraph())
&& Objects.equals(getRelationKey(), other.getRelationKey())
&& Objects.equals(getNewRelationKey(), other.getNewRelationKey());
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), getRelationKey(), getNewRelationKey());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy