com.tradeshift.sdk.assignments.domain.LockAssignment Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2018 Tradeshift Inc. and/or its affiliates. All rights reserved.
*/
package com.tradeshift.sdk.assignments.domain;
import java.util.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.tradeshift.sdk.core.domain.Command;
import com.tradeshift.sdk.core.domain.ContextMsg;
import com.tradeshift.sdk.core.domain.ID;
import com.tradeshift.sdk.core.domain.UserContext;
public class LockAssignment extends ContextMsg implements Command {
private final ID assignmentId;
public LockAssignment(UserContext ctx, ID assignmentId) {
super(ctx);
this.assignmentId = Objects.requireNonNull(assignmentId);
}
public ID getAssignmentId() {
return assignmentId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
final LockAssignment cmd = (LockAssignment) o;
return Objects.equals(assignmentId, cmd.assignmentId);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), assignmentId);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy