Skip to content
MembershipEntity.java 1.19 KiB
Newer Older
package it.inaf.ia2.gms.persistence.model;

Sonia Zorba's avatar
Sonia Zorba committed
import java.util.Objects;
import javax.validation.constraints.NotEmpty;

public class MembershipEntity {
    private String userId;

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getUserId() {
        return userId;
    public void setUserId(String userId) {
        this.userId = userId;
Sonia Zorba's avatar
Sonia Zorba committed

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 67 * hash + Objects.hashCode(this.groupId);
        hash = 67 * hash + Objects.hashCode(this.userId);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final MembershipEntity other = (MembershipEntity) obj;
        if (!Objects.equals(this.groupId, other.groupId)) {
            return false;
        }
        return Objects.equals(this.userId, other.userId);
    }