fferpcore.ApplyMessagesToObjectRequestglobal interface ApplyMessagesToObjectRequest The purpose of this interface is to allow a specific SObject to have a series of messages associated with it. All methods in this interface must be implemented in order to use them. MethodsgetSObjectSObject getSObject() This method returns the SObject that this ApplyMessageToObjectRequest is working with. This SObject may be new or existing. This method must be implemented by a class which implements ApplyMessagesToObjectRequest. Return ValueThe object to work on. It may be new or existing. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. public class ApplyMessagesToObjectRequestImpl implements fferpcore.ApplyMessagesToObjectRequest { ... } List<fferpcore.DeliveredMessage> messages = new List<fferpcore.DeliveredMessage>{new fferpcore.DeliveredMessageImpl()}; fferpcore.ApplyMessagesToObjectRequest request = new ApplyMessagesToObjectRequestImpl(SObjectExample__c, messages); SObject returnedObject = request.getSObject(); getMessagesList<DeliveredMessage> getMessages() This method returns the DeliveredMessages that this ApplyMessageToObjectRequest is working with. This method must be implemented by a class which implements ApplyMessagesToObjectRequest. Return ValueThe messages pertaining to the object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. public class ApplyMessagesToObjectRequestImpl implements fferpcore.ApplyMessagesToObjectRequest { ... } List<fferpcore.DeliveredMessage> messages = new List<fferpcore.DeliveredMessage>{new fferpcore.DeliveredMessageImpl()}; fferpcore.ApplyMessagesToObjectRequest request = new ApplyMessagesToObjectRequestImpl(SObjectExample__c, messages); List<fferpcore.DeliveredMessage> returnedMessages = request.getMessages(); preventSavevoid preventSave() This method attempts to prevent the saving of the SObject ApplyMessageToObjectRequest is working with. This method must be implemented by a class which implements ApplyMessagesToObjectRequest. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. public class ApplyMessagesToObjectRequestImpl implements fferpcore.ApplyMessagesToObjectRequest { ... } List<fferpcore.DeliveredMessage> messages = new List<fferpcore.DeliveredMessage>{new fferpcore.DeliveredMessageImpl()}; fferpcore.ApplyMessagesToObjectRequest request = new ApplyMessagesToObjectRequestImpl(SObjectExample__c, messages); request.preventSave(); |