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

org.milyn.edi.unedifact.d05a.BAPLIE.SegmentGroup6 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.d05a.BAPLIE;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d05a.common.EquipmentDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d05a.common.AttachedEquipment;    
import org.milyn.edi.unedifact.d05a.common.NameAndAddress;    
import org.milyn.edi.unedifact.d05a.common.Reference;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup6 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private EquipmentDetails equipmentDetails;
    private List attachedEquipment;
    private List nameAndAddress;
    private List reference;

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

        if(equipmentDetails != null) {
            nodeWriter.write("EQD");
            nodeWriter.write(delimiters.getField());
            equipmentDetails.write(nodeWriter, delimiters);
        }
        if(attachedEquipment != null && !attachedEquipment.isEmpty()) {
            for(AttachedEquipment attachedEquipmentInst : attachedEquipment) {
                nodeWriter.write("EQA");
                nodeWriter.write(delimiters.getField());
                attachedEquipmentInst.write(nodeWriter, delimiters);
            }
        }
        if(nameAndAddress != null && !nameAndAddress.isEmpty()) {
            for(NameAndAddress nameAndAddressInst : nameAndAddress) {
                nodeWriter.write("NAD");
                nodeWriter.write(delimiters.getField());
                nameAndAddressInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
    }

    public EquipmentDetails getEquipmentDetails() {
        return equipmentDetails;
    }

    public SegmentGroup6 setEquipmentDetails(EquipmentDetails equipmentDetails) {
        this.equipmentDetails = equipmentDetails;  return this;
    }

    public List getAttachedEquipment() {
        return attachedEquipment;
    }

    public SegmentGroup6 setAttachedEquipment(List attachedEquipment) {
        this.attachedEquipment = attachedEquipment;  return this;
    }

    public List getNameAndAddress() {
        return nameAndAddress;
    }

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

    public List getReference() {
        return reference;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy