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

org.milyn.edi.unedifact.d99b.CONTEN.SegmentGroup7 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.d99b.CONTEN;

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

public class SegmentGroup7 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 segmentGroup8;

    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(segmentGroup8 != null && !segmentGroup8.isEmpty()) {
            for(SegmentGroup8 segmentGroup8Inst : segmentGroup8) {
                segmentGroup8Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public AllowanceOrCharge getAllowanceOrCharge() {
        return allowanceOrCharge;
    }

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

    public Reference getReference() {
        return reference;
    }

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

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public RangeDetails getRangeDetails() {
        return rangeDetails;
    }

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

    public List getFreeText() {
        return freeText;
    }

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

    public List getSegmentGroup8() {
        return segmentGroup8;
    }

    public SegmentGroup7 setSegmentGroup8(List segmentGroup8) {
        this.segmentGroup8 = segmentGroup8;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy