org.milyn.edi.unedifact.d02a.UTILMD.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.UTILMD;
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 org.milyn.edi.unedifact.d02a.common.FinancialInstitutionInformation;
import java.util.List;
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;
private FinancialInstitutionInformation financialInstitutionInformation;
private List segmentGroup3;
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);
}
if(financialInstitutionInformation != null) {
nodeWriter.write("FII");
nodeWriter.write(delimiters.getField());
financialInstitutionInformation.write(nodeWriter, delimiters);
}
if(segmentGroup3 != null && !segmentGroup3.isEmpty()) {
for(SegmentGroup3 segmentGroup3Inst : segmentGroup3) {
segmentGroup3Inst.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;
}
public FinancialInstitutionInformation getFinancialInstitutionInformation() {
return financialInstitutionInformation;
}
public SegmentGroup2 setFinancialInstitutionInformation(FinancialInstitutionInformation financialInstitutionInformation) {
this.financialInstitutionInformation = financialInstitutionInformation; return this;
}
public List getSegmentGroup3() {
return segmentGroup3;
}
public SegmentGroup2 setSegmentGroup3(List segmentGroup3) {
this.segmentGroup3 = segmentGroup3; return this;
}
}