org.milyn.edi.unedifact.d06b.OSTRPT.SegmentGroup18 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.OSTRPT;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.Status;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;
import org.milyn.edi.unedifact.d06b.common.PercentageDetails;
import org.milyn.edi.unedifact.d06b.common.Quantity;
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;
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 Status status;
private List dateTimePeriod;
private PercentageDetails percentageDetails;
private Quantity quantity;
private NameAndAddress nameAndAddress;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(status != null) {
nodeWriter.write("STS");
nodeWriter.write(delimiters.getField());
status.write(nodeWriter, delimiters);
}
if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
nodeWriter.write("DTM");
nodeWriter.write(delimiters.getField());
dateTimePeriodInst.write(nodeWriter, delimiters);
}
}
if(percentageDetails != null) {
nodeWriter.write("PCD");
nodeWriter.write(delimiters.getField());
percentageDetails.write(nodeWriter, delimiters);
}
if(quantity != null) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantity.write(nodeWriter, delimiters);
}
if(nameAndAddress != null) {
nodeWriter.write("NAD");
nodeWriter.write(delimiters.getField());
nameAndAddress.write(nodeWriter, delimiters);
}
}
public Status getStatus() {
return status;
}
public SegmentGroup18 setStatus(Status status) {
this.status = status; return this;
}
public List getDateTimePeriod() {
return dateTimePeriod;
}
public SegmentGroup18 setDateTimePeriod(List dateTimePeriod) {
this.dateTimePeriod = dateTimePeriod; return this;
}
public PercentageDetails getPercentageDetails() {
return percentageDetails;
}
public SegmentGroup18 setPercentageDetails(PercentageDetails percentageDetails) {
this.percentageDetails = percentageDetails; return this;
}
public Quantity getQuantity() {
return quantity;
}
public SegmentGroup18 setQuantity(Quantity quantity) {
this.quantity = quantity; return this;
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup18 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
}