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;

/**
 * The persistent class for the vgras072 database table.
 */
@Entity
@Table(name = "vgras072")
public class SoundCode extends RAASClientSpecificEntity implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Column(name = "sound_name", nullable = false, length = 50)
    private String soundCodeName;

    public String getSoundCodeKey() {
        return soundCodeKey;
    }

    public void setSoundCodeKey(String soundCodeKey) {
        this.soundCodeKey = soundCodeKey;
    }

    public String getSoundCodeName() {
        return soundCodeName;
    }

    public void setSoundCodeName(String soundCodeName) {
        this.soundCodeName = soundCodeName;
    }

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

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

}