All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.milyn.edi.unedifact.d99b.SLSRPT.SegmentGroup9 Maven / Gradle / Ivy

There is a newer version: 1.7.1.0
Show newest version
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d99b.SLSRPT;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d99b.common.Quantity;    
import org.milyn.edi.unedifact.d99b.common.MarketSalesChannelInformation;    
import org.milyn.edi.unedifact.d99b.common.NameAndAddress;    
import java.util.List;    
import org.milyn.edi.unedifact.d99b.common.PriceDetails;    
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d99b.common.Reference;    
import org.milyn.edi.unedifact.d99b.common.Status;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup9 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private Quantity quantity;
    private MarketSalesChannelInformation marketSalesChannelInformation;
    private NameAndAddress nameAndAddress;
    private List priceDetails;
    private List dateTimePeriod;
    private List reference;
    private List status;

    public void write(Writer writer, Delimiters delimiters) throws IOException {
        
        Writer nodeWriter = writer;

        if(quantity != null) {
            nodeWriter.write("QTY");
            nodeWriter.write(delimiters.getField());
            quantity.write(nodeWriter, delimiters);
        }
        if(marketSalesChannelInformation != null) {
            nodeWriter.write("MKS");
            nodeWriter.write(delimiters.getField());
            marketSalesChannelInformation.write(nodeWriter, delimiters);
        }
        if(nameAndAddress != null) {
            nodeWriter.write("NAD");
            nodeWriter.write(delimiters.getField());
            nameAndAddress.write(nodeWriter, delimiters);
        }
        if(priceDetails != null && !priceDetails.isEmpty()) {
            for(PriceDetails priceDetailsInst : priceDetails) {
                nodeWriter.write("PRI");
                nodeWriter.write(delimiters.getField());
                priceDetailsInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(status != null && !status.isEmpty()) {
            for(Status statusInst : status) {
                nodeWriter.write("STS");
                nodeWriter.write(delimiters.getField());
                statusInst.write(nodeWriter, delimiters);
            }
        }
    }

    public Quantity getQuantity() {
        return quantity;
    }

    public SegmentGroup9 setQuantity(Quantity quantity) {
        this.quantity = quantity;  return this;
    }

    public MarketSalesChannelInformation getMarketSalesChannelInformation() {
        return marketSalesChannelInformation;
    }

    public SegmentGroup9 setMarketSalesChannelInformation(MarketSalesChannelInformation marketSalesChannelInformation) {
        this.marketSalesChannelInformation = marketSalesChannelInformation;  return this;
    }

    public NameAndAddress getNameAndAddress() {
        return nameAndAddress;
    }

    public SegmentGroup9 setNameAndAddress(NameAndAddress nameAndAddress) {
        this.nameAndAddress = nameAndAddress;  return this;
    }

    public List getPriceDetails() {
        return priceDetails;
    }

    public SegmentGroup9 setPriceDetails(List priceDetails) {
        this.priceDetails = priceDetails;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup9 setDateTimePeriod(List dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public List getReference() {
        return reference;
    }

    public SegmentGroup9 setReference(List reference) {
        this.reference = reference;  return this;
    }

    public List getStatus() {
        return status;
    }

    public SegmentGroup9 setStatus(List status) {
        this.status = status;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy