SarsEvent.java

package com.tradecloud.domain.shipment.clearing;

import com.tradecloud.domain.event.EnumTypedEvent;
import com.tradecloud.domain.event.Event;
import com.tradecloud.domain.export.EdifactStatus;

import javax.persistence.*;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "sarsevent")
@Access(AccessType.FIELD)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "SarsEvent")
public class SarsEvent extends Event implements EnumTypedEvent<EdifactStatus> {

    private static final long serialVersionUID = 1L;

    @Enumerated(EnumType.STRING)
    private EdifactStatus eventType;

    public SarsEvent(EdifactStatus eventTypeParam, String username) {
        super(username);
        this.eventType = eventTypeParam;
    }

    public SarsEvent() {
    }

    public SarsEvent(String username) {
        super(username);
    }

    @Override
    public EdifactStatus getEventType() {
        return eventType;
    }

    @Override
    public void setEventType(EdifactStatus eventType) {
    }
}