org.milyn.edi.unedifact.d02a.TAXCON.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.TAXCON;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.NameAndAddress;
import org.milyn.edi.unedifact.d02a.common.Reference;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup2 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private NameAndAddress nameAndAddress;
private Reference reference;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(nameAndAddress != null) {
nodeWriter.write("NAD");
nodeWriter.write(delimiters.getField());
nameAndAddress.write(nodeWriter, delimiters);
}
if(reference != null) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
reference.write(nodeWriter, delimiters);
}
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup2 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public Reference getReference() {
return reference;
}
public SegmentGroup2 setReference(Reference reference) {
this.reference = reference; return this;
}
}