org.milyn.edi.unedifact.d11b.common.SGUSegmentUsageDetails Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d11b.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 SGUSegmentUsageDetails implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e9166SegmentTagIdentifier;
private String e7299RequirementDesignatorCode;
private BigDecimal e6176OccurrencesMaximumNumber;
private DABigDecimalDecoder e6176OccurrencesMaximumNumberEncoder;
private BigDecimal e7168LevelNumber;
private DABigDecimalDecoder e7168LevelNumberEncoder;
private String e1050SequencePositionIdentifier;
private String e1049MessageSectionCode;
private String e4513MaintenanceOperationCode;
public SGUSegmentUsageDetails() {
e6176OccurrencesMaximumNumberEncoder = new DABigDecimalDecoder();
e7168LevelNumberEncoder = new DABigDecimalDecoder();
}
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e9166SegmentTagIdentifier != null) {
nodeWriter.write(delimiters.escape(e9166SegmentTagIdentifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e7299RequirementDesignatorCode != null) {
nodeWriter.write(delimiters.escape(e7299RequirementDesignatorCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e6176OccurrencesMaximumNumber != null) {
nodeWriter.write(delimiters.escape(e6176OccurrencesMaximumNumberEncoder.encode(e6176OccurrencesMaximumNumber, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e7168LevelNumber != null) {
nodeWriter.write(delimiters.escape(e7168LevelNumberEncoder.encode(e7168LevelNumber, delimiters)));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e1050SequencePositionIdentifier != null) {
nodeWriter.write(delimiters.escape(e1050SequencePositionIdentifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e1049MessageSectionCode != null) {
nodeWriter.write(delimiters.escape(e1049MessageSectionCode.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);
}
nodeTokens.add(nodeWriter.toString());
writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
writer.write(delimiters.getSegmentDelimiter());
writer.flush();
}
public String getE9166SegmentTagIdentifier() {
return e9166SegmentTagIdentifier;
}
public SGUSegmentUsageDetails setE9166SegmentTagIdentifier(String e9166SegmentTagIdentifier) {
this.e9166SegmentTagIdentifier = e9166SegmentTagIdentifier; return this;
}
public String getE7299RequirementDesignatorCode() {
return e7299RequirementDesignatorCode;
}
public SGUSegmentUsageDetails setE7299RequirementDesignatorCode(String e7299RequirementDesignatorCode) {
this.e7299RequirementDesignatorCode = e7299RequirementDesignatorCode; return this;
}
public BigDecimal getE6176OccurrencesMaximumNumber() {
return e6176OccurrencesMaximumNumber;
}
public SGUSegmentUsageDetails setE6176OccurrencesMaximumNumber(BigDecimal e6176OccurrencesMaximumNumber) {
this.e6176OccurrencesMaximumNumber = e6176OccurrencesMaximumNumber; return this;
}
public BigDecimal getE7168LevelNumber() {
return e7168LevelNumber;
}
public SGUSegmentUsageDetails setE7168LevelNumber(BigDecimal e7168LevelNumber) {
this.e7168LevelNumber = e7168LevelNumber; return this;
}
public String getE1050SequencePositionIdentifier() {
return e1050SequencePositionIdentifier;
}
public SGUSegmentUsageDetails setE1050SequencePositionIdentifier(String e1050SequencePositionIdentifier) {
this.e1050SequencePositionIdentifier = e1050SequencePositionIdentifier; return this;
}
public String getE1049MessageSectionCode() {
return e1049MessageSectionCode;
}
public SGUSegmentUsageDetails setE1049MessageSectionCode(String e1049MessageSectionCode) {
this.e1049MessageSectionCode = e1049MessageSectionCode; return this;
}
public String getE4513MaintenanceOperationCode() {
return e4513MaintenanceOperationCode;
}
public SGUSegmentUsageDetails setE4513MaintenanceOperationCode(String e4513MaintenanceOperationCode) {
this.e4513MaintenanceOperationCode = e4513MaintenanceOperationCode; return this;
}
}