package oracle.maf.data.entities;

import oracle.adfmf.java.beans.PropertyChangeListener;
import oracle.adfmf.java.beans.PropertyChangeSupport;

public class Country {
    
    
    private Integer id = null;
    private String country = null;
    private Integer regionId = null;
    private String countryCode = null;
    private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);

    public Country() {
        super();
    }

    public Country(Integer id, String country, Integer regionId, String countryCode) {
        super();
        
        this.id = id;
        this.country = country;
        this.regionId = regionId;
        this.countryCode = countryCode;
    }


    public void setId(Integer id) {
        Integer oldId = this.id;
        this.id = id;
        propertyChangeSupport.firePropertyChange("id", oldId, id);
    }

    public Integer getId() {
        return id;
    }

    public void setCountry(String country) {
        String oldCountry = this.country;
        this.country = country;
        propertyChangeSupport.firePropertyChange("country", oldCountry, country);
    }

    public String getCountry() {
        return country;
    }

    public void setRegionId(Integer regionId) {
        Integer oldRegionId = this.regionId;
        this.regionId = regionId;
        propertyChangeSupport.firePropertyChange("regionId", oldRegionId, regionId);
    }

    public Integer getRegionId() {
        return regionId;
    }

    public void setCountryCode(String countryCode) {
        String oldCountryCode = this.countryCode;
        this.countryCode = countryCode;
        propertyChangeSupport.firePropertyChange("countryCode", oldCountryCode, countryCode);
    }

    public String getCountryCode() {
        return countryCode;
    }

    public void addPropertyChangeListener(PropertyChangeListener l) {
        propertyChangeSupport.addPropertyChangeListener(l);
    }

    public void removePropertyChangeListener(PropertyChangeListener l) {
        propertyChangeSupport.removePropertyChangeListener(l);
    }
}
