ContainerClientConfig.java
package com.tradecloud.domain.configuration;
import com.tradecloud.common.base.PersistenceBase;
import com.tradecloud.domain.common.ContainerUsageInitializationType;
import com.tradecloud.domain.common.DecisionType;
import javax.persistence.*;
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;
/**
* A holder for container client configuration values.
*/
@Entity
@Table(name = "containerclientconfig")
@Access(AccessType.FIELD)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "ContainerClientConfig")
public class ContainerClientConfig extends PersistenceBase {
private static final long serialVersionUID = 1L;
/**
* Indicates whether to force the creation of a packing list before shipment sign-off.
* Defaults to true.
*/
@XmlAttribute
@NotNull
private boolean usePackingLists;
/**
* Validation or warning at the point of user action of shipment sign-off.
* Defaults to {@link DecisionType#YES}.
*/
@Enumerated(value = EnumType.STRING)
@XmlAttribute
@NotNull
private DecisionType validatePackingListAndCommercialInvoiceQuanties;
/**
* Indicates whether to validate the existence of containers. This is used as a completeness check before the action of shipment sign off.
* Defaults to true.
*/
@XmlAttribute
@NotNull
private boolean validateExistenceOfContainers;
/**
* When creating containers whether or not to auto-populate container usages for each order assigned to the consignment.
*/
@XmlAttribute
@NotNull
private boolean autoPopulateContainerUsages;
/**
* How the container usages are initialized. All with Zero, or with the quantity divided evenly.
*/
@Enumerated(value = EnumType.STRING)
@XmlAttribute
@NotNull
private ContainerUsageInitializationType containerUsageInitialization;
/**
* If true, users should be able to simply allocate an order against a container/s for logistics track and trace purposes without having to
* capture unit quantities.
*/
@XmlAttribute
@NotNull
private boolean allowPartialPackingLists;
/**
* Clients can decide whether to validate container references or not.
*/
@XmlAttribute
@NotNull
private boolean validateContainerReference;
/**
* if true, user must capture gross weight greater than zero.
*/
@XmlAttribute
@NotNull
private boolean validateGrossWeight;
@XmlAttribute
@NotNull
private boolean autoCalculateVolumeWeight;
@Enumerated(value = EnumType.STRING)
@NotNull
private PackingListProportion packingListProportion;
private boolean allowLCLPerShippingMode;
private boolean autoCalculateContainer;
@NotNull
private boolean updatePackingListOnCommercialInvoiceSignOff;
private boolean autoPopulateNumberAtPODUsingShipMode;
public boolean isUsePackingLists() {
return usePackingLists;
}
public void setUsePackingLists(boolean usePackingLists) {
this.usePackingLists = usePackingLists;
}
public DecisionType getValidatePackingListAndCommercialInvoiceQuanties() {
return validatePackingListAndCommercialInvoiceQuanties;
}
public void setValidatePackingListAndCommercialInvoiceQuanties(DecisionType validatePackingListAndCommercialInvoiceQuanties) {
this.validatePackingListAndCommercialInvoiceQuanties = validatePackingListAndCommercialInvoiceQuanties;
}
public boolean isValidateExistenceOfContainers() {
return validateExistenceOfContainers;
}
public void setValidateExistenceOfContainers(boolean validateExistenceOfContainers) {
this.validateExistenceOfContainers = validateExistenceOfContainers;
}
public boolean isAutoPopulateContainerUsages() {
return autoPopulateContainerUsages;
}
public void setAutoPopulateContainerUsages(boolean autoPopulateContainerUsages) {
this.autoPopulateContainerUsages = autoPopulateContainerUsages;
}
public ContainerUsageInitializationType getContainerUsageInitialization() {
return containerUsageInitialization;
}
public void setContainerUsageInitialization(ContainerUsageInitializationType containerUsageInitialization) {
this.containerUsageInitialization = containerUsageInitialization;
}
public boolean isAllowPartialPackingLists() {
return allowPartialPackingLists;
}
public void setAllowPartialPackingLists(boolean allowPartialPackingLists) {
this.allowPartialPackingLists = allowPartialPackingLists;
}
public boolean isValidateContainerReference() {
return validateContainerReference;
}
public void setValidateContainerReference(boolean validateContainerReference) {
this.validateContainerReference = validateContainerReference;
}
public boolean isValidateGrossWeight() {
return validateGrossWeight;
}
public void setValidateGrossWeight(boolean validateGrossWeight) {
this.validateGrossWeight = validateGrossWeight;
}
public boolean isAutoCalculateVolumeWeight() {
return autoCalculateVolumeWeight;
}
public void setAutoCalculateVolumeWeight(boolean autoCalculateVolumeWeight) {
this.autoCalculateVolumeWeight = autoCalculateVolumeWeight;
}
public PackingListProportion getPackingListProportion() {
return packingListProportion;
}
public void setPackingListProportion(PackingListProportion packingListProportion) {
this.packingListProportion = packingListProportion;
}
public boolean isAllowLCLPerShippingMode() {
return allowLCLPerShippingMode;
}
public void setAllowLCLPerShippingMode(boolean allowLCLPerShippingMode) {
this.allowLCLPerShippingMode = allowLCLPerShippingMode;
}
public boolean isAutoCalculateContainer() {
return autoCalculateContainer;
}
public void setAutoCalculateContainer(boolean autoCalculateContainer) {
this.autoCalculateContainer = autoCalculateContainer;
}
public boolean isUpdatePackingListOnCommercialInvoiceSignOff() {
return updatePackingListOnCommercialInvoiceSignOff;
}
public void setUpdatePackingListOnCommercialInvoiceSignOff(boolean updatePackingListOnCommercialInvoiceSignOff) {
this.updatePackingListOnCommercialInvoiceSignOff = updatePackingListOnCommercialInvoiceSignOff;
}
public boolean isAutoPopulateNumberAtPODUsingShipMode() {
return autoPopulateNumberAtPODUsingShipMode;
}
public void setAutoPopulateNumberAtPODUsingShipMode(boolean autoPopulateNumberAtPODUsingShipMode) {
this.autoPopulateNumberAtPODUsingShipMode = autoPopulateNumberAtPODUsingShipMode;
}
}