• Cheekati Usharani
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
This is my apex class:

   global without sharing class VF_DeleteOpenTimeSlotsBatch      implements Database.Batchable<sObject>,Schedulable,database.stateful  {
    Set<Id> deleteTSIds;// = new  Set<Id>(); 
    
    global VF_DeleteOpenTimeSlotsBatch(Set<Id> setTSIds){
        deleteTSIds = setTSIds.clone();
    }
    global void execute(SchedulableContext SC) {
        VF_DeleteOpenTimeSlotsBatch schdVar1 = new VF_DeleteOpenTimeSlotsBatch(deleteTSIds); 
        
    }
    

    //Start method
        global Database.QueryLocator start(Database.BatchableContext BC){
        //fetch the field values
        System.debug('check for'+deleteTSIds);
        String queryString ='SELECT ID from VF_TimeSlots__c WHERE ID IN: deleteTSIds';
        return Database.getQueryLocator (queryString);
    }
    
    //Execute method
    global void execute(Database.BatchableContext BC, List <VF_TimeSlots__c> timeSlotsList){
        System.debug('timeSlotsList'+timeSlotsList.size());
        delete timeSlotsList;
    }
    global void finish(Database.BatchableContext BC){
    }
}
thanks,
in advance
usharani.

public class VF_GoogleCalloutResponseDataWrapper {

public class Address_components {
public String long_name;
public String short_name;
public List<String> types;
}

public class Geometry {
public Bounds bounds;
public Northeast location;
public String location_type;
public Bounds viewport;
}

public List<Results> results;
public String status;

public class Results {
public List<Address_components> address_components;
public String formatted_address;
public Geometry geometry;
public String place_id;
public List<String> types;
}

public class Bounds {
public Northeast northeast;
public Northeast southwest;
}

public class Northeast {
public Double lat;
public Double lng;
}
This is my apex class:

   global without sharing class VF_DeleteOpenTimeSlotsBatch      implements Database.Batchable<sObject>,Schedulable,database.stateful  {
    Set<Id> deleteTSIds;// = new  Set<Id>(); 
    
    global VF_DeleteOpenTimeSlotsBatch(Set<Id> setTSIds){
        deleteTSIds = setTSIds.clone();
    }
    global void execute(SchedulableContext SC) {
        VF_DeleteOpenTimeSlotsBatch schdVar1 = new VF_DeleteOpenTimeSlotsBatch(deleteTSIds); 
        
    }
    

    //Start method
        global Database.QueryLocator start(Database.BatchableContext BC){
        //fetch the field values
        System.debug('check for'+deleteTSIds);
        String queryString ='SELECT ID from VF_TimeSlots__c WHERE ID IN: deleteTSIds';
        return Database.getQueryLocator (queryString);
    }
    
    //Execute method
    global void execute(Database.BatchableContext BC, List <VF_TimeSlots__c> timeSlotsList){
        System.debug('timeSlotsList'+timeSlotsList.size());
        delete timeSlotsList;
    }
    global void finish(Database.BatchableContext BC){
    }
}
thanks,
in advance
usharani.

public class VF_GoogleCalloutResponseDataWrapper {

public class Address_components {
public String long_name;
public String short_name;
public List<String> types;
}

public class Geometry {
public Bounds bounds;
public Northeast location;
public String location_type;
public Bounds viewport;
}

public List<Results> results;
public String status;

public class Results {
public List<Address_components> address_components;
public String formatted_address;
public Geometry geometry;
public String place_id;
public List<String> types;
}

public class Bounds {
public Northeast northeast;
public Northeast southwest;
}

public class Northeast {
public Double lat;
public Double lng;
}