/*
 * VOCCodeEntity.java
 *
 * Created on 7 ������� 2007, 2:39 ��
 *
 * 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 VOCCodeEntity
 * 
 * @author tdi
 */
@Entity
@Table(name = "VOCCodes") // Table name
public class VOCCodeEntity implements Serializable {

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

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

    /**
     * Sets the id of this VOCCodeEntity 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.getId() != null ? this.getId().hashCode() : 0);
        return hash;
    }

    /**
     * Determines whether another object is equal to this VOCCodeEntity.  The result is 
     * <code>true</code> if and only if the argument is not null and is a VOCCodeEntity 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 VOCCodeEntity)) {
            return false;
        }
        VOCCodeEntity other = (VOCCodeEntity)object;
        if (this.getId() != other.getId() && (this.getId() == null || !this.getId().equals(other.getId()))) 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.VOCCodeEntity[id=" + getId() + "]";
    }

    public String getVOCCODE() {
        return VOCCODE;
    }

    public void setVOCCODE(String VOCCODE) {
        this.VOCCODE = VOCCODE;
    }

    public String getDescription() {
        return Description;
    }

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

    public

    String getLang() {
        return lang;
    }

    public void setLang(String lang) {
        this.lang = lang;
    }
    
}
