/*
 * NutsEU.java
 *
 * Created on 11 ������� 2007, 1:45 ��
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.ellectra.eunuts.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Entity class NutsEU
 * 
 * @author tdi
 */
@Entity
public class NutsEU implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    
    private String code;
    
    private String country;
    
    private String level1;
    
    private String level2;
    
    private String level3;
    
    private String languagenuts;
    /** Creates a new instance of NutsEU */
    public NutsEU() {
    }

    /**
     * Gets the id of this NutsEU.
     * @return the id
     */
    public Long getId() {
        return this.id;
    }

    /**
     * Sets the id of this NutsEU to the specified value.
     * @param id the new id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * Returns a hash code value for the object.  This implementation computes 
     * a hash code value based on the id fields in this object.
     * @return a hash code value for this object.
     */
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    /**
     * Determines whether another object is equal to this NutsEU.  The result is 
     * <code>true</code> if and only if the argument is not null and is a NutsEU object that 
     * has the same id field values as this object.
     * @param object the reference object with which to compare
     * @return <code>true</code> if this object is the same as the argument;
     * <code>false</code> otherwise.
     */
    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NutsEU)) {
            return false;
        }
        NutsEU other = (NutsEU)object;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) return false;
        return true;
    }

    /**
     * Returns a string representation of the object.  This implementation constructs 
     * that representation based on the id fields.
     * @return a string representation of the object.
     */
    @Override
    public String toString() {
        return "org.ellectra.eunuts.entity.NutsEU[id=" + id + "]";
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getLevel1() {
        return level1;
    }

    public void setLevel1(String level1) {
        this.level1 = level1;
    }

    public String getLevel2() {
        return level2;
    }

    public void setLevel2(String level2) {
        this.level2 = level2;
    }

    public String getLevel3() {
        return level3;
    }

    public void setLevel3(String level3) {
        this.level3 = level3;
    }

    public String getLanguagenuts() {
        return languagenuts;
    }

    public void setLanguagenuts(String languagenuts) {
        this.languagenuts = languagenuts;
    }
    
}
