GoodsReceivedDocument.java
package com.tradecloud.domain.document;
import com.tradecloud.domain.settlement.GoodsReceivedAllocation;
import com.tradecloud.domain.shipment.Shipment;
import com.tradecloud.domain.supplier.Creditor;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
/**
* GoodsReceivedDocument.
*/
@Entity
@Table(name = "goodsreceiveddocument")
@Access(AccessType.FIELD)
@XmlAccessorType(XmlAccessType.FIELD)
public class GoodsReceivedDocument extends Document {
private static final long serialVersionUID = 1L;
private BigDecimal totalUnitQuantity;
@ManyToOne
private Shipment shipment;
@OneToMany
private Set<GoodsReceivedAllocation> goodsReceivedAllocations = new HashSet<GoodsReceivedAllocation>();
private String historicalShipmentNumber;
private String historicalShipmentReference;
public BigDecimal getTotalUnitQuantity() {
return totalUnitQuantity;
}
public void setTotalUnitQuantity(BigDecimal totalUnitQuantity) {
this.totalUnitQuantity = totalUnitQuantity;
}
public Shipment getShipment() {
return shipment;
}
public void setShipment(Shipment shipment) {
this.shipment = shipment;
}
public Set getGoodsReceivedAllocations() {
return goodsReceivedAllocations;
}
public void setGoodsReceivedAllocations(Set goodsReceivedAllocations) {
this.goodsReceivedAllocations = goodsReceivedAllocations;
}
public String getHistoricalShipmentNumber() {
return historicalShipmentNumber;
}
public void setHistoricalShipmentNumber(String historicalShipmentNumber) {
this.historicalShipmentNumber = historicalShipmentNumber;
}
public String getHistoricalShipmentReference() {
return historicalShipmentReference;
}
public void setHistoricalShipmentReference(String historicalShipmentReference) {
this.historicalShipmentReference = historicalShipmentReference;
}
@Override
public DocumentType getDocumentType() {
return DocumentType.GOODS_RECEIVED;
}
@Override
public Creditor getCreditor() {
return null;
}
}