org.milyn.edi.unedifact.d02b.common.ADRAddress Maven / Gradle / Ivy
The newest version!
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02b.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02b.common.field.C817AddressUsage;
import org.milyn.edi.unedifact.d02b.common.field.C090AddressDetails;
import org.milyn.edi.unedifact.d02b.common.field.C819CountrySubEntityDetails;
import org.milyn.edi.unedifact.d02b.common.field.C517LocationIdentification;
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 ADRAddress implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private C817AddressUsage c817AddressUsage;
private C090AddressDetails c090AddressDetails;
private String e3164CityName;
private String e3251PostalIdentificationCode;
private String e3207CountryNameCode;
private C819CountrySubEntityDetails c819CountrySubEntityDetails;
private C517LocationIdentification c517LocationIdentification;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(c817AddressUsage != null) {
c817AddressUsage.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c090AddressDetails != null) {
c090AddressDetails.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e3164CityName != null) {
nodeWriter.write(delimiters.escape(e3164CityName.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e3251PostalIdentificationCode != null) {
nodeWriter.write(delimiters.escape(e3251PostalIdentificationCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e3207CountryNameCode != null) {
nodeWriter.write(delimiters.escape(e3207CountryNameCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c819CountrySubEntityDetails != null) {
c819CountrySubEntityDetails.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c517LocationIdentification != null) {
c517LocationIdentification.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 C817AddressUsage getC817AddressUsage() {
return c817AddressUsage;
}
public ADRAddress setC817AddressUsage(C817AddressUsage c817AddressUsage) {
this.c817AddressUsage = c817AddressUsage; return this;
}
public C090AddressDetails getC090AddressDetails() {
return c090AddressDetails;
}
public ADRAddress setC090AddressDetails(C090AddressDetails c090AddressDetails) {
this.c090AddressDetails = c090AddressDetails; return this;
}
public String getE3164CityName() {
return e3164CityName;
}
public ADRAddress setE3164CityName(String e3164CityName) {
this.e3164CityName = e3164CityName; return this;
}
public String getE3251PostalIdentificationCode() {
return e3251PostalIdentificationCode;
}
public ADRAddress setE3251PostalIdentificationCode(String e3251PostalIdentificationCode) {
this.e3251PostalIdentificationCode = e3251PostalIdentificationCode; return this;
}
public String getE3207CountryNameCode() {
return e3207CountryNameCode;
}
public ADRAddress setE3207CountryNameCode(String e3207CountryNameCode) {
this.e3207CountryNameCode = e3207CountryNameCode; return this;
}
public C819CountrySubEntityDetails getC819CountrySubEntityDetails() {
return c819CountrySubEntityDetails;
}
public ADRAddress setC819CountrySubEntityDetails(C819CountrySubEntityDetails c819CountrySubEntityDetails) {
this.c819CountrySubEntityDetails = c819CountrySubEntityDetails; return this;
}
public C517LocationIdentification getC517LocationIdentification() {
return c517LocationIdentification;
}
public ADRAddress setC517LocationIdentification(C517LocationIdentification c517LocationIdentification) {
this.c517LocationIdentification = c517LocationIdentification; return this;
}
}