package com.sonymusic.dx.persistence.gras;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

import java.io.Serializable;

@Entity
@Table(name = "vgras060")
public class ConfigurationCategory extends RAASClientSpecificEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "config_cat_key", nullable = false, length = 1)
    private String configurationCategoryKey;

    @Column(name = "config_cat_name", nullable = false, length = 50)
    private String configurationCategoryName;

    public String getConfigurationCategoryKey() {
        return configurationCategoryKey;
    }

    public void setConfigurationCategoryKey(String configurationCategoryKey) {
        this.configurationCategoryKey = configurationCategoryKey;
    }

    public String getConfigurationCategoryName() {
        return configurationCategoryName;
    }

    public void setConfigurationCategoryName(String configurationCategoryName) {
        this.configurationCategoryName = configurationCategoryName;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getConfigurationCategoryKey() == null) ? 0 : getConfigurationCategoryKey().hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof ConfigurationCategory))
            return false;
        ConfigurationCategory other = (ConfigurationCategory) obj;
        if (getConfigurationCategoryKey() == null) {
            if (other.getConfigurationCategoryKey() != null)
                return false;
        } else if (!getConfigurationCategoryKey().equals(other.getConfigurationCategoryKey()))
            return false;
        return true;
    }

}
