All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sforce.soap.partner.DescribeGlobalResult Maven / Gradle / Ivy

There is a newer version: 7.4.3.112-ga112
Show newest version
package com.sforce.soap.partner;

/**
 * This is a generated class for the SObject Enterprise API.
 * Do not edit this file, as your changes will be lost.
 */
public class DescribeGlobalResult implements com.sforce.ws.bind.XMLizable , IDescribeGlobalResult{

    /**
     * Constructor
     */
    public DescribeGlobalResult() {}

    /**
     * element : encoding of type {http://www.w3.org/2001/XMLSchema}string
     * java type: java.lang.String
     */
    private static final com.sforce.ws.bind.TypeInfo encoding__typeInfo =
      new com.sforce.ws.bind.TypeInfo("urn:partner.soap.sforce.com","encoding","http://www.w3.org/2001/XMLSchema","string",1,1,true);

    private boolean encoding__is_set = false;

    private java.lang.String encoding;

    @Override
    public java.lang.String getEncoding() {
      return encoding;
    }

    @Override
    public void setEncoding(java.lang.String encoding) {
      this.encoding = encoding;
      encoding__is_set = true;
    }

    protected void setEncoding(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.verifyElement(__in, encoding__typeInfo)) {
        setEncoding(__typeMapper.readString(__in, encoding__typeInfo, java.lang.String.class));
      }
    }

    /**
     * element : maxBatchSize of type {http://www.w3.org/2001/XMLSchema}int
     * java type: int
     */
    private static final com.sforce.ws.bind.TypeInfo maxBatchSize__typeInfo =
      new com.sforce.ws.bind.TypeInfo("urn:partner.soap.sforce.com","maxBatchSize","http://www.w3.org/2001/XMLSchema","int",1,1,true);

    private boolean maxBatchSize__is_set = false;

    private int maxBatchSize;

    @Override
    public int getMaxBatchSize() {
      return maxBatchSize;
    }

    @Override
    public void setMaxBatchSize(int maxBatchSize) {
      this.maxBatchSize = maxBatchSize;
      maxBatchSize__is_set = true;
    }

    protected void setMaxBatchSize(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.verifyElement(__in, maxBatchSize__typeInfo)) {
        setMaxBatchSize((int)__typeMapper.readInt(__in, maxBatchSize__typeInfo, int.class));
      }
    }

    /**
     * element : sobjects of type {urn:partner.soap.sforce.com}DescribeGlobalSObjectResult
     * java type: com.sforce.soap.partner.DescribeGlobalSObjectResult[]
     */
    private static final com.sforce.ws.bind.TypeInfo sobjects__typeInfo =
      new com.sforce.ws.bind.TypeInfo("urn:partner.soap.sforce.com","sobjects","urn:partner.soap.sforce.com","DescribeGlobalSObjectResult",0,-1,true);

    private boolean sobjects__is_set = false;

    private com.sforce.soap.partner.DescribeGlobalSObjectResult[] sobjects = new com.sforce.soap.partner.DescribeGlobalSObjectResult[0];

    @Override
    public com.sforce.soap.partner.DescribeGlobalSObjectResult[] getSobjects() {
      return sobjects;
    }

    @Override
    public void setSobjects(com.sforce.soap.partner.IDescribeGlobalSObjectResult[] sobjects) {
      this.sobjects = castArray(com.sforce.soap.partner.DescribeGlobalSObjectResult.class, sobjects);
      sobjects__is_set = true;
    }

    protected void setSobjects(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __in.peekTag();
      if (__typeMapper.isElement(__in, sobjects__typeInfo)) {
        setSobjects((com.sforce.soap.partner.DescribeGlobalSObjectResult[])__typeMapper.readObject(__in, sobjects__typeInfo, com.sforce.soap.partner.DescribeGlobalSObjectResult[].class));
      }
    }

    /**
     */
    @Override
    public void write(javax.xml.namespace.QName __element,
        com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
        throws java.io.IOException {
      __out.writeStartTag(__element.getNamespaceURI(), __element.getLocalPart());
      writeFields(__out, __typeMapper);
      __out.writeEndTag(__element.getNamespaceURI(), __element.getLocalPart());
    }

    protected void writeFields(com.sforce.ws.parser.XmlOutputStream __out,
         com.sforce.ws.bind.TypeMapper __typeMapper)
         throws java.io.IOException {
       __typeMapper.writeString(__out, encoding__typeInfo, encoding, encoding__is_set);
       __typeMapper.writeInt(__out, maxBatchSize__typeInfo, maxBatchSize, maxBatchSize__is_set);
       __typeMapper.writeObject(__out, sobjects__typeInfo, sobjects, sobjects__is_set);
    }

    @Override
    public void load(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
      __typeMapper.consumeStartTag(__in);
      loadFields(__in, __typeMapper);
      __typeMapper.consumeEndTag(__in);
    }

    protected void loadFields(com.sforce.ws.parser.XmlInputStream __in,
        com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
        setEncoding(__in, __typeMapper);
        setMaxBatchSize(__in, __typeMapper);
        setSobjects(__in, __typeMapper);
    }

    @Override
    public String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder();
      sb.append("[DescribeGlobalResult ");
      toString1(sb);

      sb.append("]\n");
      return sb.toString();
    }

    private void toString1(StringBuilder sb) {
      toStringHelper(sb, "encoding", encoding);
      toStringHelper(sb, "maxBatchSize", maxBatchSize);
      toStringHelper(sb, "sobjects", sobjects);

    }


    private void toStringHelper(StringBuilder sb, String name, Object value) {
      sb.append(' ').append(name).append("='").append(com.sforce.ws.util.Verbose.toString(value)).append("'\n");
    }

    @SuppressWarnings("unchecked")
    private  T[] castArray(Class clazz, U[] array) {
        if (array == null) {
            return null;
        }
        T[] retVal = (T[]) java.lang.reflect.Array.newInstance(clazz, array.length);
        for (int i=0; i < array.length; i++) {
            retVal[i] = (T)array[i];
        }

        return retVal;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy