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

org.milyn.edi.unedifact.d98a.CONITT.SegmentGroup32 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.d98a.CONITT;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d98a.common.AllowanceOrCharge;    
import org.milyn.edi.unedifact.d98a.common.Reference;    
import org.milyn.edi.unedifact.d98a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d98a.common.RangeDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d98a.common.FreeText;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup32 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private AllowanceOrCharge allowanceOrCharge;
    private Reference reference;
    private DateTimePeriod dateTimePeriod;
    private RangeDetails rangeDetails;
    private List freeText;
    private List segmentGroup33;

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

        if(allowanceOrCharge != null) {
            nodeWriter.write("ALC");
            nodeWriter.write(delimiters.getField());
            allowanceOrCharge.write(nodeWriter, delimiters);
        }
        if(reference != null) {
            nodeWriter.write("RFF");
            nodeWriter.write(delimiters.getField());
            reference.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(rangeDetails != null) {
            nodeWriter.write("RNG");
            nodeWriter.write(delimiters.getField());
            rangeDetails.write(nodeWriter, delimiters);
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup33 != null && !segmentGroup33.isEmpty()) {
            for(SegmentGroup33 segmentGroup33Inst : segmentGroup33) {
                segmentGroup33Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public AllowanceOrCharge getAllowanceOrCharge() {
        return allowanceOrCharge;
    }

    public SegmentGroup32 setAllowanceOrCharge(AllowanceOrCharge allowanceOrCharge) {
        this.allowanceOrCharge = allowanceOrCharge;  return this;
    }

    public Reference getReference() {
        return reference;
    }

    public SegmentGroup32 setReference(Reference reference) {
        this.reference = reference;  return this;
    }

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup32 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public RangeDetails getRangeDetails() {
        return rangeDetails;
    }

    public SegmentGroup32 setRangeDetails(RangeDetails rangeDetails) {
        this.rangeDetails = rangeDetails;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

    public SegmentGroup32 setFreeText(List freeText) {
        this.freeText = freeText;  return this;
    }

    public List getSegmentGroup33() {
        return segmentGroup33;
    }

    public SegmentGroup32 setSegmentGroup33(List segmentGroup33) {
        this.segmentGroup33 = segmentGroup33;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy