org.milyn.edi.unedifact.d05a.LREACT.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.LREACT;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.ItemDescription;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.PlaceLocationIdentification;
import org.milyn.edi.unedifact.d05a.common.SequenceDetails;
import org.milyn.edi.unedifact.d05a.common.Currencies;
import org.milyn.edi.unedifact.d05a.common.PartyIdentification;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup2 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private ItemDescription itemDescription;
private List placeLocationIdentification;
private SequenceDetails sequenceDetails;
private Currencies currencies;
private List partyIdentification;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(itemDescription != null) {
nodeWriter.write("IMD");
nodeWriter.write(delimiters.getField());
itemDescription.write(nodeWriter, delimiters);
}
if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
nodeWriter.write("LOC");
nodeWriter.write(delimiters.getField());
placeLocationIdentificationInst.write(nodeWriter, delimiters);
}
}
if(sequenceDetails != null) {
nodeWriter.write("SEQ");
nodeWriter.write(delimiters.getField());
sequenceDetails.write(nodeWriter, delimiters);
}
if(currencies != null) {
nodeWriter.write("CUX");
nodeWriter.write(delimiters.getField());
currencies.write(nodeWriter, delimiters);
}
if(partyIdentification != null && !partyIdentification.isEmpty()) {
for(PartyIdentification partyIdentificationInst : partyIdentification) {
nodeWriter.write("PNA");
nodeWriter.write(delimiters.getField());
partyIdentificationInst.write(nodeWriter, delimiters);
}
}
}
public ItemDescription getItemDescription() {
return itemDescription;
}
public SegmentGroup2 setItemDescription(ItemDescription itemDescription) {
this.itemDescription = itemDescription; return this;
}
public List getPlaceLocationIdentification() {
return placeLocationIdentification;
}
public SegmentGroup2 setPlaceLocationIdentification(List placeLocationIdentification) {
this.placeLocationIdentification = placeLocationIdentification; return this;
}
public SequenceDetails getSequenceDetails() {
return sequenceDetails;
}
public SegmentGroup2 setSequenceDetails(SequenceDetails sequenceDetails) {
this.sequenceDetails = sequenceDetails; return this;
}
public Currencies getCurrencies() {
return currencies;
}
public SegmentGroup2 setCurrencies(Currencies currencies) {
this.currencies = currencies; return this;
}
public List getPartyIdentification() {
return partyIdentification;
}
public SegmentGroup2 setPartyIdentification(List partyIdentification) {
this.partyIdentification = partyIdentification; return this;
}
}