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

org.milyn.edi.unedifact.d05a.RECECO.SegmentGroup2 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.d05a.RECECO;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d05a.common.DocumentMessageDetails;    
import org.milyn.edi.unedifact.d05a.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d05a.common.Currencies;    
import java.util.List;    
import org.milyn.edi.unedifact.d05a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d05a.common.CreditCoverDetails;    
import org.milyn.edi.unedifact.d05a.common.PercentageDetails;    
import org.milyn.edi.unedifact.d05a.common.PaymentTerms;    
import org.milyn.edi.unedifact.d05a.common.FreeText;    
import org.milyn.edi.unedifact.d05a.common.Reference;    
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 DocumentMessageDetails documentMessageDetails;
    private MonetaryAmount monetaryAmount;
    private Currencies currencies;
    private List dateTimePeriod;
    private CreditCoverDetails creditCoverDetails;
    private PercentageDetails percentageDetails;
    private PaymentTerms paymentTerms;
    private FreeText freeText;
    private Reference reference;

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

        if(documentMessageDetails != null) {
            nodeWriter.write("DOC");
            nodeWriter.write(delimiters.getField());
            documentMessageDetails.write(nodeWriter, delimiters);
        }
        if(monetaryAmount != null) {
            nodeWriter.write("MOA");
            nodeWriter.write(delimiters.getField());
            monetaryAmount.write(nodeWriter, delimiters);
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(creditCoverDetails != null) {
            nodeWriter.write("CCD");
            nodeWriter.write(delimiters.getField());
            creditCoverDetails.write(nodeWriter, delimiters);
        }
        if(percentageDetails != null) {
            nodeWriter.write("PCD");
            nodeWriter.write(delimiters.getField());
            percentageDetails.write(nodeWriter, delimiters);
        }
        if(paymentTerms != null) {
            nodeWriter.write("PYT");
            nodeWriter.write(delimiters.getField());
            paymentTerms.write(nodeWriter, delimiters);
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
        if(reference != null) {
            nodeWriter.write("RFF");
            nodeWriter.write(delimiters.getField());
            reference.write(nodeWriter, delimiters);
        }
    }

    public DocumentMessageDetails getDocumentMessageDetails() {
        return documentMessageDetails;
    }

    public SegmentGroup2 setDocumentMessageDetails(DocumentMessageDetails documentMessageDetails) {
        this.documentMessageDetails = documentMessageDetails;  return this;
    }

    public MonetaryAmount getMonetaryAmount() {
        return monetaryAmount;
    }

    public SegmentGroup2 setMonetaryAmount(MonetaryAmount monetaryAmount) {
        this.monetaryAmount = monetaryAmount;  return this;
    }

    public Currencies getCurrencies() {
        return currencies;
    }

    public SegmentGroup2 setCurrencies(Currencies currencies) {
        this.currencies = currencies;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup2 setDateTimePeriod(List dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public CreditCoverDetails getCreditCoverDetails() {
        return creditCoverDetails;
    }

    public SegmentGroup2 setCreditCoverDetails(CreditCoverDetails creditCoverDetails) {
        this.creditCoverDetails = creditCoverDetails;  return this;
    }

    public PercentageDetails getPercentageDetails() {
        return percentageDetails;
    }

    public SegmentGroup2 setPercentageDetails(PercentageDetails percentageDetails) {
        this.percentageDetails = percentageDetails;  return this;
    }

    public PaymentTerms getPaymentTerms() {
        return paymentTerms;
    }

    public SegmentGroup2 setPaymentTerms(PaymentTerms paymentTerms) {
        this.paymentTerms = paymentTerms;  return this;
    }

    public FreeText getFreeText() {
        return freeText;
    }

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

    public Reference getReference() {
        return reference;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy