org.milyn.edi.unedifact.d99b.SSRECH.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.SSRECH;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.PartyIdentification;
import org.milyn.edi.unedifact.d99b.common.Address;
import org.milyn.edi.unedifact.d99b.common.RelatedIdentificationNumbers;
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 PartyIdentification partyIdentification;
private Address address;
private RelatedIdentificationNumbers relatedIdentificationNumbers;
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(relatedIdentificationNumbers != null) {
nodeWriter.write("GIR");
nodeWriter.write(delimiters.getField());
relatedIdentificationNumbers.write(nodeWriter, delimiters);
}
}
public PartyIdentification getPartyIdentification() {
return partyIdentification;
}
public SegmentGroup2 setPartyIdentification(PartyIdentification partyIdentification) {
this.partyIdentification = partyIdentification; return this;
}
public Address getAddress() {
return address;
}
public SegmentGroup2 setAddress(Address address) {
this.address = address; return this;
}
public RelatedIdentificationNumbers getRelatedIdentificationNumbers() {
return relatedIdentificationNumbers;
}
public SegmentGroup2 setRelatedIdentificationNumbers(RelatedIdentificationNumbers relatedIdentificationNumbers) {
this.relatedIdentificationNumbers = relatedIdentificationNumbers; return this;
}
}