PhysicalDistributionVO.java

/*
 * Copyright 2005-2025 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.openwms.wms.inventory.api;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.beans.ConstructorProperties;
import java.io.Serializable;

/**
 * A PhysicalDistributionVO represents how a {@code Product} or {@code PackagingUnit} can be packed on a carrier, like a
 * {@code TransportUnit} or a {@code LoadUnit}.
 *
 * @author Heiko Scherrer
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PhysicalDistributionVO implements Serializable {

    /** The number of pieces that fit into one layer. */
    @JsonProperty("piecesPerLayer")
    private Integer piecesPerLayer;
    /** The number of layers that fit onto the carrier. */
    @JsonProperty("numberOfLayers")
    private Integer numberOfLayers;
    /** Either the type of {@code TransportUnit} or {@code LoadUnit} used as carrier. */
    @JsonProperty("carrierType")
    private String carrierType;

    /* For the Mapper */
    public PhysicalDistributionVO() {
    }

    @ConstructorProperties({"piecesPerLayer", "numberOfLayers", "carrierType"})
    public PhysicalDistributionVO(Integer piecesPerLayer, Integer numberOfLayers, String carrierType) {
        this.piecesPerLayer = piecesPerLayer;
        this.numberOfLayers = numberOfLayers;
        this.carrierType = carrierType;
    }

    public Integer getPiecesPerLayer() {
        return piecesPerLayer;
    }

    public void setPiecesPerLayer(Integer piecesPerLayer) {
        this.piecesPerLayer = piecesPerLayer;
    }

    public Integer getNumberOfLayers() {
        return numberOfLayers;
    }

    public void setNumberOfLayers(Integer numberOfLayers) {
        this.numberOfLayers = numberOfLayers;
    }

    public String getCarrierType() {
        return carrierType;
    }

    public void setCarrierType(String carrierType) {
        this.carrierType = carrierType;
    }
}