280 lines
11 KiB
Java
280 lines
11 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 java.util.Calendar;
|
|
import javax.xml.namespace.QName;
|
|
|
|
public class BatchInfo implements XMLizable {
|
|
private static final TypeInfo id__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "id", "http://www.w3.org/2001/XMLSchema", "string", 1, 1, true);
|
|
|
|
private boolean id__is_set = false;
|
|
|
|
private String id;
|
|
|
|
public String getId() {
|
|
return this.id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
this.id__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo jobId__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "jobId", "http://www.w3.org/2001/XMLSchema", "string", 1, 1, true);
|
|
|
|
private boolean jobId__is_set = false;
|
|
|
|
private String jobId;
|
|
|
|
public String getJobId() {
|
|
return this.jobId;
|
|
}
|
|
|
|
public void setJobId(String jobId) {
|
|
this.jobId = jobId;
|
|
this.jobId__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo state__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "state", "http://www.force.com/2009/06/asyncapi/dataload", "BatchStateEnum", 1, 1, true);
|
|
|
|
private boolean state__is_set = false;
|
|
|
|
private BatchStateEnum state;
|
|
|
|
public BatchStateEnum getState() {
|
|
return this.state;
|
|
}
|
|
|
|
public void setState(BatchStateEnum state) {
|
|
this.state = state;
|
|
this.state__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo stateMessage__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "stateMessage", "http://www.w3.org/2001/XMLSchema", "string", 0, 1, true);
|
|
|
|
private boolean stateMessage__is_set = false;
|
|
|
|
private String stateMessage;
|
|
|
|
public String getStateMessage() {
|
|
return this.stateMessage;
|
|
}
|
|
|
|
public void setStateMessage(String stateMessage) {
|
|
this.stateMessage = stateMessage;
|
|
this.stateMessage__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo createdDate__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "createdDate", "http://www.w3.org/2001/XMLSchema", "dateTime", 1, 1, true);
|
|
|
|
private boolean createdDate__is_set = false;
|
|
|
|
private Calendar createdDate;
|
|
|
|
public Calendar getCreatedDate() {
|
|
return this.createdDate;
|
|
}
|
|
|
|
public void setCreatedDate(Calendar createdDate) {
|
|
this.createdDate = createdDate;
|
|
this.createdDate__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo systemModstamp__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "systemModstamp", "http://www.w3.org/2001/XMLSchema", "dateTime", 0, 1, true);
|
|
|
|
private boolean systemModstamp__is_set = false;
|
|
|
|
private Calendar systemModstamp;
|
|
|
|
public Calendar getSystemModstamp() {
|
|
return this.systemModstamp;
|
|
}
|
|
|
|
public void setSystemModstamp(Calendar systemModstamp) {
|
|
this.systemModstamp = systemModstamp;
|
|
this.systemModstamp__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo numberRecordsProcessed__typeInfo = new TypeInfo("http://www.force.com/2009/06/asyncapi/dataload", "numberRecordsProcessed", "http://www.w3.org/2001/XMLSchema", "int", 1, 1, true);
|
|
|
|
private boolean numberRecordsProcessed__is_set = false;
|
|
|
|
private int numberRecordsProcessed;
|
|
|
|
public int getNumberRecordsProcessed() {
|
|
return this.numberRecordsProcessed;
|
|
}
|
|
|
|
public void setNumberRecordsProcessed(int numberRecordsProcessed) {
|
|
this.numberRecordsProcessed = numberRecordsProcessed;
|
|
this.numberRecordsProcessed__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo numberRecordsFailed__typeInfo = new TypeInfo(
|
|
"http://www.force.com/2009/06/asyncapi/dataload", "numberRecordsFailed",
|
|
"http://www.w3.org/2001/XMLSchema", "int", 0, 1, true);
|
|
|
|
private boolean numberRecordsFailed__is_set = false;
|
|
|
|
private int numberRecordsFailed;
|
|
|
|
public int getNumberRecordsFailed() {
|
|
return this.numberRecordsFailed;
|
|
}
|
|
|
|
public void setNumberRecordsFailed(int numberRecordsFailed) {
|
|
this.numberRecordsFailed = numberRecordsFailed;
|
|
this.numberRecordsFailed__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo totalProcessingTime__typeInfo = new TypeInfo(
|
|
"http://www.force.com/2009/06/asyncapi/dataload", "totalProcessingTime",
|
|
"http://www.w3.org/2001/XMLSchema", "long", 0, 1, true);
|
|
|
|
private boolean totalProcessingTime__is_set = false;
|
|
|
|
private long totalProcessingTime;
|
|
|
|
public long getTotalProcessingTime() {
|
|
return this.totalProcessingTime;
|
|
}
|
|
|
|
public void setTotalProcessingTime(long totalProcessingTime) {
|
|
this.totalProcessingTime = totalProcessingTime;
|
|
this.totalProcessingTime__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo apiActiveProcessingTime__typeInfo = new TypeInfo(
|
|
"http://www.force.com/2009/06/asyncapi/dataload", "apiActiveProcessingTime",
|
|
"http://www.w3.org/2001/XMLSchema",
|
|
"long", 0, 1, true);
|
|
|
|
private boolean apiActiveProcessingTime__is_set = false;
|
|
|
|
private long apiActiveProcessingTime;
|
|
|
|
public long getApiActiveProcessingTime() {
|
|
return this.apiActiveProcessingTime;
|
|
}
|
|
|
|
public void setApiActiveProcessingTime(long apiActiveProcessingTime) {
|
|
this.apiActiveProcessingTime = apiActiveProcessingTime;
|
|
this.apiActiveProcessingTime__is_set = true;
|
|
}
|
|
|
|
private static final TypeInfo apexProcessingTime__typeInfo = new TypeInfo(
|
|
"http://www.force.com/2009/06/asyncapi/dataload", "apexProcessingTime", "http://www.w3.org/2001/XMLSchema",
|
|
"long", 0, 1, true);
|
|
|
|
private boolean apexProcessingTime__is_set = false;
|
|
|
|
private long apexProcessingTime;
|
|
|
|
public long getApexProcessingTime() {
|
|
return this.apexProcessingTime;
|
|
}
|
|
|
|
public void setApexProcessingTime(long apexProcessingTime) {
|
|
this.apexProcessingTime = apexProcessingTime;
|
|
this.apexProcessingTime__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.writeString(__out, id__typeInfo, this.id, this.id__is_set);
|
|
__typeMapper.writeString(__out, jobId__typeInfo, this.jobId, this.jobId__is_set);
|
|
__typeMapper.writeObject(__out, state__typeInfo, this.state, this.state__is_set);
|
|
__typeMapper.writeString(__out, stateMessage__typeInfo, this.stateMessage, this.stateMessage__is_set);
|
|
__typeMapper.writeObject(__out, createdDate__typeInfo, this.createdDate, this.createdDate__is_set);
|
|
__typeMapper.writeObject(__out, systemModstamp__typeInfo, this.systemModstamp, this.systemModstamp__is_set);
|
|
__typeMapper.writeInt(__out, numberRecordsProcessed__typeInfo, this.numberRecordsProcessed, this.numberRecordsProcessed__is_set);
|
|
__typeMapper.writeInt(__out, numberRecordsFailed__typeInfo, this.numberRecordsFailed, this.numberRecordsFailed__is_set);
|
|
__typeMapper.writeLong(__out, totalProcessingTime__typeInfo, this.totalProcessingTime, this.totalProcessingTime__is_set);
|
|
__typeMapper.writeLong(__out, apiActiveProcessingTime__typeInfo, this.apiActiveProcessingTime, this.apiActiveProcessingTime__is_set);
|
|
__typeMapper.writeLong(__out, apexProcessingTime__typeInfo, this.apexProcessingTime, this.apexProcessingTime__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, id__typeInfo))
|
|
setId(__typeMapper.readString(__in, id__typeInfo, String.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, jobId__typeInfo))
|
|
setJobId(__typeMapper.readString(__in, jobId__typeInfo, String.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, state__typeInfo))
|
|
setState((BatchStateEnum)__typeMapper.readObject(__in, state__typeInfo, BatchStateEnum.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, stateMessage__typeInfo))
|
|
setStateMessage(__typeMapper.readString(__in, stateMessage__typeInfo, String.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, createdDate__typeInfo))
|
|
setCreatedDate((Calendar)__typeMapper.readObject(__in, createdDate__typeInfo, Calendar.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, systemModstamp__typeInfo))
|
|
setSystemModstamp((Calendar)__typeMapper.readObject(__in, systemModstamp__typeInfo, Calendar.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, numberRecordsProcessed__typeInfo))
|
|
setNumberRecordsProcessed(__typeMapper.readInt(__in, numberRecordsProcessed__typeInfo, int.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, numberRecordsFailed__typeInfo))
|
|
setNumberRecordsFailed(__typeMapper.readInt(__in, numberRecordsFailed__typeInfo, int.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, totalProcessingTime__typeInfo))
|
|
setTotalProcessingTime(__typeMapper.readLong(__in, totalProcessingTime__typeInfo, long.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, apiActiveProcessingTime__typeInfo))
|
|
setApiActiveProcessingTime(__typeMapper.readLong(__in, apiActiveProcessingTime__typeInfo, long.class));
|
|
__in.peekTag();
|
|
if (__typeMapper.isElement(__in, apexProcessingTime__typeInfo))
|
|
setApexProcessingTime(__typeMapper.readLong(__in, apexProcessingTime__typeInfo, long.class));
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("[BatchInfo ");
|
|
sb.append(" id=");
|
|
sb.append("'").append(Verbose.toString(this.id)).append("'\n");
|
|
sb.append(" jobId=");
|
|
sb.append("'").append(Verbose.toString(this.jobId)).append("'\n");
|
|
sb.append(" state=");
|
|
sb.append("'").append(Verbose.toString(this.state)).append("'\n");
|
|
sb.append(" stateMessage=");
|
|
sb.append("'").append(Verbose.toString(this.stateMessage)).append("'\n");
|
|
sb.append(" createdDate=");
|
|
sb.append("'").append(Verbose.toString(this.createdDate)).append("'\n");
|
|
sb.append(" systemModstamp=");
|
|
sb.append("'").append(Verbose.toString(this.systemModstamp)).append("'\n");
|
|
sb.append(" numberRecordsProcessed=");
|
|
sb.append("'").append(Verbose.toString(Integer.valueOf(this.numberRecordsProcessed))).append("'\n");
|
|
sb.append(" numberRecordsFailed=");
|
|
sb.append("'").append(Verbose.toString(Integer.valueOf(this.numberRecordsFailed))).append("'\n");
|
|
sb.append(" totalProcessingTime=");
|
|
sb.append("'").append(Verbose.toString(Long.valueOf(this.totalProcessingTime))).append("'\n");
|
|
sb.append(" apiActiveProcessingTime=");
|
|
sb.append("'").append(Verbose.toString(Long.valueOf(this.apiActiveProcessingTime))).append("'\n");
|
|
sb.append(" apexProcessingTime=");
|
|
sb.append("'").append(Verbose.toString(Long.valueOf(this.apexProcessingTime))).append("'\n");
|
|
sb.append("]\n");
|
|
return sb.toString();
|
|
}
|
|
}
|