OrderDates.java
package com.tradecloud.domain.model.ordermanagement;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Date;
@Embeddable
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "OrderDates")
public class OrderDates implements Serializable {
private static final long serialVersionUID = 1L;
/**
* The date the order was received from the supplier (Proforma invoice date).
*/
@Temporal(TemporalType.TIMESTAMP)
@Column(nullable = false)
@NotNull(message = "Order Date is required")
@XmlAttribute(required = true)
private Date orderDate;
/**
* The date the goods are available for collection at the supplier's warehouse.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date availabilityDate;
/**
* The earliest date the order can ship.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date earliestShipmentDate;
/**
* The latest date the order can ship.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date latestShipmentDate;
/**
* The date the goods are required at the final destination.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date requiredOnSiteDate;
/**
* The date the goods are available at the foreign warehouse.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date inWarehouseDate;
/**
* The date the goods were received at the final destination.
* This field should only be editable when an order is linked to a shipment.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date goodsReceivedDate;
/**
* The estimate arrival date of the order.
* May be populated by the LSP, if config is set no updates will be allowed on the order.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date estimatedShipmentDate;
/**
* The date the shipping clerk contacted the vendor/supplier to follow up on the shipment of the order.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date vendorCheckSentDate;
/**
* The date the supplier responded to the query.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date vendorResponseReceivedDate;
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date inStoreDate;
/**
* The date on which the supplier contacted the LSP to book space on a vessel.
* May be populated by the LSP, if config is set no updates will be allowed on the order.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date bookingDate;
/**
* The planned shipment date of the order.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date plannedShipmentDate;
/**
* The estimate arrival date of the order .
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date estimatedArrivalDate;
/**
* The date the LSP receives the goods from the supplier.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date freightReceivedDate;
/**
* The arrival date at the place of discharge.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date arrivalAtPlaceOfDischargeDate;
/**
* Original latest shipment date is order's latest shipment date, editable until order is signed off.
* TR-249
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date originalLatestShipmentDate;
/**
* TTG-1765.
*/
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date proformaReceivedDate;
private String lastDateCalculationTrigger;
@Temporal(TemporalType.TIMESTAMP)
private Date lspPaymentDate;
@Temporal(TemporalType.TIMESTAMP)
private Date serviceFeePaymentDate;
private String dateCalculationPoint;
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date supplierBookingRequestDate;
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date cargoReadyDate;
@Temporal(TemporalType.TIMESTAMP)
@XmlAttribute
private Date originalCargoReadyDate;
public OrderDates() {
}
public Date getAvailabilityDate() {
return availabilityDate;
}
public void setAvailabilityDate(Date availabilityDate) {
this.availabilityDate = availabilityDate;
}
public Date getEarliestShipmentDate() {
return earliestShipmentDate;
}
public void setEarliestShipmentDate(Date earliestShipmentDate) {
this.earliestShipmentDate = earliestShipmentDate;
}
public Date getEstimatedShipmentDate() {
return estimatedShipmentDate;
}
public void setEstimatedShipmentDate(Date estimatedShipmentDate) {
this.estimatedShipmentDate = estimatedShipmentDate;
}
public Date getLatestShipmentDate() {
return latestShipmentDate;
}
public void setLatestShipmentDate(Date latestShipmentDate) {
this.latestShipmentDate = latestShipmentDate;
}
public Date getRequiredOnSiteDate() {
return requiredOnSiteDate;
}
public void setRequiredOnSiteDate(Date requiredOnSiteDate) {
this.requiredOnSiteDate = requiredOnSiteDate;
}
public Date getInWarehouseDate() {
return inWarehouseDate;
}
public void setInWarehouseDate(Date inWarehouseDate) {
this.inWarehouseDate = inWarehouseDate;
}
public Date getGoodsReceivedDate() {
return goodsReceivedDate;
}
public void setGoodsReceivedDate(Date goodsReceivedDate) {
this.goodsReceivedDate = goodsReceivedDate;
}
public Date getOrderDate() {
return orderDate;
}
public void setOrderDate(Date orderDate) {
this.orderDate = orderDate;
}
public Date getBookingDate() {
return bookingDate;
}
public void setBookingDate(Date bookingDate) {
this.bookingDate = bookingDate;
}
public Date getEstimatedArrivalDate() {
return estimatedArrivalDate;
}
public void setEstimatedArrivalDate(Date estimatedArrivalDate) {
this.estimatedArrivalDate = estimatedArrivalDate;
}
public Date getFreightReceivedDate() {
return freightReceivedDate;
}
public void setFreightReceivedDate(Date freightReceivedDate) {
this.freightReceivedDate = freightReceivedDate;
}
public Date getPlannedShipmentDate() {
return plannedShipmentDate;
}
public void setPlannedShipmentDate(Date plannedShipmentDate) {
this.plannedShipmentDate = plannedShipmentDate;
}
public Date getVendorCheckSentDate() {
return vendorCheckSentDate;
}
public void setVendorCheckSentDate(Date vendorCheckSentDate) {
this.vendorCheckSentDate = vendorCheckSentDate;
}
public Date getVendorResponseReceivedDate() {
return vendorResponseReceivedDate;
}
public void setVendorResponseReceivedDate(Date vendorResponseReceivedDate) {
this.vendorResponseReceivedDate = vendorResponseReceivedDate;
}
public Date getInStoreDate() {
return inStoreDate;
}
public void setInStoreDate(Date inStoreDate) {
this.inStoreDate = inStoreDate;
}
public Date getArrivalAtPlaceOfDischargeDate() {
return arrivalAtPlaceOfDischargeDate;
}
public void setArrivalAtPlaceOfDischargeDate(Date arrivalAtPlaceOfDischargeDate) {
this.arrivalAtPlaceOfDischargeDate = arrivalAtPlaceOfDischargeDate;
}
public Date getOriginalLatestShipmentDate() {
return originalLatestShipmentDate;
}
public void setOriginalLatestShipmentDate(Date originalLatestShipmentDate) {
this.originalLatestShipmentDate = originalLatestShipmentDate;
}
public Date getProformaReceivedDate() {
return proformaReceivedDate;
}
public void setProformaReceivedDate(Date proformaReceivedDate) {
this.proformaReceivedDate = proformaReceivedDate;
}
public String getLastDateCalculationTrigger() {
return lastDateCalculationTrigger;
}
public void setLastDateCalculationTrigger(String lastDateCalculationTrigger) {
this.lastDateCalculationTrigger = lastDateCalculationTrigger;
}
public Date getLspPaymentDate() {
return lspPaymentDate;
}
public void setLspPaymentDate(Date lspPaymentDate) {
this.lspPaymentDate = lspPaymentDate;
}
public Date getServiceFeePaymentDate() {
return serviceFeePaymentDate;
}
public void setServiceFeePaymentDate(Date serviceFeePaymentDate) {
this.serviceFeePaymentDate = serviceFeePaymentDate;
}
public Date getCargoReadyDate() {
return cargoReadyDate;
}
public void setCargoReadyDate(Date cargoReadyDate) {
this.cargoReadyDate = cargoReadyDate;
}
public Date getOriginalCargoReadyDate() {
return originalCargoReadyDate;
}
public void setOriginalCargoReadyDate(Date originalCargoReadyDate) {
this.originalCargoReadyDate = originalCargoReadyDate;
}
@Override
public String toString() {
StringBuilder sb =
new StringBuilder("orderDate=").append(orderDate).append(",availabilityDate=").append(availabilityDate)
.append(",earliestShipmentDate=").append(earliestShipmentDate).append(",latestShipmentDate=").append(latestShipmentDate)
.append(",requiredOnSiteDate=").append(requiredOnSiteDate).append(",inWarehouseDate=").append(inWarehouseDate)
.append(",goodsReceivedDate=").append(goodsReceivedDate).append(",invoicedDate=").append(",invoiceSettledDate=")
.append(",estimatedShipmentDate=").append(estimatedShipmentDate).append(",vendorCheckSentDate=")
.append(vendorCheckSentDate).append(",vendorResponseReceivedDate=").append(vendorResponseReceivedDate)
.append(",bookingDate=").append(bookingDate).append(",plannedShipmentDate=").append(plannedShipmentDate)
.append(",estimatedArrivalDate=").append(estimatedArrivalDate).append(",freightReceivedDate=").append(freightReceivedDate)
.append(",inStoreDate=").append(inStoreDate).append(",arrivalAtPlaceOfDischargeDate=")
.append(",originalLatestShipmentDate=").append(originalLatestShipmentDate)
.append(",arrivalAtPlaceOfDischargeDate=").append(arrivalAtPlaceOfDischargeDate)
.append(",proformaReceivedDate=").append(proformaReceivedDate);
return sb.toString();
}
public void setDateCalculationPoint(String dateType) {
dateCalculationPoint = dateType;
}
public String getDateCalculationPoint() {
return dateCalculationPoint;
}
public Date getSupplierBookingRequestDate() {
return supplierBookingRequestDate;
}
public void setSupplierBookingRequestDate(Date supplierBookingRequestDate) {
this.supplierBookingRequestDate = supplierBookingRequestDate;
}
}