org.milyn.edi.unedifact.d01a.common.STGStages Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d01a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import java.math.BigDecimal;
import org.milyn.javabean.decoders.DABigDecimalDecoder;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
import java.io.StringWriter;
import java.util.List;
import java.util.ArrayList;
import org.milyn.edisax.util.EDIUtils;
import org.milyn.edisax.model.internal.DelimiterType;
public class STGStages implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e9421ProcessStageCodeQualifier;
private BigDecimal e6426ProcessStagesQuantity;
private DABigDecimalDecoder e6426ProcessStagesQuantityEncoder;
private BigDecimal e6428ProcessStagesActualQuantity;
private DABigDecimalDecoder e6428ProcessStagesActualQuantityEncoder;
public STGStages() {
e6426ProcessStagesQuantityEncoder = new DABigDecimalDecoder();
e6428ProcessStagesActualQuantityEncoder = new DABigDecimalDecoder();
}
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e9421ProcessStageCodeQualifier != null) {
nodeWriter.write(delimiters.escape(e9421ProcessStageCodeQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e6426ProcessStagesQuantity != null) {
nodeWriter.write(delimiters.escape(e6426ProcessStagesQuantityEncoder.encode(e6426ProcessStagesQuantity, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e6428ProcessStagesActualQuantity != null) {
nodeWriter.write(delimiters.escape(e6428ProcessStagesActualQuantityEncoder.encode(e6428ProcessStagesActualQuantity, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeTokens.add(nodeWriter.toString());
writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
writer.write(delimiters.getSegmentDelimiter());
writer.flush();
}
public String getE9421ProcessStageCodeQualifier() {
return e9421ProcessStageCodeQualifier;
}
public STGStages setE9421ProcessStageCodeQualifier(String e9421ProcessStageCodeQualifier) {
this.e9421ProcessStageCodeQualifier = e9421ProcessStageCodeQualifier; return this;
}
public BigDecimal getE6426ProcessStagesQuantity() {
return e6426ProcessStagesQuantity;
}
public STGStages setE6426ProcessStagesQuantity(BigDecimal e6426ProcessStagesQuantity) {
this.e6426ProcessStagesQuantity = e6426ProcessStagesQuantity; return this;
}
public BigDecimal getE6428ProcessStagesActualQuantity() {
return e6428ProcessStagesActualQuantity;
}
public STGStages setE6428ProcessStagesActualQuantity(BigDecimal e6428ProcessStagesActualQuantity) {
this.e6428ProcessStagesActualQuantity = e6428ProcessStagesActualQuantity; return this;
}
}