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

org.milyn.edi.unedifact.d03b.IFTMAN.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.d03b.IFTMAN;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d03b.common.ChargeRateCalculations;    
import org.milyn.edi.unedifact.d03b.common.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d03b.common.FreeText;    
import org.milyn.edi.unedifact.d03b.common.Currencies;    
import org.milyn.edi.unedifact.d03b.common.PriceDetails;    
import org.milyn.edi.unedifact.d03b.common.NumberOfUnits;    
import org.milyn.edi.unedifact.d03b.common.PercentageDetails;    
import java.util.List;    
import org.milyn.edi.unedifact.d03b.common.MonetaryAmount;    
import org.milyn.edi.unedifact.d03b.common.Quantity;    
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 ChargeRateCalculations chargeRateCalculations;
    private PlaceLocationIdentification placeLocationIdentification;
    private FreeText freeText;
    private Currencies currencies;
    private PriceDetails priceDetails;
    private NumberOfUnits numberOfUnits;
    private PercentageDetails percentageDetails;
    private List monetaryAmount;
    private List quantity;

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

        if(chargeRateCalculations != null) {
            nodeWriter.write("TCC");
            nodeWriter.write(delimiters.getField());
            chargeRateCalculations.write(nodeWriter, delimiters);
        }
        if(placeLocationIdentification != null) {
            nodeWriter.write("LOC");
            nodeWriter.write(delimiters.getField());
            placeLocationIdentification.write(nodeWriter, delimiters);
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
        if(currencies != null) {
            nodeWriter.write("CUX");
            nodeWriter.write(delimiters.getField());
            currencies.write(nodeWriter, delimiters);
        }
        if(priceDetails != null) {
            nodeWriter.write("PRI");
            nodeWriter.write(delimiters.getField());
            priceDetails.write(nodeWriter, delimiters);
        }
        if(numberOfUnits != null) {
            nodeWriter.write("EQN");
            nodeWriter.write(delimiters.getField());
            numberOfUnits.write(nodeWriter, delimiters);
        }
        if(percentageDetails != null) {
            nodeWriter.write("PCD");
            nodeWriter.write(delimiters.getField());
            percentageDetails.write(nodeWriter, delimiters);
        }
        if(monetaryAmount != null && !monetaryAmount.isEmpty()) {
            for(MonetaryAmount monetaryAmountInst : monetaryAmount) {
                nodeWriter.write("MOA");
                nodeWriter.write(delimiters.getField());
                monetaryAmountInst.write(nodeWriter, delimiters);
            }
        }
        if(quantity != null && !quantity.isEmpty()) {
            for(Quantity quantityInst : quantity) {
                nodeWriter.write("QTY");
                nodeWriter.write(delimiters.getField());
                quantityInst.write(nodeWriter, delimiters);
            }
        }
    }

    public ChargeRateCalculations getChargeRateCalculations() {
        return chargeRateCalculations;
    }

    public SegmentGroup7 setChargeRateCalculations(ChargeRateCalculations chargeRateCalculations) {
        this.chargeRateCalculations = chargeRateCalculations;  return this;
    }

    public PlaceLocationIdentification getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

    public SegmentGroup7 setPlaceLocationIdentification(PlaceLocationIdentification placeLocationIdentification) {
        this.placeLocationIdentification = placeLocationIdentification;  return this;
    }

    public FreeText getFreeText() {
        return freeText;
    }

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

    public Currencies getCurrencies() {
        return currencies;
    }

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

    public PriceDetails getPriceDetails() {
        return priceDetails;
    }

    public SegmentGroup7 setPriceDetails(PriceDetails priceDetails) {
        this.priceDetails = priceDetails;  return this;
    }

    public NumberOfUnits getNumberOfUnits() {
        return numberOfUnits;
    }

    public SegmentGroup7 setNumberOfUnits(NumberOfUnits numberOfUnits) {
        this.numberOfUnits = numberOfUnits;  return this;
    }

    public PercentageDetails getPercentageDetails() {
        return percentageDetails;
    }

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

    public List getMonetaryAmount() {
        return monetaryAmount;
    }

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

    public List getQuantity() {
        return quantity;
    }

    public SegmentGroup7 setQuantity(List quantity) {
        this.quantity = quantity;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy