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

org.milyn.edi.unedifact.d99b.BUSCRD.SegmentGroup3 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.BUSCRD;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d99b.common.LineItem;    
import java.util.List;    
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d99b.common.PartyIdentification;    
import org.milyn.edi.unedifact.d99b.common.Currencies;    
import org.milyn.edi.unedifact.d99b.common.Language;    
import org.milyn.edi.unedifact.d99b.common.InformationDetail;    
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 SegmentGroup3 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private LineItem lineItem;
    private List dateTimePeriod;
    private List partyIdentification;
    private Currencies currencies;
    private Language language;
    private List informationDetail;
    private List freeText;
    private List segmentGroup4;

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

        if(lineItem != null) {
            nodeWriter.write("LIN");
            nodeWriter.write(delimiters.getField());
            lineItem.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(partyIdentification != null && !partyIdentification.isEmpty()) {
            for(PartyIdentification partyIdentificationInst : partyIdentification) {
                nodeWriter.write("PNA");
                nodeWriter.write(delimiters.getField());
                partyIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
        if(language != null) {
            nodeWriter.write("LAN");
            nodeWriter.write(delimiters.getField());
            language.write(nodeWriter, delimiters);
        }
        if(informationDetail != null && !informationDetail.isEmpty()) {
            for(InformationDetail informationDetailInst : informationDetail) {
                nodeWriter.write("IFD");
                nodeWriter.write(delimiters.getField());
                informationDetailInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
            for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
                segmentGroup4Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public LineItem getLineItem() {
        return lineItem;
    }

    public SegmentGroup3 setLineItem(LineItem lineItem) {
        this.lineItem = lineItem;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getPartyIdentification() {
        return partyIdentification;
    }

    public SegmentGroup3 setPartyIdentification(List partyIdentification) {
        this.partyIdentification = partyIdentification;  return this;
    }

    public Currencies getCurrencies() {
        return currencies;
    }

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

    public Language getLanguage() {
        return language;
    }

    public SegmentGroup3 setLanguage(Language language) {
        this.language = language;  return this;
    }

    public List getInformationDetail() {
        return informationDetail;
    }

    public SegmentGroup3 setInformationDetail(List informationDetail) {
        this.informationDetail = informationDetail;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

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

    public List getSegmentGroup4() {
        return segmentGroup4;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy