Example #1
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeString(__out, Description__typeInfo, Description, Description__is_set);
   __typeMapper.writeString(__out, DeveloperName__typeInfo, DeveloperName, DeveloperName__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeObject(__out, LastRunDate__typeInfo, LastRunDate, LastRunDate__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeString(
       __out, NamespacePrefix__typeInfo, NamespacePrefix, NamespacePrefix__is_set);
   __typeMapper.writeString(__out, OwnerId__typeInfo, OwnerId, OwnerId__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeObject(__out, Tags__typeInfo, Tags, Tags__is_set);
 }
Example #2
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, Campaign__typeInfo, Campaign, Campaign__is_set);
   __typeMapper.writeString(__out, CampaignId__typeInfo, CampaignId, CampaignId__is_set);
   __typeMapper.writeObject(__out, Contact__typeInfo, Contact, Contact__is_set);
   __typeMapper.writeString(__out, ContactId__typeInfo, ContactId, ContactId__is_set);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(
       __out, FirstRespondedDate__typeInfo, FirstRespondedDate, FirstRespondedDate__is_set);
   __typeMapper.writeObject(__out, HasResponded__typeInfo, HasResponded, HasResponded__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeObject(__out, Lead__typeInfo, Lead, Lead__is_set);
   __typeMapper.writeString(__out, LeadId__typeInfo, LeadId, LeadId__is_set);
   __typeMapper.writeString(__out, Status__typeInfo, Status, Status__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
 }
Example #3
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeString(
       __out, BusinessProcessId__typeInfo, BusinessProcessId, BusinessProcessId__is_set);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeString(__out, Description__typeInfo, Description, Description__is_set);
   __typeMapper.writeString(__out, DeveloperName__typeInfo, DeveloperName, DeveloperName__is_set);
   __typeMapper.writeObject(__out, IsActive__typeInfo, IsActive, IsActive__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeString(
       __out, NamespacePrefix__typeInfo, NamespacePrefix, NamespacePrefix__is_set);
   __typeMapper.writeString(__out, SobjectType__typeInfo, SobjectType, SobjectType__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
 }
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(__typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedBy__typeInfo)) {
     setLastModifiedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, LastModifiedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedById__typeInfo)) {
     setLastModifiedById(
         __typeMapper.readString(__in, LastModifiedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, MemberId__typeInfo)) {
     setMemberId(__typeMapper.readString(__in, MemberId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, TeamRoleId__typeInfo)) {
     setTeamRoleId(__typeMapper.readString(__in, TeamRoleId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, TeamTemplateId__typeInfo)) {
     setTeamTemplateId(
         __typeMapper.readString(__in, TeamTemplateId__typeInfo, java.lang.String.class));
   }
 }
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.Name)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.Name.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(__typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Field__typeInfo)) {
     setField(__typeMapper.readString(__in, Field__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, NewValue__typeInfo)) {
     setNewValue(
         (java.lang.Object)
             __typeMapper.readObject(__in, NewValue__typeInfo, java.lang.Object.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, OldValue__typeInfo)) {
     setOldValue(
         (java.lang.Object)
             __typeMapper.readObject(__in, OldValue__typeInfo, java.lang.Object.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Parent__typeInfo)) {
     setParent(
         (com.sforce.soap.enterprise.sobject.Servicio__c)
             __typeMapper.readObject(
                 __in, Parent__typeInfo, com.sforce.soap.enterprise.sobject.Servicio__c.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ParentId__typeInfo)) {
     setParentId(__typeMapper.readString(__in, ParentId__typeInfo, java.lang.String.class));
   }
 }
Example #6
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, Queue__typeInfo, Queue, Queue__is_set);
   __typeMapper.writeString(__out, QueueId__typeInfo, QueueId, QueueId__is_set);
   __typeMapper.writeString(__out, SobjectType__typeInfo, SobjectType, SobjectType__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
 }
  public void querySample() {
    try {
      // Set query batch size
      partnerConnection.setQueryOptions(250);

      // SOQL query to use
      String soqlQuery = "SELECT FirstName, LastName FROM Contact";
      // Make the query call and get the query results
      QueryResult qr = partnerConnection.query(soqlQuery);

      boolean done = false;
      int loopCount = 0;
      // Loop through the batches of returned results
      while (!done) {
        System.out.println("Records in results set " + loopCount++ + " - ");
        SObject[] records = qr.getRecords();
        // Process the query results
        for (int i = 0; i < records.length; i++) {
          SObject contact = records[i];
          Object firstName = contact.getField("FirstName");
          Object lastName = contact.getField("LastName");
          if (firstName == null) {
            System.out.println("Contact " + (i + 1) + ": " + lastName);
          } else {
            System.out.println("Contact " + (i + 1) + ": " + firstName + " " + lastName);
          }
        }
        if (qr.isDone()) {
          done = true;
        } else {
          qr = partnerConnection.queryMore(qr.getQueryLocator());
        }
      }
    } catch (ConnectionException ce) {
      ce.printStackTrace();
    }
    System.out.println("\nQuery execution completed.");
  }
  public void updateSample(String id) {
    try {
      // Create an sObject of type contact
      SObject updateContact = new SObject();
      updateContact.setType("Contact");

      // Set the ID of the contact to update
      updateContact.setId(id);
      // Set the Phone field with a new value
      updateContact.setField("Phone", "(415) 555-1212");

      // Create another contact that will cause an error
      // because it has an invalid ID.
      SObject errorContact = new SObject();
      errorContact.setType("Contact");
      // Set an invalid ID on purpose
      errorContact.setId("SLFKJLFKJ");
      // Set the value of LastName to null
      errorContact.setFieldsToNull(new String[] {"LastName"});

      // Make the update call by passing an array containing
      // the two objects.
      SaveResult[] saveResults =
          partnerConnection.update(new SObject[] {updateContact, errorContact});
      // Iterate through the results and write the ID of
      // the updated contacts to the console, in this case one contact.
      // If the result is not successful, write the errors
      // to the console. In this case, one item failed to update.
      for (int j = 0; j < saveResults.length; j++) {
        System.out.println("\nItem: " + j);
        if (saveResults[j].isSuccess()) {
          System.out.println("Contact with an ID of " + saveResults[j].getId() + " was updated.");
        } else {
          // There were errors during the update call,
          // go through the errors array and write
          // them to the console.
          for (int i = 0; i < saveResults[j].getErrors().length; i++) {
            Error err = saveResults[j].getErrors()[i];
            System.out.println("Errors were found on item " + j);
            System.out.println("Error code: " + err.getStatusCode().toString());
            System.out.println("Error message: " + err.getMessage());
          }
        }
      }
    } catch (ConnectionException ce) {
      ce.printStackTrace();
    }
  }
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeString(__out, Field__typeInfo, Field, Field__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(__out, NewValue__typeInfo, NewValue, NewValue__is_set);
   __typeMapper.writeObject(__out, OldValue__typeInfo, OldValue, OldValue__is_set);
   __typeMapper.writeObject(__out, Parent__typeInfo, Parent, Parent__is_set);
   __typeMapper.writeString(__out, ParentId__typeInfo, ParentId, ParentId__is_set);
 }
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(__out, Item__typeInfo, Item, Item__is_set);
   __typeMapper.writeString(__out, ItemId__typeInfo, ItemId, ItemId__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeObject(__out, TagDefinition__typeInfo, TagDefinition, TagDefinition__is_set);
   __typeMapper.writeString(
       __out, TagDefinitionId__typeInfo, TagDefinitionId, TagDefinitionId__is_set);
   __typeMapper.writeString(__out, Type__typeInfo, Type, Type__is_set);
 }
Example #11
0
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(
         (java.lang.String)
             __typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Queue__typeInfo)) {
     setQueue(
         (com.sforce.soap.enterprise.sobject.Group)
             __typeMapper.readObject(
                 __in, Queue__typeInfo, com.sforce.soap.enterprise.sobject.Group.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, QueueId__typeInfo)) {
     setQueueId(
         (java.lang.String)
             __typeMapper.readString(__in, QueueId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SobjectType__typeInfo)) {
     setSobjectType(
         (java.lang.String)
             __typeMapper.readString(__in, SobjectType__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
 }
Example #12
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, Attachments__typeInfo, Attachments, Attachments__is_set);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeObject(__out, Notes__typeInfo, Notes, Notes__is_set);
   __typeMapper.writeObject(
       __out, NotesAndAttachments__typeInfo, NotesAndAttachments, NotesAndAttachments__is_set);
   __typeMapper.writeObject(__out, Owner__typeInfo, Owner, Owner__is_set);
   __typeMapper.writeString(__out, OwnerId__typeInfo, OwnerId, OwnerId__is_set);
   __typeMapper.writeObject(
       __out, ProcessInstances__typeInfo, ProcessInstances, ProcessInstances__is_set);
   __typeMapper.writeObject(__out, ProcessSteps__typeInfo, ProcessSteps, ProcessSteps__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeObject(__out, Tags__typeInfo, Tags, Tags__is_set);
   __typeMapper.writeString(__out, ts2__Name__c__typeInfo, ts2__Name__c, ts2__Name__c__is_set);
   __typeMapper.writeString(
       __out, ts2__ParentId__c__typeInfo, ts2__ParentId__c, ts2__ParentId__c__is_set);
   __typeMapper.writeObject(
       __out, ts2__ParentId__r__typeInfo, ts2__ParentId__r, ts2__ParentId__r__is_set);
   __typeMapper.writeString(
       __out, ts2__ParentId_txt__c__typeInfo, ts2__ParentId_txt__c, ts2__ParentId_txt__c__is_set);
   __typeMapper.writeObject(
       __out, ts2__TaxonomyId__r__typeInfo, ts2__TaxonomyId__r, ts2__TaxonomyId__r__is_set);
   __typeMapper.writeString(
       __out,
       ts2__Taxonomy_ExternalID__c__typeInfo,
       ts2__Taxonomy_ExternalID__c,
       ts2__Taxonomy_ExternalID__c__is_set);
 }
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeString(__out, MemberId__typeInfo, MemberId, MemberId__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeString(__out, TeamRoleId__typeInfo, TeamRoleId, TeamRoleId__is_set);
   __typeMapper.writeString(
       __out, TeamTemplateId__typeInfo, TeamTemplateId, TeamTemplateId__is_set);
 }
Example #14
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeString(__out, Description__typeInfo, Description, Description__is_set);
   __typeMapper.writeObject(
       __out,
       FeedSubscriptionsForEntity__typeInfo,
       FeedSubscriptionsForEntity,
       FeedSubscriptionsForEntity__is_set);
   __typeMapper.writeObject(__out, Feeds__typeInfo, Feeds, Feeds__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeString(__out, NetworkId__typeInfo, NetworkId, NetworkId__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeObject(__out, TalkingAbout__typeInfo, TalkingAbout, TalkingAbout__is_set);
 }
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeString(__out, Reason__typeInfo, Reason, Reason__is_set);
   __typeMapper.writeObject(__out, Reply__typeInfo, Reply, Reply__is_set);
   __typeMapper.writeString(__out, ReplyId__typeInfo, ReplyId, ReplyId__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
 }
Example #16
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeString(__out, Body__typeInfo, Body, Body__is_set);
   __typeMapper.writeObject(__out, CommentCount__typeInfo, CommentCount, CommentCount__is_set);
   __typeMapper.writeObject(__out, ContentData__typeInfo, ContentData, ContentData__is_set);
   __typeMapper.writeString(
       __out, ContentDescription__typeInfo, ContentDescription, ContentDescription__is_set);
   __typeMapper.writeString(
       __out, ContentFileName__typeInfo, ContentFileName, ContentFileName__is_set);
   __typeMapper.writeObject(__out, ContentSize__typeInfo, ContentSize, ContentSize__is_set);
   __typeMapper.writeString(__out, ContentType__typeInfo, ContentType, ContentType__is_set);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(__out, FeedComments__typeInfo, FeedComments, FeedComments__is_set);
   __typeMapper.writeObject(__out, FeedLikes__typeInfo, FeedLikes, FeedLikes__is_set);
   __typeMapper.writeObject(
       __out, FeedTrackedChanges__typeInfo, FeedTrackedChanges, FeedTrackedChanges__is_set);
   __typeMapper.writeObject(__out, InsertedBy__typeInfo, InsertedBy, InsertedBy__is_set);
   __typeMapper.writeString(__out, InsertedById__typeInfo, InsertedById, InsertedById__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeObject(__out, LikeCount__typeInfo, LikeCount, LikeCount__is_set);
   __typeMapper.writeString(__out, LinkUrl__typeInfo, LinkUrl, LinkUrl__is_set);
   __typeMapper.writeString(__out, NetworkScope__typeInfo, NetworkScope, NetworkScope__is_set);
   __typeMapper.writeObject(__out, Parent__typeInfo, Parent, Parent__is_set);
   __typeMapper.writeString(__out, ParentId__typeInfo, ParentId, ParentId__is_set);
   __typeMapper.writeString(
       __out, RelatedRecordId__typeInfo, RelatedRecordId, RelatedRecordId__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeString(__out, Title__typeInfo, Title, Title__is_set);
   __typeMapper.writeString(__out, Type__typeInfo, Type, Type__is_set);
   __typeMapper.writeString(__out, Visibility__typeInfo, Visibility, Visibility__is_set);
 }
  public String createSample() {
    String result = null;
    try {
      // Create a new sObject of type Contact
      // and fill out its fields.
      SObject contact = new SObject();
      contact.setType("Contact");
      contact.setField("FirstName", "Otto");
      contact.setField("LastName", "Jespersen");
      contact.setField("Salutation", "Professor");
      contact.setField("Phone", "(999) 555-1234");
      contact.setField("Title", "Philologist");

      // Add this sObject to an array
      SObject[] contacts = new SObject[1];
      contacts[0] = contact;
      // Make a create call and pass it the array of sObjects
      SaveResult[] results = partnerConnection.create(contacts);

      // Iterate through the results list
      // and write the ID of the new sObject
      // or the errors if the object creation failed.
      // In this case, we only have one result
      // since we created one contact.
      for (int j = 0; j < results.length; j++) {
        if (results[j].isSuccess()) {
          result = results[j].getId();
          System.out.println("\nA contact was created with an ID of: " + result);
        } else {
          // There were errors during the create call,
          // go through the errors array and write
          // them to the console
          for (int i = 0; i < results[j].getErrors().length; i++) {
            Error err = results[j].getErrors()[i];
            System.out.println("Errors were found on item " + j);
            System.out.println("Error code: " + err.getStatusCode().toString());
            System.out.println("Error message: " + err.getMessage());
          }
        }
      }
    } catch (ConnectionException ce) {
      ce.printStackTrace();
    }
    return result;
  }
Example #18
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeString(__out, Description__typeInfo, Description, Description__is_set);
   __typeMapper.writeObject(__out, IsActive__typeInfo, IsActive, IsActive__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(__out, IsStandard__typeInfo, IsStandard, IsStandard__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeObject(__out, Opportunities__typeInfo, Opportunities, Opportunities__is_set);
   __typeMapper.writeObject(
       __out, PricebookEntries__typeInfo, PricebookEntries, PricebookEntries__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
 }
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Item__typeInfo)) {
     setItem(
         (com.sforce.soap.enterprise.sobject.JBS_StandardQuestions__c)
             __typeMapper.readObject(
                 __in,
                 Item__typeInfo,
                 com.sforce.soap.enterprise.sobject.JBS_StandardQuestions__c.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ItemId__typeInfo)) {
     setItemId(
         (java.lang.String)
             __typeMapper.readString(__in, ItemId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Name__typeInfo)) {
     setName(
         (java.lang.String) __typeMapper.readString(__in, Name__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, TagDefinition__typeInfo)) {
     setTagDefinition(
         (com.sforce.soap.enterprise.sobject.TagDefinition)
             __typeMapper.readObject(
                 __in,
                 TagDefinition__typeInfo,
                 com.sforce.soap.enterprise.sobject.TagDefinition.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, TagDefinitionId__typeInfo)) {
     setTagDefinitionId(
         (java.lang.String)
             __typeMapper.readString(__in, TagDefinitionId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Type__typeInfo)) {
     setType(
         (java.lang.String) __typeMapper.readString(__in, Type__typeInfo, java.lang.String.class));
   }
 }
Example #20
0
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(
       __out, ActivityHistories__typeInfo, ActivityHistories, ActivityHistories__is_set);
   __typeMapper.writeObject(
       __out,
       AttachedContentDocuments__typeInfo,
       AttachedContentDocuments,
       AttachedContentDocuments__is_set);
   __typeMapper.writeObject(__out, Attachments__typeInfo, Attachments, Attachments__is_set);
   __typeMapper.writeObject(__out, CaseSolutions__typeInfo, CaseSolutions, CaseSolutions__is_set);
   __typeMapper.writeObject(
       __out, CombinedAttachments__typeInfo, CombinedAttachments, CombinedAttachments__is_set);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(__out, Events__typeInfo, Events, Events__is_set);
   __typeMapper.writeObject(
       __out,
       FeedSubscriptionsForEntity__typeInfo,
       FeedSubscriptionsForEntity,
       FeedSubscriptionsForEntity__is_set);
   __typeMapper.writeObject(__out, Feeds__typeInfo, Feeds, Feeds__is_set);
   __typeMapper.writeObject(__out, Histories__typeInfo, Histories, Histories__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(__out, IsHtml__typeInfo, IsHtml, IsHtml__is_set);
   __typeMapper.writeObject(__out, IsPublished__typeInfo, IsPublished, IsPublished__is_set);
   __typeMapper.writeObject(
       __out,
       IsPublishedInPublicKb__typeInfo,
       IsPublishedInPublicKb,
       IsPublishedInPublicKb__is_set);
   __typeMapper.writeObject(__out, IsReviewed__typeInfo, IsReviewed, IsReviewed__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeObject(
       __out, LastReferencedDate__typeInfo, LastReferencedDate, LastReferencedDate__is_set);
   __typeMapper.writeObject(
       __out, LastViewedDate__typeInfo, LastViewedDate, LastViewedDate__is_set);
   __typeMapper.writeObject(
       __out, OpenActivities__typeInfo, OpenActivities, OpenActivities__is_set);
   __typeMapper.writeObject(__out, Owner__typeInfo, Owner, Owner__is_set);
   __typeMapper.writeString(__out, OwnerId__typeInfo, OwnerId, OwnerId__is_set);
   __typeMapper.writeObject(
       __out, ProcessInstances__typeInfo, ProcessInstances, ProcessInstances__is_set);
   __typeMapper.writeObject(__out, ProcessSteps__typeInfo, ProcessSteps, ProcessSteps__is_set);
   __typeMapper.writeString(__out, SolutionName__typeInfo, SolutionName, SolutionName__is_set);
   __typeMapper.writeString(__out, SolutionNote__typeInfo, SolutionNote, SolutionNote__is_set);
   __typeMapper.writeString(
       __out, SolutionNumber__typeInfo, SolutionNumber, SolutionNumber__is_set);
   __typeMapper.writeString(__out, Status__typeInfo, Status, Status__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeObject(__out, Tasks__typeInfo, Tasks, Tasks__is_set);
   __typeMapper.writeObject(__out, TimesUsed__typeInfo, TimesUsed, TimesUsed__is_set);
   __typeMapper.writeObject(__out, Votes__typeInfo, Votes, Votes__is_set);
 }
Example #21
0
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, Body__typeInfo)) {
     setBody(__typeMapper.readString(__in, Body__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CommentCount__typeInfo)) {
     setCommentCount(
         (java.lang.Integer)
             __typeMapper.readObject(__in, CommentCount__typeInfo, java.lang.Integer.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ContentData__typeInfo)) {
     setContentData((byte[]) __typeMapper.readObject(__in, ContentData__typeInfo, byte[].class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ContentDescription__typeInfo)) {
     setContentDescription(
         __typeMapper.readString(__in, ContentDescription__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ContentFileName__typeInfo)) {
     setContentFileName(
         __typeMapper.readString(__in, ContentFileName__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ContentSize__typeInfo)) {
     setContentSize(
         (java.lang.Integer)
             __typeMapper.readObject(__in, ContentSize__typeInfo, java.lang.Integer.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ContentType__typeInfo)) {
     setContentType(__typeMapper.readString(__in, ContentType__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.Name)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.Name.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(__typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, FeedComments__typeInfo)) {
     setFeedComments(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, FeedComments__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, FeedLikes__typeInfo)) {
     setFeedLikes(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, FeedLikes__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, FeedTrackedChanges__typeInfo)) {
     setFeedTrackedChanges(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 FeedTrackedChanges__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, InsertedBy__typeInfo)) {
     setInsertedBy(
         (com.sforce.soap.enterprise.sobject.Name)
             __typeMapper.readObject(
                 __in, InsertedBy__typeInfo, com.sforce.soap.enterprise.sobject.Name.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, InsertedById__typeInfo)) {
     setInsertedById(
         __typeMapper.readString(__in, InsertedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LikeCount__typeInfo)) {
     setLikeCount(
         (java.lang.Integer)
             __typeMapper.readObject(__in, LikeCount__typeInfo, java.lang.Integer.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LinkUrl__typeInfo)) {
     setLinkUrl(__typeMapper.readString(__in, LinkUrl__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, NetworkScope__typeInfo)) {
     setNetworkScope(
         __typeMapper.readString(__in, NetworkScope__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Parent__typeInfo)) {
     setParent(
         (com.sforce.soap.enterprise.sobject.Topic)
             __typeMapper.readObject(
                 __in, Parent__typeInfo, com.sforce.soap.enterprise.sobject.Topic.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ParentId__typeInfo)) {
     setParentId(__typeMapper.readString(__in, ParentId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, RelatedRecordId__typeInfo)) {
     setRelatedRecordId(
         __typeMapper.readString(__in, RelatedRecordId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Title__typeInfo)) {
     setTitle(__typeMapper.readString(__in, Title__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Type__typeInfo)) {
     setType(__typeMapper.readString(__in, Type__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Visibility__typeInfo)) {
     setVisibility(__typeMapper.readString(__in, Visibility__typeInfo, java.lang.String.class));
   }
 }
  public void searchSample(String phoneNumber) {
    try {
      // Example of phoneNumber format: 4155551212
      String soslQuery =
          "FIND {"
              + phoneNumber
              + "} IN Phone FIELDS "
              + "RETURNING "
              + "Contact(Id, Phone, FirstName, LastName), "
              + "Lead(Id, Phone, FirstName, LastName),"
              + "Account(Id, Phone, Name)";
      // Perform SOSL query
      SearchResult sResult = partnerConnection.search(soslQuery);
      // Get the records returned by the search result
      SearchRecord[] records = sResult.getSearchRecords();
      // Create lists of objects to hold search result records
      List<SObject> contacts = new ArrayList<SObject>();
      List<SObject> leads = new ArrayList<SObject>();
      List<SObject> accounts = new ArrayList<SObject>();

      // Iterate through the search result records
      // and store the records in their corresponding lists
      // based on record type.
      if (records != null && records.length > 0) {
        for (int i = 0; i < records.length; i++) {
          SObject record = records[i].getRecord();
          if (record.getType().toLowerCase().equals("contact")) {
            contacts.add(record);
          } else if (record.getType().toLowerCase().equals("lead")) {
            leads.add(record);
          } else if (record.getType().toLowerCase().equals("account")) {
            accounts.add(record);
          }
        }
        // Display the contacts that the search returned
        if (contacts.size() > 0) {
          System.out.println("Found " + contacts.size() + " contact(s):");
          for (SObject contact : contacts) {
            System.out.println(
                contact.getId()
                    + " - "
                    + contact.getField("FirstName")
                    + " "
                    + contact.getField("LastName")
                    + " - "
                    + contact.getField("Phone"));
          }
        }
        // Display the leads that the search returned
        if (leads.size() > 0) {
          System.out.println("Found " + leads.size() + " lead(s):");
          for (SObject lead : leads) {
            System.out.println(
                lead.getId()
                    + " - "
                    + lead.getField("FirstName")
                    + " "
                    + lead.getField("LastName")
                    + " - "
                    + lead.getField("Phone"));
          }
        }
        // Display the accounts that the search returned
        if (accounts.size() > 0) {
          System.out.println("Found " + accounts.size() + " account(s):");
          for (SObject account : accounts) {
            System.out.println(
                account.getId()
                    + " - "
                    + account.getField("Name")
                    + " - "
                    + account.getField("Phone"));
          }
        }
      } else {
        // The search returned no records
        System.out.println("No records were found for the search.");
      }
    } catch (ConnectionException ce) {
      ce.printStackTrace();
    }
  }
 protected void writeFields(
     com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException {
   super.writeFields(__out, __typeMapper);
   __typeMapper.writeObject(
       __out, ActivityHistories__typeInfo, ActivityHistories, ActivityHistories__is_set);
   __typeMapper.writeObject(
       __out,
       AttachedContentDocuments__typeInfo,
       AttachedContentDocuments,
       AttachedContentDocuments__is_set);
   __typeMapper.writeObject(__out, Attachments__typeInfo, Attachments, Attachments__is_set);
   __typeMapper.writeObject(
       __out, CombinedAttachments__typeInfo, CombinedAttachments, CombinedAttachments__is_set);
   __typeMapper.writeObject(__out, CreatedBy__typeInfo, CreatedBy, CreatedBy__is_set);
   __typeMapper.writeString(__out, CreatedById__typeInfo, CreatedById, CreatedById__is_set);
   __typeMapper.writeObject(__out, CreatedDate__typeInfo, CreatedDate, CreatedDate__is_set);
   __typeMapper.writeObject(__out, Events__typeInfo, Events, Events__is_set);
   __typeMapper.writeObject(
       __out,
       FeedSubscriptionsForEntity__typeInfo,
       FeedSubscriptionsForEntity,
       FeedSubscriptionsForEntity__is_set);
   __typeMapper.writeObject(__out, Histories__typeInfo, Histories, Histories__is_set);
   __typeMapper.writeObject(__out, IsDeleted__typeInfo, IsDeleted, IsDeleted__is_set);
   __typeMapper.writeObject(
       __out, LastActivityDate__typeInfo, LastActivityDate, LastActivityDate__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedBy__typeInfo, LastModifiedBy, LastModifiedBy__is_set);
   __typeMapper.writeString(
       __out, LastModifiedById__typeInfo, LastModifiedById, LastModifiedById__is_set);
   __typeMapper.writeObject(
       __out, LastModifiedDate__typeInfo, LastModifiedDate, LastModifiedDate__is_set);
   __typeMapper.writeObject(
       __out, LastReferencedDate__typeInfo, LastReferencedDate, LastReferencedDate__is_set);
   __typeMapper.writeObject(
       __out, LastViewedDate__typeInfo, LastViewedDate, LastViewedDate__is_set);
   __typeMapper.writeString(__out, Name__typeInfo, Name, Name__is_set);
   __typeMapper.writeObject(__out, Notes__typeInfo, Notes, Notes__is_set);
   __typeMapper.writeObject(
       __out, NotesAndAttachments__typeInfo, NotesAndAttachments, NotesAndAttachments__is_set);
   __typeMapper.writeObject(
       __out, OpenActivities__typeInfo, OpenActivities, OpenActivities__is_set);
   __typeMapper.writeObject(__out, Owner__typeInfo, Owner, Owner__is_set);
   __typeMapper.writeString(__out, OwnerId__typeInfo, OwnerId, OwnerId__is_set);
   __typeMapper.writeObject(
       __out, ProcessInstances__typeInfo, ProcessInstances, ProcessInstances__is_set);
   __typeMapper.writeObject(__out, ProcessSteps__typeInfo, ProcessSteps, ProcessSteps__is_set);
   __typeMapper.writeObject(
       __out, SystemModstamp__typeInfo, SystemModstamp, SystemModstamp__is_set);
   __typeMapper.writeObject(__out, Tasks__typeInfo, Tasks, Tasks__is_set);
   __typeMapper.writeString(
       __out,
       cloudswarm__Description__c__typeInfo,
       cloudswarm__Description__c,
       cloudswarm__Description__c__is_set);
   __typeMapper.writeObject(
       __out,
       cloudswarm__Notify_on_Swarm__c__typeInfo,
       cloudswarm__Notify_on_Swarm__c,
       cloudswarm__Notify_on_Swarm__c__is_set);
   __typeMapper.writeObject(
       __out,
       cloudswarm__Opportunity_Amount__c__typeInfo,
       cloudswarm__Opportunity_Amount__c,
       cloudswarm__Opportunity_Amount__c__is_set);
   __typeMapper.writeString(
       __out,
       cloudswarm__Opportunity_Stage__c__typeInfo,
       cloudswarm__Opportunity_Stage__c,
       cloudswarm__Opportunity_Stage__c__is_set);
   __typeMapper.writeString(
       __out,
       cloudswarm__Opportunity_Type__c__typeInfo,
       cloudswarm__Opportunity_Type__c,
       cloudswarm__Opportunity_Type__c__is_set);
   __typeMapper.writeString(
       __out, cloudswarm__Type__c__typeInfo, cloudswarm__Type__c, cloudswarm__Type__c__is_set);
   __typeMapper.writeString(
       __out, cloudswarm__User__c__typeInfo, cloudswarm__User__c, cloudswarm__User__c__is_set);
   __typeMapper.writeObject(
       __out, cloudswarm__User__r__typeInfo, cloudswarm__User__r, cloudswarm__User__r__is_set);
 }
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, ActivityHistories__typeInfo)) {
     setActivityHistories(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, ActivityHistories__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, AttachedContentDocuments__typeInfo)) {
     setAttachedContentDocuments(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 AttachedContentDocuments__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Attachments__typeInfo)) {
     setAttachments(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Attachments__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CombinedAttachments__typeInfo)) {
     setCombinedAttachments(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 CombinedAttachments__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(__typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Events__typeInfo)) {
     setEvents(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Events__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, FeedSubscriptionsForEntity__typeInfo)) {
     setFeedSubscriptionsForEntity(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 FeedSubscriptionsForEntity__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Histories__typeInfo)) {
     setHistories(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Histories__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastActivityDate__typeInfo)) {
     setLastActivityDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastActivityDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedBy__typeInfo)) {
     setLastModifiedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, LastModifiedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedById__typeInfo)) {
     setLastModifiedById(
         __typeMapper.readString(__in, LastModifiedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastReferencedDate__typeInfo)) {
     setLastReferencedDate(
         (java.util.Calendar)
             __typeMapper.readObject(
                 __in, LastReferencedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastViewedDate__typeInfo)) {
     setLastViewedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastViewedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Name__typeInfo)) {
     setName(__typeMapper.readString(__in, Name__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Notes__typeInfo)) {
     setNotes(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Notes__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, NotesAndAttachments__typeInfo)) {
     setNotesAndAttachments(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 NotesAndAttachments__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, OpenActivities__typeInfo)) {
     setOpenActivities(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, OpenActivities__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Owner__typeInfo)) {
     setOwner(
         (com.sforce.soap.enterprise.sobject.Name)
             __typeMapper.readObject(
                 __in, Owner__typeInfo, com.sforce.soap.enterprise.sobject.Name.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, OwnerId__typeInfo)) {
     setOwnerId(__typeMapper.readString(__in, OwnerId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ProcessInstances__typeInfo)) {
     setProcessInstances(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, ProcessInstances__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ProcessSteps__typeInfo)) {
     setProcessSteps(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, ProcessSteps__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Tasks__typeInfo)) {
     setTasks(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Tasks__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__Description__c__typeInfo)) {
     setCloudswarm__Description__c(
         __typeMapper.readString(
             __in, cloudswarm__Description__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__Notify_on_Swarm__c__typeInfo)) {
     setCloudswarm__Notify_on_Swarm__c(
         (java.lang.Boolean)
             __typeMapper.readObject(
                 __in, cloudswarm__Notify_on_Swarm__c__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__Opportunity_Amount__c__typeInfo)) {
     setCloudswarm__Opportunity_Amount__c(
         (java.lang.Double)
             __typeMapper.readObject(
                 __in, cloudswarm__Opportunity_Amount__c__typeInfo, java.lang.Double.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__Opportunity_Stage__c__typeInfo)) {
     setCloudswarm__Opportunity_Stage__c(
         __typeMapper.readString(
             __in, cloudswarm__Opportunity_Stage__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__Opportunity_Type__c__typeInfo)) {
     setCloudswarm__Opportunity_Type__c(
         __typeMapper.readString(
             __in, cloudswarm__Opportunity_Type__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__Type__c__typeInfo)) {
     setCloudswarm__Type__c(
         __typeMapper.readString(__in, cloudswarm__Type__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__User__c__typeInfo)) {
     setCloudswarm__User__c(
         __typeMapper.readString(__in, cloudswarm__User__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, cloudswarm__User__r__typeInfo)) {
     setCloudswarm__User__r(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in,
                 cloudswarm__User__r__typeInfo,
                 com.sforce.soap.enterprise.sobject.User.class));
   }
 }
Example #25
0
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, BusinessProcessId__typeInfo)) {
     setBusinessProcessId(
         (java.lang.String)
             __typeMapper.readString(__in, BusinessProcessId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(
         (java.lang.String)
             __typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Description__typeInfo)) {
     setDescription(
         (java.lang.String)
             __typeMapper.readString(__in, Description__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, DeveloperName__typeInfo)) {
     setDeveloperName(
         (java.lang.String)
             __typeMapper.readString(__in, DeveloperName__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsActive__typeInfo)) {
     setIsActive(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsActive__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedBy__typeInfo)) {
     setLastModifiedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, LastModifiedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedById__typeInfo)) {
     setLastModifiedById(
         (java.lang.String)
             __typeMapper.readString(__in, LastModifiedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Name__typeInfo)) {
     setName(
         (java.lang.String) __typeMapper.readString(__in, Name__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, NamespacePrefix__typeInfo)) {
     setNamespacePrefix(
         (java.lang.String)
             __typeMapper.readString(__in, NamespacePrefix__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SobjectType__typeInfo)) {
     setSobjectType(
         (java.lang.String)
             __typeMapper.readString(__in, SobjectType__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
 }
Example #26
0
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, Attachments__typeInfo)) {
     setAttachments(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Attachments__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(
         (java.lang.String)
             __typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedBy__typeInfo)) {
     setLastModifiedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, LastModifiedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedById__typeInfo)) {
     setLastModifiedById(
         (java.lang.String)
             __typeMapper.readString(__in, LastModifiedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Name__typeInfo)) {
     setName(
         (java.lang.String) __typeMapper.readString(__in, Name__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Notes__typeInfo)) {
     setNotes(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Notes__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, NotesAndAttachments__typeInfo)) {
     setNotesAndAttachments(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 NotesAndAttachments__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Owner__typeInfo)) {
     setOwner(
         (com.sforce.soap.enterprise.sobject.Name)
             __typeMapper.readObject(
                 __in, Owner__typeInfo, com.sforce.soap.enterprise.sobject.Name.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, OwnerId__typeInfo)) {
     setOwnerId(
         (java.lang.String)
             __typeMapper.readString(__in, OwnerId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ProcessInstances__typeInfo)) {
     setProcessInstances(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, ProcessInstances__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ProcessSteps__typeInfo)) {
     setProcessSteps(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, ProcessSteps__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Tags__typeInfo)) {
     setTags(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Tags__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ts2__Name__c__typeInfo)) {
     setTs2__Name__c(
         (java.lang.String)
             __typeMapper.readString(__in, ts2__Name__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ts2__ParentId__c__typeInfo)) {
     setTs2__ParentId__c(
         (java.lang.String)
             __typeMapper.readString(__in, ts2__ParentId__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ts2__ParentId__r__typeInfo)) {
     setTs2__ParentId__r(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, ts2__ParentId__r__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ts2__ParentId_txt__c__typeInfo)) {
     setTs2__ParentId_txt__c(
         (java.lang.String)
             __typeMapper.readString(
                 __in, ts2__ParentId_txt__c__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ts2__TaxonomyId__r__typeInfo)) {
     setTs2__TaxonomyId__r(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 ts2__TaxonomyId__r__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ts2__Taxonomy_ExternalID__c__typeInfo)) {
     setTs2__Taxonomy_ExternalID__c(
         (java.lang.String)
             __typeMapper.readString(
                 __in, ts2__Taxonomy_ExternalID__c__typeInfo, java.lang.String.class));
   }
 }
Example #27
0
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, Campaign__typeInfo)) {
     setCampaign(
         (com.sforce.soap.enterprise.sobject.Campaign)
             __typeMapper.readObject(
                 __in, Campaign__typeInfo, com.sforce.soap.enterprise.sobject.Campaign.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CampaignId__typeInfo)) {
     setCampaignId(
         (java.lang.String)
             __typeMapper.readString(__in, CampaignId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Contact__typeInfo)) {
     setContact(
         (com.sforce.soap.enterprise.sobject.Contact)
             __typeMapper.readObject(
                 __in, Contact__typeInfo, com.sforce.soap.enterprise.sobject.Contact.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ContactId__typeInfo)) {
     setContactId(
         (java.lang.String)
             __typeMapper.readString(__in, ContactId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(
         (java.lang.String)
             __typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, FirstRespondedDate__typeInfo)) {
     setFirstRespondedDate(
         (java.util.Calendar)
             __typeMapper.readObject(
                 __in, FirstRespondedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, HasResponded__typeInfo)) {
     setHasResponded(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, HasResponded__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedBy__typeInfo)) {
     setLastModifiedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, LastModifiedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedById__typeInfo)) {
     setLastModifiedById(
         (java.lang.String)
             __typeMapper.readString(__in, LastModifiedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Lead__typeInfo)) {
     setLead(
         (com.sforce.soap.enterprise.sobject.Lead)
             __typeMapper.readObject(
                 __in, Lead__typeInfo, com.sforce.soap.enterprise.sobject.Lead.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LeadId__typeInfo)) {
     setLeadId(
         (java.lang.String)
             __typeMapper.readString(__in, LeadId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Status__typeInfo)) {
     setStatus(
         (java.lang.String)
             __typeMapper.readString(__in, Status__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
 }
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(__typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedBy__typeInfo)) {
     setLastModifiedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, LastModifiedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedById__typeInfo)) {
     setLastModifiedById(
         __typeMapper.readString(__in, LastModifiedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Name__typeInfo)) {
     setName(__typeMapper.readString(__in, Name__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Reason__typeInfo)) {
     setReason(__typeMapper.readString(__in, Reason__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Reply__typeInfo)) {
     setReply(
         (com.sforce.soap.enterprise.sobject.Reply)
             __typeMapper.readObject(
                 __in, Reply__typeInfo, com.sforce.soap.enterprise.sobject.Reply.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, ReplyId__typeInfo)) {
     setReplyId(__typeMapper.readString(__in, ReplyId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
 }
Example #29
0
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(__typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Description__typeInfo)) {
     setDescription(__typeMapper.readString(__in, Description__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, FeedSubscriptionsForEntity__typeInfo)) {
     setFeedSubscriptionsForEntity(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in,
                 FeedSubscriptionsForEntity__typeInfo,
                 com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Feeds__typeInfo)) {
     setFeeds(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Feeds__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Name__typeInfo)) {
     setName(__typeMapper.readString(__in, Name__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, NetworkId__typeInfo)) {
     setNetworkId(__typeMapper.readString(__in, NetworkId__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, TalkingAbout__typeInfo)) {
     setTalkingAbout(
         (java.lang.Integer)
             __typeMapper.readObject(__in, TalkingAbout__typeInfo, java.lang.Integer.class));
   }
 }
Example #30
0
 protected void loadFields(
     com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper)
     throws java.io.IOException, com.sforce.ws.ConnectionException {
   super.loadFields(__in, __typeMapper);
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedBy__typeInfo)) {
     setCreatedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, CreatedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedById__typeInfo)) {
     setCreatedById(
         (java.lang.String)
             __typeMapper.readString(__in, CreatedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, CreatedDate__typeInfo)) {
     setCreatedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, CreatedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Description__typeInfo)) {
     setDescription(
         (java.lang.String)
             __typeMapper.readString(__in, Description__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsActive__typeInfo)) {
     setIsActive(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsActive__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsDeleted__typeInfo)) {
     setIsDeleted(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsDeleted__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, IsStandard__typeInfo)) {
     setIsStandard(
         (java.lang.Boolean)
             __typeMapper.readObject(__in, IsStandard__typeInfo, java.lang.Boolean.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedBy__typeInfo)) {
     setLastModifiedBy(
         (com.sforce.soap.enterprise.sobject.User)
             __typeMapper.readObject(
                 __in, LastModifiedBy__typeInfo, com.sforce.soap.enterprise.sobject.User.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedById__typeInfo)) {
     setLastModifiedById(
         (java.lang.String)
             __typeMapper.readString(__in, LastModifiedById__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, LastModifiedDate__typeInfo)) {
     setLastModifiedDate(
         (java.util.Calendar)
             __typeMapper.readObject(__in, LastModifiedDate__typeInfo, java.util.Calendar.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Name__typeInfo)) {
     setName(
         (java.lang.String) __typeMapper.readString(__in, Name__typeInfo, java.lang.String.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, Opportunities__typeInfo)) {
     setOpportunities(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, Opportunities__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, PricebookEntries__typeInfo)) {
     setPricebookEntries(
         (com.sforce.soap.enterprise.QueryResult)
             __typeMapper.readObject(
                 __in, PricebookEntries__typeInfo, com.sforce.soap.enterprise.QueryResult.class));
   }
   __in.peekTag();
   if (__typeMapper.isElement(__in, SystemModstamp__typeInfo)) {
     setSystemModstamp(
         (java.util.Calendar)
             __typeMapper.readObject(__in, SystemModstamp__typeInfo, java.util.Calendar.class));
   }
 }