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

org.milyn.edi.unedifact.d98a.LREACT.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.d98a.LREACT;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d98a.common.ItemDescription;    
import java.util.List;    
import org.milyn.edi.unedifact.d98a.common.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d98a.common.SequenceDetails;    
import org.milyn.edi.unedifact.d98a.common.Currencies;    
import org.milyn.edi.unedifact.d98a.common.PartyIdentification;    
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 ItemDescription itemDescription;
    private List placeLocationIdentification;
    private SequenceDetails sequenceDetails;
    private Currencies currencies;
    private List partyIdentification;

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

        if(itemDescription != null) {
            nodeWriter.write("IMD");
            nodeWriter.write(delimiters.getField());
            itemDescription.write(nodeWriter, delimiters);
        }
        if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
            for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
                nodeWriter.write("LOC");
                nodeWriter.write(delimiters.getField());
                placeLocationIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(sequenceDetails != null) {
            nodeWriter.write("SEQ");
            nodeWriter.write(delimiters.getField());
            sequenceDetails.write(nodeWriter, delimiters);
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
        if(partyIdentification != null && !partyIdentification.isEmpty()) {
            for(PartyIdentification partyIdentificationInst : partyIdentification) {
                nodeWriter.write("PNA");
                nodeWriter.write(delimiters.getField());
                partyIdentificationInst.write(nodeWriter, delimiters);
            }
        }
    }

    public ItemDescription getItemDescription() {
        return itemDescription;
    }

    public SegmentGroup2 setItemDescription(ItemDescription itemDescription) {
        this.itemDescription = itemDescription;  return this;
    }

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

    public SegmentGroup2 setPlaceLocationIdentification(List placeLocationIdentification) {
        this.placeLocationIdentification = placeLocationIdentification;  return this;
    }

    public SequenceDetails getSequenceDetails() {
        return sequenceDetails;
    }

    public SegmentGroup2 setSequenceDetails(SequenceDetails sequenceDetails) {
        this.sequenceDetails = sequenceDetails;  return this;
    }

    public Currencies getCurrencies() {
        return currencies;
    }

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

    public List getPartyIdentification() {
        return partyIdentification;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy