org.milyn.edi.unedifact.d99b.SUPCOT.SegmentGroup3 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.SUPCOT;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.NameAndAddress;
import org.milyn.edi.unedifact.d99b.common.Attribute;
import org.milyn.edi.unedifact.d99b.common.Reference;
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;
import org.milyn.edi.unedifact.d99b.common.EmploymentDetails;
import org.milyn.edi.unedifact.d99b.common.PlaceLocationIdentification;
import java.util.List;
import org.milyn.edi.unedifact.d99b.common.FreeText;
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 NameAndAddress nameAndAddress;
private Attribute attribute;
private Reference reference;
private DateTimePeriod dateTimePeriod;
private EmploymentDetails employmentDetails;
private PlaceLocationIdentification placeLocationIdentification;
private List freeText;
private List segmentGroup4;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(nameAndAddress != null) {
nodeWriter.write("NAD");
nodeWriter.write(delimiters.getField());
nameAndAddress.write(nodeWriter, delimiters);
}
if(attribute != null) {
nodeWriter.write("ATT");
nodeWriter.write(delimiters.getField());
attribute.write(nodeWriter, delimiters);
}
if(reference != null) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
reference.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriod.write(nodeWriter, delimiters);
}
if(employmentDetails != null) {
nodeWriter.write("EMP");
nodeWriter.write(delimiters.getField());
employmentDetails.write(nodeWriter, delimiters);
}
if(placeLocationIdentification != null) {
nodeWriter.write("LOC");
nodeWriter.write(delimiters.getField());
placeLocationIdentification.write(nodeWriter, delimiters);
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
segmentGroup4Inst.write(nodeWriter, delimiters);
}
}
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup3 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public Attribute getAttribute() {
return attribute;
}
public SegmentGroup3 setAttribute(Attribute attribute) {
this.attribute = attribute; return this;
}
public Reference getReference() {
return reference;
}
public SegmentGroup3 setReference(Reference reference) {
this.reference = reference; return this;
}
public DateTimePeriod getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup3 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public EmploymentDetails getEmploymentDetails() {
return employmentDetails;
}
public SegmentGroup3 setEmploymentDetails(EmploymentDetails employmentDetails) {
this.employmentDetails = employmentDetails; return this;
}
public PlaceLocationIdentification getPlaceLocationIdentification() {
return placeLocationIdentification;
}
public SegmentGroup3 setPlaceLocationIdentification(PlaceLocationIdentification placeLocationIdentification) {
this.placeLocationIdentification = placeLocationIdentification; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup3 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getSegmentGroup4() {
return segmentGroup4;
}
public SegmentGroup3 setSegmentGroup4(List segmentGroup4) {
this.segmentGroup4 = segmentGroup4; return this;
}
}