org.milyn.edi.unedifact.d07a.common.PCCPremiumCalculationComponentDetails Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d07a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d07a.common.field.C820PremiumCalculationComponent;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
import java.io.StringWriter;
import java.util.List;
import java.util.ArrayList;
import org.milyn.edisax.util.EDIUtils;
import org.milyn.edisax.model.internal.DelimiterType;
public class PCCPremiumCalculationComponentDetails implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private C820PremiumCalculationComponent c820PremiumCalculationComponent;
private String e4522PremiumCalculationComponentValueCategoryIdentifier;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(c820PremiumCalculationComponent != null) {
c820PremiumCalculationComponent.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e4522PremiumCalculationComponentValueCategoryIdentifier != null) {
nodeWriter.write(delimiters.escape(e4522PremiumCalculationComponentValueCategoryIdentifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeTokens.add(nodeWriter.toString());
writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
writer.write(delimiters.getSegmentDelimiter());
writer.flush();
}
public C820PremiumCalculationComponent getC820PremiumCalculationComponent() {
return c820PremiumCalculationComponent;
}
public PCCPremiumCalculationComponentDetails setC820PremiumCalculationComponent(C820PremiumCalculationComponent c820PremiumCalculationComponent) {
this.c820PremiumCalculationComponent = c820PremiumCalculationComponent; return this;
}
public String getE4522PremiumCalculationComponentValueCategoryIdentifier() {
return e4522PremiumCalculationComponentValueCategoryIdentifier;
}
public PCCPremiumCalculationComponentDetails setE4522PremiumCalculationComponentValueCategoryIdentifier(String e4522PremiumCalculationComponentValueCategoryIdentifier) {
this.e4522PremiumCalculationComponentValueCategoryIdentifier = e4522PremiumCalculationComponentValueCategoryIdentifier; return this;
}
}