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

com.sflpro.identity.api.common.dtos.resource.ResourceDto Maven / Gradle / Ivy

package com.sflpro.identity.api.common.dtos.resource;

import com.sflpro.identity.api.common.dtos.AbstractApiResponse;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * Company: SFL LLC
 * Created on 14/02/2018
 *
 * @author Davit Harutyunyan
 */
public class ResourceDto extends AbstractApiResponse {

    @Deprecated(forRemoval = true)
    private Long id;

    private String type;

    private String identifier;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getIdentifier() {
        return identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("type", type)
                .append("identifier", identifier)
                .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;

        if (!(o instanceof ResourceDto)) return false;

        ResourceDto that = (ResourceDto) o;

        return new EqualsBuilder()
                .appendSuper(super.equals(o))
                .append(id, that.id)
                .append(type, that.type)
                .append(identifier, that.identifier)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .appendSuper(super.hashCode())
                .append(id)
                .append(type)
                .append(identifier)
                .toHashCode();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy