org.milyn.edi.unedifact.d98a.common.TestMethod Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d98a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d98a.common.field.TestMethodC244;
import org.milyn.edi.unedifact.d98a.common.field.TestReasonC515;
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 TestMethod implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private TestMethodC244 testMethod;
private String testRouteOfAdministeringCoded;
private String testMediumCoded;
private String measurementPurposeQualifier;
private String testRevisionNumber;
private TestReasonC515 testReason;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(testMethod != null) {
testMethod.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(testRouteOfAdministeringCoded != null) {
nodeWriter.write(delimiters.escape(testRouteOfAdministeringCoded.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(testMediumCoded != null) {
nodeWriter.write(delimiters.escape(testMediumCoded.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(measurementPurposeQualifier != null) {
nodeWriter.write(delimiters.escape(measurementPurposeQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(testRevisionNumber != null) {
nodeWriter.write(delimiters.escape(testRevisionNumber.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(testReason != null) {
testReason.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 TestMethodC244 getTestMethod() {
return testMethod;
}
public TestMethod setTestMethod(TestMethodC244 testMethod) {
this.testMethod = testMethod; return this;
}
public String getTestRouteOfAdministeringCoded() {
return testRouteOfAdministeringCoded;
}
public TestMethod setTestRouteOfAdministeringCoded(String testRouteOfAdministeringCoded) {
this.testRouteOfAdministeringCoded = testRouteOfAdministeringCoded; return this;
}
public String getTestMediumCoded() {
return testMediumCoded;
}
public TestMethod setTestMediumCoded(String testMediumCoded) {
this.testMediumCoded = testMediumCoded; return this;
}
public String getMeasurementPurposeQualifier() {
return measurementPurposeQualifier;
}
public TestMethod setMeasurementPurposeQualifier(String measurementPurposeQualifier) {
this.measurementPurposeQualifier = measurementPurposeQualifier; return this;
}
public String getTestRevisionNumber() {
return testRevisionNumber;
}
public TestMethod setTestRevisionNumber(String testRevisionNumber) {
this.testRevisionNumber = testRevisionNumber; return this;
}
public TestReasonC515 getTestReason() {
return testReason;
}
public TestMethod setTestReason(TestReasonC515 testReason) {
this.testReason = testReason; return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy