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

org.milyn.edi.unedifact.d06b.STLRPT.SegmentGroup12 Maven / Gradle / Ivy

/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d06b.STLRPT;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.SequenceDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.FreeText;    
import org.milyn.edi.unedifact.d06b.common.AllowanceOrCharge;    
import org.milyn.edi.unedifact.d06b.common.GoodsIdentityNumber;    
import org.milyn.edi.unedifact.d06b.common.Reference;    
import org.milyn.edi.unedifact.d06b.common.ItemDescription;    
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;    
import org.milyn.edi.unedifact.d06b.common.TransportInformation;    
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d06b.common.PlaceLocationIdentification;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup12 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private SequenceDetails sequenceDetails;
    private List freeText;
    private AllowanceOrCharge allowanceOrCharge;
    private GoodsIdentityNumber goodsIdentityNumber;
    private List reference;
    private List itemDescription;
    private NameAndAddress nameAndAddress;
    private TransportInformation transportInformation;
    private List dateTimePeriod;
    private List placeLocationIdentification;

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

        if(sequenceDetails != null) {
            nodeWriter.write("SEQ");
            nodeWriter.write(delimiters.getField());
            sequenceDetails.write(nodeWriter, delimiters);
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(allowanceOrCharge != null) {
            nodeWriter.write("ALC");
            nodeWriter.write(delimiters.getField());
            allowanceOrCharge.write(nodeWriter, delimiters);
        }
        if(goodsIdentityNumber != null) {
            nodeWriter.write("GIN");
            nodeWriter.write(delimiters.getField());
            goodsIdentityNumber.write(nodeWriter, delimiters);
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(itemDescription != null && !itemDescription.isEmpty()) {
            for(ItemDescription itemDescriptionInst : itemDescription) {
                nodeWriter.write("IMD");
                nodeWriter.write(delimiters.getField());
                itemDescriptionInst.write(nodeWriter, delimiters);
            }
        }
        if(nameAndAddress != null) {
            nodeWriter.write("NAD");
            nodeWriter.write(delimiters.getField());
            nameAndAddress.write(nodeWriter, delimiters);
        }
        if(transportInformation != null) {
            nodeWriter.write("TDT");
            nodeWriter.write(delimiters.getField());
            transportInformation.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
            for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
                nodeWriter.write("LOC");
                nodeWriter.write(delimiters.getField());
                placeLocationIdentificationInst.write(nodeWriter, delimiters);
            }
        }
    }

    public SequenceDetails getSequenceDetails() {
        return sequenceDetails;
    }

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

    public List getFreeText() {
        return freeText;
    }

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

    public AllowanceOrCharge getAllowanceOrCharge() {
        return allowanceOrCharge;
    }

    public SegmentGroup12 setAllowanceOrCharge(AllowanceOrCharge allowanceOrCharge) {
        this.allowanceOrCharge = allowanceOrCharge;  return this;
    }

    public GoodsIdentityNumber getGoodsIdentityNumber() {
        return goodsIdentityNumber;
    }

    public SegmentGroup12 setGoodsIdentityNumber(GoodsIdentityNumber goodsIdentityNumber) {
        this.goodsIdentityNumber = goodsIdentityNumber;  return this;
    }

    public List getReference() {
        return reference;
    }

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

    public List getItemDescription() {
        return itemDescription;
    }

    public SegmentGroup12 setItemDescription(List itemDescription) {
        this.itemDescription = itemDescription;  return this;
    }

    public NameAndAddress getNameAndAddress() {
        return nameAndAddress;
    }

    public SegmentGroup12 setNameAndAddress(NameAndAddress nameAndAddress) {
        this.nameAndAddress = nameAndAddress;  return this;
    }

    public TransportInformation getTransportInformation() {
        return transportInformation;
    }

    public SegmentGroup12 setTransportInformation(TransportInformation transportInformation) {
        this.transportInformation = transportInformation;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy