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

org.milyn.edi.unedifact.d06b.CHACCO.SegmentGroup4 Maven / Gradle / Ivy

/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d06b.CHACCO;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.LineItem;    
import org.milyn.edi.unedifact.d06b.common.AccountIdentification;    
import org.milyn.edi.unedifact.d06b.common.FreeText;    
import org.milyn.edi.unedifact.d06b.common.DutyTaxFeeDetails;    
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;    
import java.util.List;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup4 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private LineItem lineItem;
    private AccountIdentification accountIdentification;
    private FreeText freeText;
    private DutyTaxFeeDetails dutyTaxFeeDetails;
    private DateTimePeriod dateTimePeriod;
    private List segmentGroup5;
    private List segmentGroup7;

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

        if(lineItem != null) {
            nodeWriter.write("LIN");
            nodeWriter.write(delimiters.getField());
            lineItem.write(nodeWriter, delimiters);
        }
        if(accountIdentification != null) {
            nodeWriter.write("CPT");
            nodeWriter.write(delimiters.getField());
            accountIdentification.write(nodeWriter, delimiters);
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
        if(dutyTaxFeeDetails != null) {
            nodeWriter.write("TAX");
            nodeWriter.write(delimiters.getField());
            dutyTaxFeeDetails.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(segmentGroup5 != null && !segmentGroup5.isEmpty()) {
            for(SegmentGroup5 segmentGroup5Inst : segmentGroup5) {
                segmentGroup5Inst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup7 != null && !segmentGroup7.isEmpty()) {
            for(SegmentGroup7 segmentGroup7Inst : segmentGroup7) {
                segmentGroup7Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public LineItem getLineItem() {
        return lineItem;
    }

    public SegmentGroup4 setLineItem(LineItem lineItem) {
        this.lineItem = lineItem;  return this;
    }

    public AccountIdentification getAccountIdentification() {
        return accountIdentification;
    }

    public SegmentGroup4 setAccountIdentification(AccountIdentification accountIdentification) {
        this.accountIdentification = accountIdentification;  return this;
    }

    public FreeText getFreeText() {
        return freeText;
    }

    public SegmentGroup4 setFreeText(FreeText freeText) {
        this.freeText = freeText;  return this;
    }

    public DutyTaxFeeDetails getDutyTaxFeeDetails() {
        return dutyTaxFeeDetails;
    }

    public SegmentGroup4 setDutyTaxFeeDetails(DutyTaxFeeDetails dutyTaxFeeDetails) {
        this.dutyTaxFeeDetails = dutyTaxFeeDetails;  return this;
    }

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getSegmentGroup5() {
        return segmentGroup5;
    }

    public SegmentGroup4 setSegmentGroup5(List segmentGroup5) {
        this.segmentGroup5 = segmentGroup5;  return this;
    }

    public List getSegmentGroup7() {
        return segmentGroup7;
    }

    public SegmentGroup4 setSegmentGroup7(List segmentGroup7) {
        this.segmentGroup7 = segmentGroup7;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy