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