org.milyn.edi.unedifact.d96a.common.RelatedIdentificationNumbers Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.field.IdentificationNumberC206;
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 RelatedIdentificationNumbers implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String setIdentificationQualifier;
private IdentificationNumberC206 identificationNumber1;
private IdentificationNumberC206 identificationNumber2;
private IdentificationNumberC206 identificationNumber3;
private IdentificationNumberC206 identificationNumber4;
private IdentificationNumberC206 identificationNumber5;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(setIdentificationQualifier != null) {
nodeWriter.write(delimiters.escape(setIdentificationQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(identificationNumber1 != null) {
identificationNumber1.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(identificationNumber2 != null) {
identificationNumber2.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(identificationNumber3 != null) {
identificationNumber3.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(identificationNumber4 != null) {
identificationNumber4.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(identificationNumber5 != null) {
identificationNumber5.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 getSetIdentificationQualifier() {
return setIdentificationQualifier;
}
public RelatedIdentificationNumbers setSetIdentificationQualifier(String setIdentificationQualifier) {
this.setIdentificationQualifier = setIdentificationQualifier; return this;
}
public IdentificationNumberC206 getIdentificationNumber1() {
return identificationNumber1;
}
public RelatedIdentificationNumbers setIdentificationNumber1(IdentificationNumberC206 identificationNumber1) {
this.identificationNumber1 = identificationNumber1; return this;
}
public IdentificationNumberC206 getIdentificationNumber2() {
return identificationNumber2;
}
public RelatedIdentificationNumbers setIdentificationNumber2(IdentificationNumberC206 identificationNumber2) {
this.identificationNumber2 = identificationNumber2; return this;
}
public IdentificationNumberC206 getIdentificationNumber3() {
return identificationNumber3;
}
public RelatedIdentificationNumbers setIdentificationNumber3(IdentificationNumberC206 identificationNumber3) {
this.identificationNumber3 = identificationNumber3; return this;
}
public IdentificationNumberC206 getIdentificationNumber4() {
return identificationNumber4;
}
public RelatedIdentificationNumbers setIdentificationNumber4(IdentificationNumberC206 identificationNumber4) {
this.identificationNumber4 = identificationNumber4; return this;
}
public IdentificationNumberC206 getIdentificationNumber5() {
return identificationNumber5;
}
public RelatedIdentificationNumbers setIdentificationNumber5(IdentificationNumberC206 identificationNumber5) {
this.identificationNumber5 = identificationNumber5; return this;
}
}