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

org.milyn.edi.unedifact.d02a.PRPAID.SegmentGroup2 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.d02a.PRPAID;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d02a.common.DocumentMessageDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d02a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d02a.common.NameAndAddress;    
import org.milyn.edi.unedifact.d02a.common.Reference;    
import org.milyn.edi.unedifact.d02a.common.Currencies;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup2 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private DocumentMessageDetails documentMessageDetails;
    private SegmentGroup3 segmentGroup3;
    private List dateTimePeriod;
    private List nameAndAddress;
    private List segmentGroup4;
    private List reference;
    private List segmentGroup5;
    private List segmentGroup6;
    private Currencies currencies;

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

        if(documentMessageDetails != null) {
            nodeWriter.write("DOC");
            nodeWriter.write(delimiters.getField());
            documentMessageDetails.write(nodeWriter, delimiters);
        }
        if(segmentGroup3 != null) {
            segmentGroup3.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(nameAndAddress != null && !nameAndAddress.isEmpty()) {
            for(NameAndAddress nameAndAddressInst : nameAndAddress) {
                nodeWriter.write("NAD");
                nodeWriter.write(delimiters.getField());
                nameAndAddressInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
            for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
                segmentGroup4Inst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup5 != null && !segmentGroup5.isEmpty()) {
            for(SegmentGroup5 segmentGroup5Inst : segmentGroup5) {
                segmentGroup5Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup6 != null && !segmentGroup6.isEmpty()) {
            for(SegmentGroup6 segmentGroup6Inst : segmentGroup6) {
                segmentGroup6Inst.write(nodeWriter, delimiters);
            }
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
    }

    public DocumentMessageDetails getDocumentMessageDetails() {
        return documentMessageDetails;
    }

    public SegmentGroup2 setDocumentMessageDetails(DocumentMessageDetails documentMessageDetails) {
        this.documentMessageDetails = documentMessageDetails;  return this;
    }

    public SegmentGroup3 getSegmentGroup3() {
        return segmentGroup3;
    }

    public SegmentGroup2 setSegmentGroup3(SegmentGroup3 segmentGroup3) {
        this.segmentGroup3 = segmentGroup3;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getNameAndAddress() {
        return nameAndAddress;
    }

    public SegmentGroup2 setNameAndAddress(List nameAndAddress) {
        this.nameAndAddress = nameAndAddress;  return this;
    }

    public List getSegmentGroup4() {
        return segmentGroup4;
    }

    public SegmentGroup2 setSegmentGroup4(List segmentGroup4) {
        this.segmentGroup4 = segmentGroup4;  return this;
    }

    public List getReference() {
        return reference;
    }

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

    public List getSegmentGroup5() {
        return segmentGroup5;
    }

    public SegmentGroup2 setSegmentGroup5(List segmentGroup5) {
        this.segmentGroup5 = segmentGroup5;  return this;
    }

    public List getSegmentGroup6() {
        return segmentGroup6;
    }

    public SegmentGroup2 setSegmentGroup6(List segmentGroup6) {
        this.segmentGroup6 = segmentGroup6;  return this;
    }

    public Currencies getCurrencies() {
        return currencies;
    }

    public SegmentGroup2 setCurrencies(Currencies currencies) {
        this.currencies = currencies;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy