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

com.flyfish.oauth.domain.raw.Domain Maven / Gradle / Ivy

package com.flyfish.oauth.domain.raw;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public abstract class Domain {

    /**
     * 主键
     */
    protected String id;
    /**
     * 编号
     */
    protected String code;
    /**
     * 名称
     */
    protected String name;

    @Override
    public int hashCode() {
        if (id != null) {
            return id.hashCode();
        }
        return super.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj instanceof Domain) {
            Domain comparing = (Domain) obj;
            if (this.getId() == null || comparing.getId() == null) {
                return false;
            }
            return this.getId().equals(comparing.getId());
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy