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 Image {
    
    private Integer id = null;
    private String format = null;
    private String filename = null;
    private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);

    public Image() {
        super();
    }

    public Image(Integer id, String format, String filename) {
        super();
        this.id = id;
        this.format = format;
        this.filename = filename;
    }


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

    public Integer getId() {
        return id;
    }

    public void setFormat(String format) {
        String oldFormat = this.format;
        this.format = format;
        propertyChangeSupport.firePropertyChange("format", oldFormat, format);
    }

    public String getFormat() {
        return format;
    }

    public void setFilename(String filename) {
        String oldFilename = this.filename;
        this.filename = filename;
        propertyChangeSupport.firePropertyChange("filename", oldFilename, filename);
    }

    public String getFilename() {
        return filename;
    }

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

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