ClearingInstructionConfig.java
package com.tradecloud.domain.configuration.clearing.za;
import com.tradecloud.common.base.PersistenceBase;
import com.tradecloud.converter.StringMapAttributeConverter;
import com.tradecloud.domain.dto.DocumentTypeDTO;
import com.tradecloud.domain.model.organisationalunit.OrganisationalUnit;
import com.tradecloud.domain.model.shipment.ShippingMode;
import com.tradecloud.domain.party.Employee;
import com.tradecloud.domain.place.Country;
import com.tradecloud.domain.shipment.clearing.FileType;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;
import java.util.HashSet;
import java.util.Set;
@Entity
@Access(AccessType.FIELD)
@XmlAccessorType(XmlAccessType.FIELD)
@Getter
@Setter
public class ClearingInstructionConfig extends PersistenceBase {
private static final long serialVersionUID = 1L;
@ManyToOne(fetch = FetchType.LAZY)
protected OrganisationalUnit importer;
@Column(name = "clearingDocumentTypes")
@Convert(converter = StringMapAttributeConverter.class)
private Set<DocumentTypeDTO> clearingDocumentTypes = new HashSet<>();
@Enumerated(value = EnumType.STRING)
private CustomsValuation customsValuation;
@Enumerated(value = EnumType.STRING)
private ShippingMode inlandTransport;
@Enumerated(value = EnumType.STRING)
private PurposeCode purposeCode;
@Enumerated(value = EnumType.STRING)
@XmlElement(name = "customsPaymentMethod")
private PaymentMethod paymentMethod;
@Enumerated(value = EnumType.STRING)
private TypeOfGoods typeOfGoods;
@Enumerated(value = EnumType.STRING)
private ValuationMethod valuationMethod;
@Enumerated(value = EnumType.STRING)
protected Preference preference;
@ManyToOne(fetch = FetchType.LAZY)
private Employee declarer;
private boolean restrictedGoods;
private boolean marineInsurance;
@Enumerated(value = EnumType.STRING)
private ClearingAppendixMethod clearingInstructionAppendix;
@Enumerated(value = EnumType.STRING)
private ClearingInstructionTemplate clearingTemplate;
@Enumerated(EnumType.STRING)
protected FileType fileType;
@ManyToOne
private Country destinationCountry;
@XmlTransient
@Enumerated(EnumType.STRING)
private DeliveryAddressConfig deliveryAddressConfig;
private boolean imports;
private boolean defaultImporterFromOrder;
public ClearingInstructionConfig() {
}
public ClearingInstructionConfig(boolean imports) {
}
public OrganisationalUnit getImporter() {
return importer;
}
public void setImporter(OrganisationalUnit importer) {
this.importer = importer;
}
public Set<DocumentTypeDTO> getClearingDocumentTypes() {
return clearingDocumentTypes;
}
public void setClearingDocumentTypes(Set<DocumentTypeDTO> clearingDocumentTypes) {
this.clearingDocumentTypes = clearingDocumentTypes;
}
public CustomsValuation getCustomsValuation() {
return customsValuation;
}
public void setCustomsValuation(CustomsValuation customsValuation) {
this.customsValuation = customsValuation;
}
public ShippingMode getInlandTransport() {
return inlandTransport;
}
public void setInlandTransport(ShippingMode inlandTransport) {
this.inlandTransport = inlandTransport;
}
public PurposeCode getPurposeCode() {
return purposeCode;
}
public void setPurposeCode(PurposeCode purposeCode) {
this.purposeCode = purposeCode;
}
public TypeOfGoods getTypeOfGoods() {
return typeOfGoods;
}
public void setTypeOfGoods(TypeOfGoods typeOfGoods) {
this.typeOfGoods = typeOfGoods;
}
public ValuationMethod getValuationMethod() {
return valuationMethod;
}
public void setValuationMethod(ValuationMethod valuationMethod) {
this.valuationMethod = valuationMethod;
}
public Employee getDeclarer() {
return declarer;
}
public void setDeclarer(Employee declarer) {
this.declarer = declarer;
}
public PaymentMethod getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(PaymentMethod paymentMethod) {
this.paymentMethod = paymentMethod;
}
public boolean isRestrictedGoods() {
return restrictedGoods;
}
public void setRestrictedGoods(boolean restrictedGoods) {
this.restrictedGoods = restrictedGoods;
}
public Preference getPreference() {
return preference;
}
public void setPreference(Preference preference) {
this.preference = preference;
}
public ClearingAppendixMethod getClearingInstructionAppendix() {
return clearingInstructionAppendix;
}
public void setClearingInstructionAppendix(ClearingAppendixMethod clearingInstructionAppendix) {
this.clearingInstructionAppendix = clearingInstructionAppendix;
}
public ClearingInstructionTemplate getClearingTemplate() {
return clearingTemplate;
}
public void setClearingTemplate(ClearingInstructionTemplate clearingTemplate) {
this.clearingTemplate = clearingTemplate;
}
public FileType getFileType() {
return fileType;
}
public void setFileType(FileType fileType) {
this.fileType = fileType;
}
public Country getDestinationCountry() {
return destinationCountry;
}
public void setDestinationCountry(Country destinationCountry) {
this.destinationCountry = destinationCountry;
}
public boolean isImports() {
return imports;
}
public void setImports(boolean imports) {
this.imports = imports;
}
public DeliveryAddressConfig getDeliveryAddressConfig() {
return deliveryAddressConfig;
}
public void setDeliveryAddressConfig(DeliveryAddressConfig deliveryAddressConfig) {
this.deliveryAddressConfig = deliveryAddressConfig;
}
public enum DeliveryAddressConfig {
CONTAINER, ORDER
}
public boolean isDefaultImporterFromOrder() {
return defaultImporterFromOrder;
}
public void setDefaultImporterFromOrder(boolean defaultImporterFromOrder) {
this.defaultImporterFromOrder = defaultImporterFromOrder;
}
}