org.milyn.edi.unedifact.d99b.common.ATTAttribute Maven / Gradle / Ivy
The newest version!
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99b.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99b.common.field.C955AttributeType;
import org.milyn.edi.unedifact.d99b.common.field.C956AttributeDetail;
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 ATTAttribute implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e9017AttributeFunctionCodeQualifier;
private C955AttributeType c955AttributeType;
private C956AttributeDetail c956AttributeDetail;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e9017AttributeFunctionCodeQualifier != null) {
nodeWriter.write(delimiters.escape(e9017AttributeFunctionCodeQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c955AttributeType != null) {
c955AttributeType.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c956AttributeDetail != null) {
c956AttributeDetail.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 getE9017AttributeFunctionCodeQualifier() {
return e9017AttributeFunctionCodeQualifier;
}
public ATTAttribute setE9017AttributeFunctionCodeQualifier(String e9017AttributeFunctionCodeQualifier) {
this.e9017AttributeFunctionCodeQualifier = e9017AttributeFunctionCodeQualifier; return this;
}
public C955AttributeType getC955AttributeType() {
return c955AttributeType;
}
public ATTAttribute setC955AttributeType(C955AttributeType c955AttributeType) {
this.c955AttributeType = c955AttributeType; return this;
}
public C956AttributeDetail getC956AttributeDetail() {
return c956AttributeDetail;
}
public ATTAttribute setC956AttributeDetail(C956AttributeDetail c956AttributeDetail) {
this.c956AttributeDetail = c956AttributeDetail; return this;
}
}