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

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d99b.common.Reference;    
import org.milyn.edi.unedifact.d99b.common.Quantity;    
import org.milyn.edi.unedifact.d99b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d99b.common.ItemDescription;    
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 Reference reference;
    private Quantity quantity;
    private DateTimePeriod dateTimePeriod;
    private ItemDescription itemDescription;

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

        if(reference != null) {
            nodeWriter.write("RFF");
            nodeWriter.write(delimiters.getField());
            reference.write(nodeWriter, delimiters);
        }
        if(quantity != null) {
            nodeWriter.write("QTY");
            nodeWriter.write(delimiters.getField());
            quantity.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(itemDescription != null) {
            nodeWriter.write("IMD");
            nodeWriter.write(delimiters.getField());
            itemDescription.write(nodeWriter, delimiters);
        }
    }

    public Reference getReference() {
        return reference;
    }

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

    public Quantity getQuantity() {
        return quantity;
    }

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

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public ItemDescription getItemDescription() {
        return itemDescription;
    }

    public SegmentGroup7 setItemDescription(ItemDescription itemDescription) {
        this.itemDescription = itemDescription;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy