org.milyn.edi.unedifact.d05a.common.ELMSimpleDataElementDetails 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.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 ELMSimpleDataElementDetails implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e9150SimpleDataElementTagIdentifier;
private String e9153SimpleDataElementCharacterRepresentationCode;
private String e9155LengthTypeCode;
private BigDecimal e9156SimpleDataElementMaximumLengthMeasure;
private DABigDecimalDecoder e9156SimpleDataElementMaximumLengthMeasureEncoder;
private BigDecimal e9158SimpleDataElementMinimumLengthMeasure;
private DABigDecimalDecoder e9158SimpleDataElementMinimumLengthMeasureEncoder;
private String e9161CodeSetIndicatorCode;
private String e1507DesignatedClassCode;
private String e4513MaintenanceOperationCode;
private BigDecimal e6432SignificantDigitsQuantity;
private DABigDecimalDecoder e6432SignificantDigitsQuantityEncoder;
public ELMSimpleDataElementDetails() {
e9156SimpleDataElementMaximumLengthMeasureEncoder = new DABigDecimalDecoder();
e9158SimpleDataElementMinimumLengthMeasureEncoder = new DABigDecimalDecoder();
e6432SignificantDigitsQuantityEncoder = new DABigDecimalDecoder();
}
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e9150SimpleDataElementTagIdentifier != null) {
nodeWriter.write(delimiters.escape(e9150SimpleDataElementTagIdentifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9153SimpleDataElementCharacterRepresentationCode != null) {
nodeWriter.write(delimiters.escape(e9153SimpleDataElementCharacterRepresentationCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9155LengthTypeCode != null) {
nodeWriter.write(delimiters.escape(e9155LengthTypeCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9156SimpleDataElementMaximumLengthMeasure != null) {
nodeWriter.write(delimiters.escape(e9156SimpleDataElementMaximumLengthMeasureEncoder.encode(e9156SimpleDataElementMaximumLengthMeasure, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9158SimpleDataElementMinimumLengthMeasure != null) {
nodeWriter.write(delimiters.escape(e9158SimpleDataElementMinimumLengthMeasureEncoder.encode(e9158SimpleDataElementMinimumLengthMeasure, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e9161CodeSetIndicatorCode != null) {
nodeWriter.write(delimiters.escape(e9161CodeSetIndicatorCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e1507DesignatedClassCode != null) {
nodeWriter.write(delimiters.escape(e1507DesignatedClassCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e4513MaintenanceOperationCode != null) {
nodeWriter.write(delimiters.escape(e4513MaintenanceOperationCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e6432SignificantDigitsQuantity != null) {
nodeWriter.write(delimiters.escape(e6432SignificantDigitsQuantityEncoder.encode(e6432SignificantDigitsQuantity, 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 getE9150SimpleDataElementTagIdentifier() {
return e9150SimpleDataElementTagIdentifier;
}
public ELMSimpleDataElementDetails setE9150SimpleDataElementTagIdentifier(String e9150SimpleDataElementTagIdentifier) {
this.e9150SimpleDataElementTagIdentifier = e9150SimpleDataElementTagIdentifier; return this;
}
public String getE9153SimpleDataElementCharacterRepresentationCode() {
return e9153SimpleDataElementCharacterRepresentationCode;
}
public ELMSimpleDataElementDetails setE9153SimpleDataElementCharacterRepresentationCode(String e9153SimpleDataElementCharacterRepresentationCode) {
this.e9153SimpleDataElementCharacterRepresentationCode = e9153SimpleDataElementCharacterRepresentationCode; return this;
}
public String getE9155LengthTypeCode() {
return e9155LengthTypeCode;
}
public ELMSimpleDataElementDetails setE9155LengthTypeCode(String e9155LengthTypeCode) {
this.e9155LengthTypeCode = e9155LengthTypeCode; return this;
}
public BigDecimal getE9156SimpleDataElementMaximumLengthMeasure() {
return e9156SimpleDataElementMaximumLengthMeasure;
}
public ELMSimpleDataElementDetails setE9156SimpleDataElementMaximumLengthMeasure(BigDecimal e9156SimpleDataElementMaximumLengthMeasure) {
this.e9156SimpleDataElementMaximumLengthMeasure = e9156SimpleDataElementMaximumLengthMeasure; return this;
}
public BigDecimal getE9158SimpleDataElementMinimumLengthMeasure() {
return e9158SimpleDataElementMinimumLengthMeasure;
}
public ELMSimpleDataElementDetails setE9158SimpleDataElementMinimumLengthMeasure(BigDecimal e9158SimpleDataElementMinimumLengthMeasure) {
this.e9158SimpleDataElementMinimumLengthMeasure = e9158SimpleDataElementMinimumLengthMeasure; return this;
}
public String getE9161CodeSetIndicatorCode() {
return e9161CodeSetIndicatorCode;
}
public ELMSimpleDataElementDetails setE9161CodeSetIndicatorCode(String e9161CodeSetIndicatorCode) {
this.e9161CodeSetIndicatorCode = e9161CodeSetIndicatorCode; return this;
}
public String getE1507DesignatedClassCode() {
return e1507DesignatedClassCode;
}
public ELMSimpleDataElementDetails setE1507DesignatedClassCode(String e1507DesignatedClassCode) {
this.e1507DesignatedClassCode = e1507DesignatedClassCode; return this;
}
public String getE4513MaintenanceOperationCode() {
return e4513MaintenanceOperationCode;
}
public ELMSimpleDataElementDetails setE4513MaintenanceOperationCode(String e4513MaintenanceOperationCode) {
this.e4513MaintenanceOperationCode = e4513MaintenanceOperationCode; return this;
}
public BigDecimal getE6432SignificantDigitsQuantity() {
return e6432SignificantDigitsQuantity;
}
public ELMSimpleDataElementDetails setE6432SignificantDigitsQuantity(BigDecimal e6432SignificantDigitsQuantity) {
this.e6432SignificantDigitsQuantity = e6432SignificantDigitsQuantity; return this;
}
}