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

org.milyn.edi.unedifact.d94a.REQOTE.SegmentGroup8 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.d94a.REQOTE;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d94a.common.AdditionalPriceInformation;    
import org.milyn.edi.unedifact.d94a.common.PriceDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d94a.common.Quantity;    
import org.milyn.edi.unedifact.d94a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d94a.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d94a.common.RangeDetails;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup8 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private AdditionalPriceInformation additionalPriceInformation;
    private PriceDetails priceDetails;
    private List quantity;
    private DateTimePeriod dateTimePeriod;
    private List monetaryAmount;
    private List rangeDetails;

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

        if(additionalPriceInformation != null) {
            nodeWriter.write("API");
            nodeWriter.write(delimiters.getField());
            additionalPriceInformation.write(nodeWriter, delimiters);
        }
        if(priceDetails != null) {
            nodeWriter.write("PRI");
            nodeWriter.write(delimiters.getField());
            priceDetails.write(nodeWriter, delimiters);
        }
        if(quantity != null && !quantity.isEmpty()) {
            for(Quantity quantityInst : quantity) {
                nodeWriter.write("QTY");
                nodeWriter.write(delimiters.getField());
                quantityInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(rangeDetails != null && !rangeDetails.isEmpty()) {
            for(RangeDetails rangeDetailsInst : rangeDetails) {
                nodeWriter.write("RNG");
                nodeWriter.write(delimiters.getField());
                rangeDetailsInst.write(nodeWriter, delimiters);
            }
        }
    }

    public AdditionalPriceInformation getAdditionalPriceInformation() {
        return additionalPriceInformation;
    }

    public SegmentGroup8 setAdditionalPriceInformation(AdditionalPriceInformation additionalPriceInformation) {
        this.additionalPriceInformation = additionalPriceInformation;  return this;
    }

    public PriceDetails getPriceDetails() {
        return priceDetails;
    }

    public SegmentGroup8 setPriceDetails(PriceDetails priceDetails) {
        this.priceDetails = priceDetails;  return this;
    }

    public List getQuantity() {
        return quantity;
    }

    public SegmentGroup8 setQuantity(List quantity) {
        this.quantity = quantity;  return this;
    }

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup8 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

    public SegmentGroup8 setMonetaryAmount(List monetaryAmount) {
        this.monetaryAmount = monetaryAmount;  return this;
    }

    public List getRangeDetails() {
        return rangeDetails;
    }

    public SegmentGroup8 setRangeDetails(List rangeDetails) {
        this.rangeDetails = rangeDetails;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy