package oracle.byop.maf.data.entities;

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

/**
 *
 * Title:   Bring Your Own Project (BYOP): Hackathon
 * Schema:  ADF Summit
 * Type:    Entity
 *
 * @author Frank Nimphius - August, 2014
 *  */
public class CreditRating {
    
    private Integer id = null;
    private String  creditRating = null;
    private String  decription = null;
    private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);

    public CreditRating() {
        super();    
    }
    
    public CreditRating(Integer id, String creditRating, String description) {
        super();
        this.id = id;
        this.creditRating = creditRating;
        this.decription = description;
    }

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

    public Integer getId() {
        return id;
    }

    public void setCreditRating(String creditRating) {
        String oldCreditRating = this.creditRating;
        this.creditRating = creditRating;
        propertyChangeSupport.firePropertyChange("creditRating", oldCreditRating, creditRating);
    }

    public String getCreditRating() {
        return creditRating;
    }

    public void setDecription(String decription) {
        String oldDecription = this.decription;
        this.decription = decription;
        propertyChangeSupport.firePropertyChange("decription", oldDecription, decription);
    }

    public String getDecription() {
        return decription;
    }

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

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