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

org.milyn.edi.unedifact.d99b.CREMUL.SegmentGroup21 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.CREMUL;

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

public class SegmentGroup21 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private DocumentMessageDetails documentMessageDetails;
    private List monetaryAmount;
    private List dateTimePeriod;
    private List reference;
    private List nameAndAddress;
    private List segmentGroup22;
    private List segmentGroup23;
    private List freeText;
    private List segmentGroup24;

    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(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.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(nameAndAddress != null && !nameAndAddress.isEmpty()) {
            for(NameAndAddress nameAndAddressInst : nameAndAddress) {
                nodeWriter.write("NAD");
                nodeWriter.write(delimiters.getField());
                nameAndAddressInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup22 != null && !segmentGroup22.isEmpty()) {
            for(SegmentGroup22 segmentGroup22Inst : segmentGroup22) {
                segmentGroup22Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup23 != null && !segmentGroup23.isEmpty()) {
            for(SegmentGroup23 segmentGroup23Inst : segmentGroup23) {
                segmentGroup23Inst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup24 != null && !segmentGroup24.isEmpty()) {
            for(SegmentGroup24 segmentGroup24Inst : segmentGroup24) {
                segmentGroup24Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public DocumentMessageDetails getDocumentMessageDetails() {
        return documentMessageDetails;
    }

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

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getReference() {
        return reference;
    }

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

    public List getNameAndAddress() {
        return nameAndAddress;
    }

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

    public List getSegmentGroup22() {
        return segmentGroup22;
    }

    public SegmentGroup21 setSegmentGroup22(List segmentGroup22) {
        this.segmentGroup22 = segmentGroup22;  return this;
    }

    public List getSegmentGroup23() {
        return segmentGroup23;
    }

    public SegmentGroup21 setSegmentGroup23(List segmentGroup23) {
        this.segmentGroup23 = segmentGroup23;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

    public SegmentGroup21 setFreeText(List freeText) {
        this.freeText = freeText;  return this;
    }

    public List getSegmentGroup24() {
        return segmentGroup24;
    }

    public SegmentGroup21 setSegmentGroup24(List segmentGroup24) {
        this.segmentGroup24 = segmentGroup24;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy