org.milyn.edi.unedifact.d99a.common.DAMDamage Maven / Gradle / Ivy
The newest version!
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d99a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d99a.common.field.C821TypeOfDamage;
import org.milyn.edi.unedifact.d99a.common.field.C822DamageArea;
import org.milyn.edi.unedifact.d99a.common.field.C825DamageSeverity;
import org.milyn.edi.unedifact.d99a.common.field.C826Action;
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 DAMDamage implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e7493DamageDetailsQualifier;
private C821TypeOfDamage c821TypeOfDamage;
private C822DamageArea c822DamageArea;
private C825DamageSeverity c825DamageSeverity;
private C826Action c826Action;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e7493DamageDetailsQualifier != null) {
nodeWriter.write(delimiters.escape(e7493DamageDetailsQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c821TypeOfDamage != null) {
c821TypeOfDamage.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c822DamageArea != null) {
c822DamageArea.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c825DamageSeverity != null) {
c825DamageSeverity.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c826Action != null) {
c826Action.write(nodeWriter, delimiters);
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 String getE7493DamageDetailsQualifier() {
return e7493DamageDetailsQualifier;
}
public DAMDamage setE7493DamageDetailsQualifier(String e7493DamageDetailsQualifier) {
this.e7493DamageDetailsQualifier = e7493DamageDetailsQualifier; return this;
}
public C821TypeOfDamage getC821TypeOfDamage() {
return c821TypeOfDamage;
}
public DAMDamage setC821TypeOfDamage(C821TypeOfDamage c821TypeOfDamage) {
this.c821TypeOfDamage = c821TypeOfDamage; return this;
}
public C822DamageArea getC822DamageArea() {
return c822DamageArea;
}
public DAMDamage setC822DamageArea(C822DamageArea c822DamageArea) {
this.c822DamageArea = c822DamageArea; return this;
}
public C825DamageSeverity getC825DamageSeverity() {
return c825DamageSeverity;
}
public DAMDamage setC825DamageSeverity(C825DamageSeverity c825DamageSeverity) {
this.c825DamageSeverity = c825DamageSeverity; return this;
}
public C826Action getC826Action() {
return c826Action;
}
public DAMDamage setC826Action(C826Action c826Action) {
this.c826Action = c826Action; return this;
}
}