org.milyn.edi.unedifact.d99b.CLASET.SegmentGroup18 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.CLASET;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.Attribute;
import java.util.List;
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;
import org.milyn.edi.unedifact.d99b.common.SimpleDataElementDetails;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup18 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private Attribute attribute;
private List dateTimePeriod;
private SimpleDataElementDetails simpleDataElementDetails;
private List segmentGroup19;
private List segmentGroup20;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(attribute != null) {
nodeWriter.write("ATT");
nodeWriter.write(delimiters.getField());
attribute.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(simpleDataElementDetails != null) {
nodeWriter.write("ELM");
nodeWriter.write(delimiters.getField());
simpleDataElementDetails.write(nodeWriter, delimiters);
}
if(segmentGroup19 != null && !segmentGroup19.isEmpty()) {
for(SegmentGroup19 segmentGroup19Inst : segmentGroup19) {
segmentGroup19Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup20 != null && !segmentGroup20.isEmpty()) {
for(SegmentGroup20 segmentGroup20Inst : segmentGroup20) {
segmentGroup20Inst.write(nodeWriter, delimiters);
}
}
}
public Attribute getAttribute() {
return attribute;
}
public SegmentGroup18 setAttribute(Attribute attribute) {
this.attribute = attribute; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup18 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public SimpleDataElementDetails getSimpleDataElementDetails() {
return simpleDataElementDetails;
}
public SegmentGroup18 setSimpleDataElementDetails(SimpleDataElementDetails simpleDataElementDetails) {
this.simpleDataElementDetails = simpleDataElementDetails; return this;
}
public List getSegmentGroup19() {
return segmentGroup19;
}
public SegmentGroup18 setSegmentGroup19(List segmentGroup19) {
this.segmentGroup19 = segmentGroup19; return this;
}
public List getSegmentGroup20() {
return segmentGroup20;
}
public SegmentGroup18 setSegmentGroup20(List segmentGroup20) {
this.segmentGroup20 = segmentGroup20; return this;
}
}