SupplierSearchDTO.java

package com.tradecloud.dto.api.supplier;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.tradecloud.domain.model.shipment.ShippingMode;
import com.tradecloud.dto.api.SearchDTO;
import com.tradecloud.schema.ISO3166CountryCodeType;
import com.tradecloud.schema.ISOCurrencyCodeType;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@JsonRootName(value = "supplierSearchDTO")
public class SupplierSearchDTO extends SearchDTO {

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "The supplier name.")
    private String name;

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "The supplier code.")
    private String code;
    private boolean complete = true;

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "All suppliers with a created date date after the specified date will be returned.")
    private Date createdFrom;

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "All suppliers with a created date before the specified date will be returned.")
    private Date createdTo;

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "The organisation code that the supplier is linked to.")
    private List<String> organisation;

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "All suppliers with the specified date will be returned.")
    private ISOCurrencyCodeType currency;

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "All suppliers with the specified shipping mode will be returned.")
    private ShippingMode shippingMode;

    @JsonProperty(required = false)
    @JsonPropertyDescription(value = "All suppliers with the specified country will be returned.")
    private ISO3166CountryCodeType country;

    private boolean strict;
    private boolean allStates;
    private List<Type> types;
    private boolean elc;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public boolean isComplete() {
        return complete;
    }

    public void setComplete(boolean complete) {
        this.complete = complete;
    }

    public Date getCreatedFrom() {
        return createdFrom;
    }

    public void setCreatedFrom(Date createdFrom) {
        this.createdFrom = createdFrom;
    }

    public Date getCreatedTo() {
        return createdTo;
    }

    public void setCreatedTo(Date createdTo) {
        this.createdTo = createdTo;
    }

    public ISOCurrencyCodeType getCurrency() {
        return currency;
    }

    public void setCurrency(ISOCurrencyCodeType currency) {
        this.currency = currency;
    }

    public List<String> getOrganisation() {
        return organisation;
    }

    public void setOrganisation(List<String> organisation) {
        this.organisation = organisation;
    }

    public ShippingMode getShippingMode() {
        return shippingMode;
    }

    public void setShippingMode(ShippingMode shippingMode) {
        this.shippingMode = shippingMode;
    }

    public ISO3166CountryCodeType getCountry() {
        return country;
    }

    public void setCountry(ISO3166CountryCodeType country) {
        this.country = country;
    }

    public boolean isStrict() {
        return strict;
    }

    public void setStrict(boolean strict) {
        this.strict = strict;
    }

    public boolean isAllStates() {
        return allStates;
    }

    public void setAllStates(boolean allStates) {
        this.allStates = allStates;
    }

    public List<Type> getTypes() {
        if (types == null) {
            types = new ArrayList<>();
        }
        return types;
    }

    public void setTypes(List<Type> types) {
        this.types = types;
    }

    public boolean isElc() {
        return elc;
    }

    public void setElc(boolean elc) {
        this.elc = elc;
    }
}