org.milyn.edi.unedifact.d05a.VATDEC.Vatdec Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.VATDEC;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.smooks.edi.EDIMessage;
import org.milyn.edi.unedifact.d05a.common.BeginningOfMessage;
import org.milyn.edi.unedifact.d05a.common.DateTimePeriod;
import org.milyn.edi.unedifact.d05a.common.PlaceLocationIdentification;
import java.util.List;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
@EDIMessage
public class Vatdec implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private BeginningOfMessage beginningOfMessage;
private DateTimePeriod dateTimePeriod;
private PlaceLocationIdentification placeLocationIdentification;
private List segmentGroup1;
private SegmentGroup12 segmentGroup12;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(beginningOfMessage != null) {
nodeWriter.write("BGM");
nodeWriter.write(delimiters.getField());
beginningOfMessage.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriod.write(nodeWriter, delimiters);
}
if(placeLocationIdentification != null) {
nodeWriter.write("LOC");
nodeWriter.write(delimiters.getField());
placeLocationIdentification.write(nodeWriter, delimiters);
}
if(segmentGroup1 != null && !segmentGroup1.isEmpty()) {
for(SegmentGroup1 segmentGroup1Inst : segmentGroup1) {
segmentGroup1Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup12 != null) {
segmentGroup12.write(nodeWriter, delimiters);
}
}
public BeginningOfMessage getBeginningOfMessage() {
return beginningOfMessage;
}
public Vatdec setBeginningOfMessage(BeginningOfMessage beginningOfMessage) {
this.beginningOfMessage = beginningOfMessage; return this;
}
public DateTimePeriod getDateTimePeriod() {
return dateTimePeriod;
}
public Vatdec setDateTimePeriod(DateTimePeriod dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public PlaceLocationIdentification getPlaceLocationIdentification() {
return placeLocationIdentification;
}
public Vatdec setPlaceLocationIdentification(PlaceLocationIdentification placeLocationIdentification) {
this.placeLocationIdentification = placeLocationIdentification; return this;
}
public List getSegmentGroup1() {
return segmentGroup1;
}
public Vatdec setSegmentGroup1(List segmentGroup1) {
this.segmentGroup1 = segmentGroup1; return this;
}
public SegmentGroup12 getSegmentGroup12() {
return segmentGroup12;
}
public Vatdec setSegmentGroup12(SegmentGroup12 segmentGroup12) {
this.segmentGroup12 = segmentGroup12; return this;
}
}