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

org.milyn.edi.unedifact.d06b.PRODAT.SegmentGroup12 Maven / Gradle / Ivy

/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d06b.PRODAT;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.RequirementsAndConditions;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.AdditionalProductId;    
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 RequirementsAndConditions requirementsAndConditions;
    private List additionalProductId;

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

        if(requirementsAndConditions != null) {
            nodeWriter.write("RCS");
            nodeWriter.write(delimiters.getField());
            requirementsAndConditions.write(nodeWriter, delimiters);
        }
        if(additionalProductId != null && !additionalProductId.isEmpty()) {
            for(AdditionalProductId additionalProductIdInst : additionalProductId) {
                nodeWriter.write("PIA");
                nodeWriter.write(delimiters.getField());
                additionalProductIdInst.write(nodeWriter, delimiters);
            }
        }
    }

    public RequirementsAndConditions getRequirementsAndConditions() {
        return requirementsAndConditions;
    }

    public SegmentGroup12 setRequirementsAndConditions(RequirementsAndConditions requirementsAndConditions) {
        this.requirementsAndConditions = requirementsAndConditions;  return this;
    }

    public List getAdditionalProductId() {
        return additionalProductId;
    }

    public SegmentGroup12 setAdditionalProductId(List additionalProductId) {
        this.additionalProductId = additionalProductId;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy