139 lines
4.7 KiB
Java
139 lines
4.7 KiB
Java
package com.sforce.async;
|
|
|
|
import com.sforce.ws.ConnectionException;
|
|
import com.sforce.ws.bind.TypeInfo;
|
|
import com.sforce.ws.bind.TypeMapper;
|
|
import com.sforce.ws.bind.XMLizable;
|
|
import com.sforce.ws.parser.XmlInputStream;
|
|
import com.sforce.ws.parser.XmlOutputStream;
|
|
import com.sforce.ws.util.Verbose;
|
|
import java.io.IOException;
|
|
import javax.xml.namespace.QName;
|
|
|
|
public class Result implements XMLizable {
|
|
private static final String NAMESPACE = "http://www.force.com/2009/06/asyncapi/dataload";
|
|
|
|
private static final TypeInfo errors__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "errors", "http://www.force.com/2009/06/asyncapi/dataload", "Error", 0, -1, true);
|
|
|
|
private boolean errors__is_set = false;
|
|
|
|
private Error[] errors = new Error[0];
|
|
|
|
public Error[] getErrors() {
|
|
return this.errors;
|
|
}
|
|
|
|
public void setErrors(Error[] errors) {
|
|
this.errors = errors;
|
|
this.errors__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo id__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "id", "http://www.force.com/2009/06/asyncapi/dataload", "ID", 1, 1, true);
|
|
|
|
private boolean id__is_set;
|
|
|
|
private String id;
|
|
|
|
public Result() {
|
|
this.id__is_set = false;
|
|
this.success__is_set = false;
|
|
this.created__is_set = false;
|
|
}
|
|
|
|
public String getId() {
|
|
return this.id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
this.id__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo success__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "success", "http://www.w3.org/2001/XMLSchema", "boolean", 1, 1, true);
|
|
|
|
private boolean success__is_set;
|
|
|
|
private boolean success;
|
|
|
|
public boolean getSuccess() {
|
|
return this.success;
|
|
}
|
|
|
|
public boolean isSuccess() {
|
|
return this.success;
|
|
}
|
|
|
|
public void setSuccess(boolean success) {
|
|
this.success = success;
|
|
this.success__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo created__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "created", "http://www.w3.org/2001/XMLSchema", "boolean", 1, 1, true);
|
|
|
|
private boolean created__is_set;
|
|
|
|
private boolean created;
|
|
|
|
public boolean getCreated() {
|
|
return this.created;
|
|
}
|
|
|
|
public boolean isCreated() {
|
|
return this.created;
|
|
}
|
|
|
|
public void setCreated(boolean created) {
|
|
this.created = created;
|
|
this.created__is_set = true;
|
|
}
|
|
|
|
public void write(QName __element, XmlOutputStream __out, TypeMapper __typeMapper) throws IOException {
|
|
__out.writeStartTag(__element.getNamespaceURI(), __element.getLocalPart());
|
|
writeFields(__out, __typeMapper);
|
|
__out.writeEndTag(__element.getNamespaceURI(), __element.getLocalPart());
|
|
}
|
|
|
|
protected void writeFields(XmlOutputStream __out, TypeMapper __typeMapper) throws IOException {
|
|
__typeMapper.writeObject(__out, errors__typeInfo, this.errors, this.errors__is_set);
|
|
__typeMapper.writeString(__out, id__typeInfo, this.id, this.id__is_set);
|
|
__typeMapper.writeBoolean(__out, success__typeInfo, this.success, this.success__is_set);
|
|
__typeMapper.writeBoolean(__out, created__typeInfo, this.created, this.created__is_set);
|
|
}
|
|
|
|
public void load(XmlInputStream __in, TypeMapper __typeMapper) throws IOException, ConnectionException {
|
|
__typeMapper.consumeStartTag(__in);
|
|
loadFields(__in, __typeMapper);
|
|
__typeMapper.consumeEndTag(__in);
|
|
}
|
|
|
|
protected void loadFields(XmlInputStream __in, TypeMapper __typeMapper) throws IOException, ConnectionException {
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, errors__typeInfo))
|
|
setErrors((Error[])__typeMapper.readObject(__in, errors__typeInfo, Error[].class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, id__typeInfo))
|
|
setId(__typeMapper.readString(__in, id__typeInfo, String.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.verifyElement(__in, success__typeInfo))
|
|
setSuccess(__typeMapper.readBoolean(__in, success__typeInfo, boolean.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, created__typeInfo))
|
|
setCreated(__typeMapper.readBoolean(__in, created__typeInfo, boolean.class));
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("[SaveResult ");
|
|
sb.append(" errors=");
|
|
sb.append("'").append(Verbose.toString(this.errors)).append("'\n");
|
|
sb.append(" id=");
|
|
sb.append("'").append(Verbose.toString(this.id)).append("'\n");
|
|
sb.append(" success=");
|
|
sb.append("'").append(Verbose.toString(Boolean.valueOf(this.success))).append("'\n");
|
|
sb.append(" created=");
|
|
sb.append("'").append(Verbose.toString(Boolean.valueOf(this.created))).append("'\n");
|
|
sb.append("]\n");
|
|
return sb.toString();
|
|
}
|
|
}
|