org.milyn.edi.unedifact.d01a.common.FORFormula 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 org.milyn.edi.unedifact.d01a.common.field.C961FormulaComplexity;
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 FORFormula implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e9501FormulaTypeCodeQualifier;
private String e7402ObjectIdentifier;
private String e9502FormulaName;
private String e4440FreeTextValue;
private C961FormulaComplexity c961FormulaComplexity;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e9501FormulaTypeCodeQualifier != null) {
nodeWriter.write(delimiters.escape(e9501FormulaTypeCodeQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e7402ObjectIdentifier != null) {
nodeWriter.write(delimiters.escape(e7402ObjectIdentifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9502FormulaName != null) {
nodeWriter.write(delimiters.escape(e9502FormulaName.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e4440FreeTextValue != null) {
nodeWriter.write(delimiters.escape(e4440FreeTextValue.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c961FormulaComplexity != null) {
c961FormulaComplexity.write(nodeWriter, 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 getE9501FormulaTypeCodeQualifier() {
return e9501FormulaTypeCodeQualifier;
}
public FORFormula setE9501FormulaTypeCodeQualifier(String e9501FormulaTypeCodeQualifier) {
this.e9501FormulaTypeCodeQualifier = e9501FormulaTypeCodeQualifier; return this;
}
public String getE7402ObjectIdentifier() {
return e7402ObjectIdentifier;
}
public FORFormula setE7402ObjectIdentifier(String e7402ObjectIdentifier) {
this.e7402ObjectIdentifier = e7402ObjectIdentifier; return this;
}
public String getE9502FormulaName() {
return e9502FormulaName;
}
public FORFormula setE9502FormulaName(String e9502FormulaName) {
this.e9502FormulaName = e9502FormulaName; return this;
}
public String getE4440FreeTextValue() {
return e4440FreeTextValue;
}
public FORFormula setE4440FreeTextValue(String e4440FreeTextValue) {
this.e4440FreeTextValue = e4440FreeTextValue; return this;
}
public C961FormulaComplexity getC961FormulaComplexity() {
return c961FormulaComplexity;
}
public FORFormula setC961FormulaComplexity(C961FormulaComplexity c961FormulaComplexity) {
this.c961FormulaComplexity = c961FormulaComplexity; return this;
}
}