ShipmentEvent.java
package com.tradecloud.domain.event;
import com.tradecloud.domain.model.shipment.ShipmentState;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@Entity
@Table(name = "shipmentevent")
@Access(AccessType.FIELD)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "ShipmentEvent")
public class ShipmentEvent extends Event implements EnumTypedEvent<ShipmentEventType> {
/**
* UID.
*/
private static final long serialVersionUID = 1L;
/**
* Event type.
*/
@Enumerated(EnumType.STRING)
private ShipmentEventType eventType;
@Enumerated(EnumType.STRING)
private ShipmentState shipmentState;
public ShipmentEvent(ShipmentEventType eventTypeParam, String username, ShipmentState shipmentState) {
super(username);
this.eventType = eventTypeParam;
this.shipmentState = shipmentState;
}
public ShipmentEvent() {
}
public ShipmentEvent(String username) {
super(username);
}
@Override
public ShipmentEventType getEventType() {
return eventType;
}
@Override
public void setEventType(ShipmentEventType eventTypeParam) {
this.eventType = eventTypeParam;
}
public ShipmentState getShipmentState() {
return shipmentState;
}
}