All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.milyn.edi.unedifact.d02a.SSRECH.SegmentGroup8 Maven / Gradle / Ivy

There is a newer version: 1.7.1.0
Show newest version
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d02a.SSRECH;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d02a.common.ContributionDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d02a.common.ControlTotal;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup8 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private ContributionDetails contributionDetails;
    private List controlTotal;

    public void write(Writer writer, Delimiters delimiters) throws IOException {
        
        Writer nodeWriter = writer;

        if(contributionDetails != null) {
            nodeWriter.write("COT");
            nodeWriter.write(delimiters.getField());
            contributionDetails.write(nodeWriter, delimiters);
        }
        if(controlTotal != null && !controlTotal.isEmpty()) {
            for(ControlTotal controlTotalInst : controlTotal) {
                nodeWriter.write("CNT");
                nodeWriter.write(delimiters.getField());
                controlTotalInst.write(nodeWriter, delimiters);
            }
        }
    }

    public ContributionDetails getContributionDetails() {
        return contributionDetails;
    }

    public SegmentGroup8 setContributionDetails(ContributionDetails contributionDetails) {
        this.contributionDetails = contributionDetails;  return this;
    }

    public List getControlTotal() {
        return controlTotal;
    }

    public SegmentGroup8 setControlTotal(List controlTotal) {
        this.controlTotal = controlTotal;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy