074_Wrapper_Class

https://developer.salesforce.com/page/Wrapper_Class 

http://www.sfdcpoint.com/salesforce/wrapper-class-in-apex/ 

Wrapper Class 模板可以归类为:

public class AccountSelectClassController{
 
    //Our collection of the class/wrapper objects wrapAccount 
    public List<wrapAccount> wrapAccountList {get; set;}

       ******
	   ******
 
    // This is our wrapper/container class. A container class is a class, a data structure, or an abstract data type whose instances are collections of other objects. In this example a wrapper class contains both the standard salesforce object Account and a Boolean value
    public class wrapAccount {
        public Account acc {get; set;}
        public Boolean selected {get; set;}
 
        //This is the contructor method. When we create a new wrapAccount object we pass a Account that is set to the acc property. We also set the selected value to false
        public wrapAccount(Account a) {
            acc = a;
            selected = false;
        }
    }
}

  

此刻,静下心来学习
原文地址:https://www.cnblogs.com/bandariFang/p/9764344.html