org.milyn.edi.unedifact.d09b.common.DRDDataRepresentationDetails Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d09b.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 DRDDataRepresentationDetails implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e7512StructureComponentIdentifier;
private String e7515StructureTypeCode;
private String e9169DataRepresentationTypeCode;
private BigDecimal e6174SizeMeasure;
private DABigDecimalDecoder e6174SizeMeasureEncoder;
public DRDDataRepresentationDetails() {
e6174SizeMeasureEncoder = new DABigDecimalDecoder();
}
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e7512StructureComponentIdentifier != null) {
nodeWriter.write(delimiters.escape(e7512StructureComponentIdentifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e7515StructureTypeCode != null) {
nodeWriter.write(delimiters.escape(e7515StructureTypeCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9169DataRepresentationTypeCode != null) {
nodeWriter.write(delimiters.escape(e9169DataRepresentationTypeCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e6174SizeMeasure != null) {
nodeWriter.write(delimiters.escape(e6174SizeMeasureEncoder.encode(e6174SizeMeasure, 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 getE7512StructureComponentIdentifier() {
return e7512StructureComponentIdentifier;
}
public DRDDataRepresentationDetails setE7512StructureComponentIdentifier(String e7512StructureComponentIdentifier) {
this.e7512StructureComponentIdentifier = e7512StructureComponentIdentifier; return this;
}
public String getE7515StructureTypeCode() {
return e7515StructureTypeCode;
}
public DRDDataRepresentationDetails setE7515StructureTypeCode(String e7515StructureTypeCode) {
this.e7515StructureTypeCode = e7515StructureTypeCode; return this;
}
public String getE9169DataRepresentationTypeCode() {
return e9169DataRepresentationTypeCode;
}
public DRDDataRepresentationDetails setE9169DataRepresentationTypeCode(String e9169DataRepresentationTypeCode) {
this.e9169DataRepresentationTypeCode = e9169DataRepresentationTypeCode; return this;
}
public BigDecimal getE6174SizeMeasure() {
return e6174SizeMeasure;
}
public DRDDataRepresentationDetails setE6174SizeMeasure(BigDecimal e6174SizeMeasure) {
this.e6174SizeMeasure = e6174SizeMeasure; return this;
}
}