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

org.milyn.edi.unedifact.d99b.IFTMBP.SegmentGroup12 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.IFTMBP;

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

public class SegmentGroup12 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private ChargePaymentInstructions chargePaymentInstructions;
    private List reference;
    private Currencies currencies;
    private List placeLocationIdentification;
    private List monetaryAmount;

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

        if(chargePaymentInstructions != null) {
            nodeWriter.write("CPI");
            nodeWriter.write(delimiters.getField());
            chargePaymentInstructions.write(nodeWriter, delimiters);
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
        if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
            for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
                nodeWriter.write("LOC");
                nodeWriter.write(delimiters.getField());
                placeLocationIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
    }

    public ChargePaymentInstructions getChargePaymentInstructions() {
        return chargePaymentInstructions;
    }

    public SegmentGroup12 setChargePaymentInstructions(ChargePaymentInstructions chargePaymentInstructions) {
        this.chargePaymentInstructions = chargePaymentInstructions;  return this;
    }

    public List getReference() {
        return reference;
    }

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

    public Currencies getCurrencies() {
        return currencies;
    }

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

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

    public SegmentGroup12 setPlaceLocationIdentification(List placeLocationIdentification) {
        this.placeLocationIdentification = placeLocationIdentification;  return this;
    }

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

    public SegmentGroup12 setMonetaryAmount(List monetaryAmount) {
        this.monetaryAmount = monetaryAmount;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy