package com.bcxin.Infrastructures.events;

import org.springframework.context.ApplicationEvent;

public abstract class DomainEventAbstract<T> extends ApplicationEvent {

    /**
     * Create a new {@code ApplicationEvent}.
     *
     * @param source the object on which the event initially occurred or with
     *               which the event is associated (never {@code null})
     */
    public DomainEventAbstract(T data) {
        super(data);
    }

    public T getData() {
        return (T) this.getSource();
    }
}
