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

org.milyn.edi.unedifact.d05a.DEBREC.SegmentGroup1 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.DEBREC;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d05a.common.PartyIdentification;    
import org.milyn.edi.unedifact.d05a.common.Address;    
import java.util.List;    
import org.milyn.edi.unedifact.d05a.common.Reference;    
import org.milyn.edi.unedifact.d05a.common.EmploymentDetails;    
import org.milyn.edi.unedifact.d05a.common.CommunicationContact;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup1 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private PartyIdentification partyIdentification;
    private Address address;
    private List reference;
    private EmploymentDetails employmentDetails;
    private List communicationContact;
    private List segmentGroup2;
    private SegmentGroup4 segmentGroup4;

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

        if(partyIdentification != null) {
            nodeWriter.write("PNA");
            nodeWriter.write(delimiters.getField());
            partyIdentification.write(nodeWriter, delimiters);
        }
        if(address != null) {
            nodeWriter.write("ADR");
            nodeWriter.write(delimiters.getField());
            address.write(nodeWriter, delimiters);
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(employmentDetails != null) {
            nodeWriter.write("EMP");
            nodeWriter.write(delimiters.getField());
            employmentDetails.write(nodeWriter, delimiters);
        }
        if(communicationContact != null && !communicationContact.isEmpty()) {
            for(CommunicationContact communicationContactInst : communicationContact) {
                nodeWriter.write("COM");
                nodeWriter.write(delimiters.getField());
                communicationContactInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup2 != null && !segmentGroup2.isEmpty()) {
            for(SegmentGroup2 segmentGroup2Inst : segmentGroup2) {
                segmentGroup2Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup4 != null) {
            segmentGroup4.write(nodeWriter, delimiters);
        }
    }

    public PartyIdentification getPartyIdentification() {
        return partyIdentification;
    }

    public SegmentGroup1 setPartyIdentification(PartyIdentification partyIdentification) {
        this.partyIdentification = partyIdentification;  return this;
    }

    public Address getAddress() {
        return address;
    }

    public SegmentGroup1 setAddress(Address address) {
        this.address = address;  return this;
    }

    public List getReference() {
        return reference;
    }

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

    public EmploymentDetails getEmploymentDetails() {
        return employmentDetails;
    }

    public SegmentGroup1 setEmploymentDetails(EmploymentDetails employmentDetails) {
        this.employmentDetails = employmentDetails;  return this;
    }

    public List getCommunicationContact() {
        return communicationContact;
    }

    public SegmentGroup1 setCommunicationContact(List communicationContact) {
        this.communicationContact = communicationContact;  return this;
    }

    public List getSegmentGroup2() {
        return segmentGroup2;
    }

    public SegmentGroup1 setSegmentGroup2(List segmentGroup2) {
        this.segmentGroup2 = segmentGroup2;  return this;
    }

    public SegmentGroup4 getSegmentGroup4() {
        return segmentGroup4;
    }

    public SegmentGroup1 setSegmentGroup4(SegmentGroup4 segmentGroup4) {
        this.segmentGroup4 = segmentGroup4;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy