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

org.milyn.edi.unedifact.d02a.LRECLM.Lreclm 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.LRECLM;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.smooks.edi.EDIMessage;    
import org.milyn.edi.unedifact.d02a.common.BeginningOfMessage;    
import org.milyn.edi.unedifact.d02a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d02a.common.Currencies;    
import java.util.List;    
import org.milyn.edi.unedifact.d02a.common.ContactInformation;    
import org.milyn.edi.unedifact.d02a.common.FreeText;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

@EDIMessage    
public class Lreclm implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private BeginningOfMessage beginningOfMessage;
    private DateTimePeriod dateTimePeriod;
    private Currencies currencies;
    private List contactInformation;
    private FreeText freeText;
    private List segmentGroup1;

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

        if(beginningOfMessage != null) {
            nodeWriter.write("BGM");
            nodeWriter.write(delimiters.getField());
            beginningOfMessage.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
        if(contactInformation != null && !contactInformation.isEmpty()) {
            for(ContactInformation contactInformationInst : contactInformation) {
                nodeWriter.write("CTA");
                nodeWriter.write(delimiters.getField());
                contactInformationInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
        if(segmentGroup1 != null && !segmentGroup1.isEmpty()) {
            for(SegmentGroup1 segmentGroup1Inst : segmentGroup1) {
                segmentGroup1Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public BeginningOfMessage getBeginningOfMessage() {
        return beginningOfMessage;
    }

    public Lreclm setBeginningOfMessage(BeginningOfMessage beginningOfMessage) {
        this.beginningOfMessage = beginningOfMessage;  return this;
    }

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public Currencies getCurrencies() {
        return currencies;
    }

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

    public List getContactInformation() {
        return contactInformation;
    }

    public Lreclm setContactInformation(List contactInformation) {
        this.contactInformation = contactInformation;  return this;
    }

    public FreeText getFreeText() {
        return freeText;
    }

    public Lreclm setFreeText(FreeText freeText) {
        this.freeText = freeText;  return this;
    }

    public List getSegmentGroup1() {
        return segmentGroup1;
    }

    public Lreclm setSegmentGroup1(List segmentGroup1) {
        this.segmentGroup1 = segmentGroup1;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy