
package de.ivu.elect.business.person.boundary;

import java.io.Serializable;

import javax.enterprise.event.Event;
import javax.inject.Inject;

public class BerufUpdatedEvent implements Serializable {

  private static final long serialVersionUID = 1L;

  private String oldValue;

  private String newValue;

  @Inject
  transient Event<BerufUpdatedEvent> event;

  public void sendChangeEvent(String oldValue, String newValue) {
    event.fire(new BerufUpdatedEvent(oldValue, newValue));
  }

  public BerufUpdatedEvent() {
    // default Konstruktor
  }

  public BerufUpdatedEvent(String oldValue, String newValue) {
    this.oldValue = oldValue;
    this.newValue = newValue;
  }

  public String getOldValue() {
    return oldValue;
  }

  public String getNewValue() {
    return newValue;
  }
}