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

package org.ellectra.entity;

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

/**
 * Entity class CPVCodesEntity
 * 
 * @author tdi
 */
@Entity
@Table(name = "CPVCodesEntity") // Table name
public class CPVCodesEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    private Long id;
    
    @Column(name = "CPVCODE")
    private String CPVCODE;
    
    @Column(name = "Description")
    private String Description;
    
    @Column(name = "Languagecpv")
    private String Languagecpv;
    
    /** Creates a new instance of CPVCodesEntity */
    public CPVCodesEntity() {
    }

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

    /**
     * Sets the id of this CPVCodesEntity 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 CPVCodesEntity.  The result is 
     * <code>true</code> if and only if the argument is not null and is a CPVCodesEntity 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 CPVCodesEntity)) {
            return false;
        }
        CPVCodesEntity other = (CPVCodesEntity)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.entity.CPVCodesEntity[id=" + id + "]";
    }

    public String getCPVCODE() {
        return CPVCODE;
    }

    public void setCPVCODE(String CPVCODE) {
        this.CPVCODE = CPVCODE;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    

    public String getLanguagecpv() {
        return Languagecpv;
    }

    public void setLanguagecpv(String Languagecpv) {
        this.Languagecpv = Languagecpv;
    }
    
}
