org.milyn.edi.unedifact.d02a.PROTAP.SegmentGroup3 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.PROTAP;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.PartyIdentification;
import org.milyn.edi.unedifact.d02a.common.Address;
import org.milyn.edi.unedifact.d02a.common.StructureIdentification;
import java.util.List;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup3 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private PartyIdentification partyIdentification;
private Address address;
private StructureIdentification structureIdentification;
private List segmentGroup4;
private List segmentGroup5;
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(structureIdentification != null) {
nodeWriter.write("BII");
nodeWriter.write(delimiters.getField());
structureIdentification.write(nodeWriter, delimiters);
}
if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
segmentGroup4Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup5 != null && !segmentGroup5.isEmpty()) {
for(SegmentGroup5 segmentGroup5Inst : segmentGroup5) {
segmentGroup5Inst.write(nodeWriter, delimiters);
}
}
}
public PartyIdentification getPartyIdentification() {
return partyIdentification;
}
public SegmentGroup3 setPartyIdentification(PartyIdentification partyIdentification) {
this.partyIdentification = partyIdentification; return this;
}
public Address getAddress() {
return address;
}
public SegmentGroup3 setAddress(Address address) {
this.address = address; return this;
}
public StructureIdentification getStructureIdentification() {
return structureIdentification;
}
public SegmentGroup3 setStructureIdentification(StructureIdentification structureIdentification) {
this.structureIdentification = structureIdentification; return this;
}
public List getSegmentGroup4() {
return segmentGroup4;
}
public SegmentGroup3 setSegmentGroup4(List segmentGroup4) {
this.segmentGroup4 = segmentGroup4; return this;
}
public List getSegmentGroup5() {
return segmentGroup5;
}
public SegmentGroup3 setSegmentGroup5(List segmentGroup5) {
this.segmentGroup5 = segmentGroup5; return this;
}
}