org.milyn.edi.unedifact.d05a.common.DFNDefinitionFunction Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
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 DFNDefinitionFunction implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e9023DefinitionFunctionCode;
private String e9025DefinitionExtentCode;
private String e4519DefinitionIdentifier;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e9023DefinitionFunctionCode != null) {
nodeWriter.write(delimiters.escape(e9023DefinitionFunctionCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9025DefinitionExtentCode != null) {
nodeWriter.write(delimiters.escape(e9025DefinitionExtentCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e4519DefinitionIdentifier != null) {
nodeWriter.write(delimiters.escape(e4519DefinitionIdentifier.toString()));
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 getE9023DefinitionFunctionCode() {
return e9023DefinitionFunctionCode;
}
public DFNDefinitionFunction setE9023DefinitionFunctionCode(String e9023DefinitionFunctionCode) {
this.e9023DefinitionFunctionCode = e9023DefinitionFunctionCode; return this;
}
public String getE9025DefinitionExtentCode() {
return e9025DefinitionExtentCode;
}
public DFNDefinitionFunction setE9025DefinitionExtentCode(String e9025DefinitionExtentCode) {
this.e9025DefinitionExtentCode = e9025DefinitionExtentCode; return this;
}
public String getE4519DefinitionIdentifier() {
return e4519DefinitionIdentifier;
}
public DFNDefinitionFunction setE4519DefinitionIdentifier(String e4519DefinitionIdentifier) {
this.e4519DefinitionIdentifier = e4519DefinitionIdentifier; return this;
}
}