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

org.milyn.edi.unedifact.d99b.RESETT.SegmentGroup6 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.RESETT;

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

public class SegmentGroup6 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private MonetaryAmount monetaryAmount;
    private List nameAndAddress;
    private PaymentInstructions paymentInstructions;
    private List reference;
    private List dateTimePeriod;

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

        if(monetaryAmount != null) {
            nodeWriter.write("MOA");
            nodeWriter.write(delimiters.getField());
            monetaryAmount.write(nodeWriter, delimiters);
        }
        if(nameAndAddress != null && !nameAndAddress.isEmpty()) {
            for(NameAndAddress nameAndAddressInst : nameAndAddress) {
                nodeWriter.write("NAD");
                nodeWriter.write(delimiters.getField());
                nameAndAddressInst.write(nodeWriter, delimiters);
            }
        }
        if(paymentInstructions != null) {
            nodeWriter.write("PAI");
            nodeWriter.write(delimiters.getField());
            paymentInstructions.write(nodeWriter, delimiters);
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
    }

    public MonetaryAmount getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public List getNameAndAddress() {
        return nameAndAddress;
    }

    public SegmentGroup6 setNameAndAddress(List nameAndAddress) {
        this.nameAndAddress = nameAndAddress;  return this;
    }

    public PaymentInstructions getPaymentInstructions() {
        return paymentInstructions;
    }

    public SegmentGroup6 setPaymentInstructions(PaymentInstructions paymentInstructions) {
        this.paymentInstructions = paymentInstructions;  return this;
    }

    public List getReference() {
        return reference;
    }

    public SegmentGroup6 setReference(List reference) {
        this.reference = reference;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy