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

org.milyn.edi.unedifact.d05a.PRODAT.SegmentGroup18 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.d05a.PRODAT;

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

public class SegmentGroup18 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private NameAndAddress nameAndAddress;
    private List reference;
    private List quantity;
    private List segmentGroup19;

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

        if(nameAndAddress != null) {
            nodeWriter.write("NAD");
            nodeWriter.write(delimiters.getField());
            nameAndAddress.write(nodeWriter, delimiters);
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(quantity != null && !quantity.isEmpty()) {
            for(Quantity quantityInst : quantity) {
                nodeWriter.write("QTY");
                nodeWriter.write(delimiters.getField());
                quantityInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup19 != null && !segmentGroup19.isEmpty()) {
            for(SegmentGroup19 segmentGroup19Inst : segmentGroup19) {
                segmentGroup19Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public NameAndAddress getNameAndAddress() {
        return nameAndAddress;
    }

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

    public List getReference() {
        return reference;
    }

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

    public List getQuantity() {
        return quantity;
    }

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

    public List getSegmentGroup19() {
        return segmentGroup19;
    }

    public SegmentGroup18 setSegmentGroup19(List segmentGroup19) {
        this.segmentGroup19 = segmentGroup19;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy