Country.java 1.08 KB
package org.legrog.entities;

import javax.persistence.*;

@Entity
//@Table(name="pays")
public class Country /*  extends org.roliste.data.DbEntity */ {
    //    @Column(name = "ID_PAYS")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)  /* Permet la population */
    @Column(name="COUNTRY_ID")
    private int countryId;
    private String countryName;

    public int getCountryId() {
        return countryId;
    }

    public void setCountryId(int countryId) {
        this.countryId = countryId;
    }

    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName;
    }

    /**
     * Returns a string representation of this country definition.
     * @return a string representing this country definition.
     * @hidden
     */
    public String toString()
    {
        StringBuilder sb = new StringBuilder();

        sb.append("ID_PAYS=");
        sb.append(countryId);

        sb.append(" LIB_PAYS=");
        sb.append(countryName);

        return sb.toString();
    }
}