org.milyn.edi.unedifact.d99b.PROCST.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.PROCST;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.Quantity;
import org.milyn.edi.unedifact.d99b.common.ItemDescription;
import org.milyn.edi.unedifact.d99b.common.CharacteristicClassId;
import java.util.List;
import org.milyn.edi.unedifact.d99b.common.Attribute;
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 Quantity quantity;
private ItemDescription itemDescription;
private CharacteristicClassId characteristicClassId;
private List attribute;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(quantity != null) {
nodeWriter.write("QTY");
nodeWriter.write(delimiters.getField());
quantity.write(nodeWriter, delimiters);
}
if(itemDescription != null) {
nodeWriter.write("IMD");
nodeWriter.write(delimiters.getField());
itemDescription.write(nodeWriter, delimiters);
}
if(characteristicClassId != null) {
nodeWriter.write("CCI");
nodeWriter.write(delimiters.getField());
characteristicClassId.write(nodeWriter, delimiters);
}
if(attribute != null && !attribute.isEmpty()) {
for(Attribute attributeInst : attribute) {
nodeWriter.write("ATT");
nodeWriter.write(delimiters.getField());
attributeInst.write(nodeWriter, delimiters);
}
}
}
public Quantity getQuantity() {
return quantity;
}
public SegmentGroup2 setQuantity(Quantity quantity) {
this.quantity = quantity; return this;
}
public ItemDescription getItemDescription() {
return itemDescription;
}
public SegmentGroup2 setItemDescription(ItemDescription itemDescription) {
this.itemDescription = itemDescription; return this;
}
public CharacteristicClassId getCharacteristicClassId() {
return characteristicClassId;
}
public SegmentGroup2 setCharacteristicClassId(CharacteristicClassId characteristicClassId) {
this.characteristicClassId = characteristicClassId; return this;
}
public List getAttribute() {
return attribute;
}
public SegmentGroup2 setAttribute(List attribute) {
this.attribute = attribute; return this;
}
}