org.milyn.edi.unedifact.d02a.PRIHIS.Prihis Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.PRIHIS;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.smooks.edi.EDIMessage;
import org.milyn.edi.unedifact.d02a.common.BeginningOfMessage;
import org.milyn.edi.unedifact.d02a.common.DateTimePeriod;
import java.util.List;
import org.milyn.edi.unedifact.d02a.common.Reference;
import org.milyn.edi.unedifact.d02a.common.Currencies;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
@EDIMessage
public class Prihis implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private BeginningOfMessage beginningOfMessage;
private DateTimePeriod dateTimePeriod;
private List reference;
private List currencies;
private List segmentGroup1;
private List segmentGroup4;
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(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(currencies != null && !currencies.isEmpty()) {
for(Currencies currenciesInst : currencies) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currenciesInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup1 != null && !segmentGroup1.isEmpty()) {
for(SegmentGroup1 segmentGroup1Inst : segmentGroup1) {
segmentGroup1Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
segmentGroup4Inst.write(nodeWriter, delimiters);
}
}
}
public BeginningOfMessage getBeginningOfMessage() {
return beginningOfMessage;
}
public Prihis setBeginningOfMessage(BeginningOfMessage beginningOfMessage) {
this.beginningOfMessage = beginningOfMessage; return this;
}
public DateTimePeriod getDateTimePeriod() {
return dateTimePeriod;
}
public Prihis setDateTimePeriod(DateTimePeriod dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public List getReference() {
return reference;
}
public Prihis setReference(List reference) {
this.reference = reference; return this;
}
public List getCurrencies() {
return currencies;
}
public Prihis setCurrencies(List currencies) {
this.currencies = currencies; return this;
}
public List getSegmentGroup1() {
return segmentGroup1;
}
public Prihis setSegmentGroup1(List segmentGroup1) {
this.segmentGroup1 = segmentGroup1; return this;
}
public List getSegmentGroup4() {
return segmentGroup4;
}
public Prihis setSegmentGroup4(List segmentGroup4) {
this.segmentGroup4 = segmentGroup4; return this;
}
}