{"id":3634,"date":"2023-11-21T14:02:14","date_gmt":"2023-11-21T06:02:14","guid":{"rendered":"http:\/\/www.ponybai.com\/?p=3634"},"modified":"2023-11-21T14:04:19","modified_gmt":"2023-11-21T06:04:19","slug":"apex%e5%85%b3%e9%94%ae%e5%ad%97","status":"publish","type":"post","link":"http:\/\/www.ponybai.com\/?p=3634","title":{"rendered":"Apex\u5173\u952e\u5b57"},"content":{"rendered":"\n<p>Apex \u63d0\u4f9b\u4e86 \u5173\u952e\u5b57 <samp>final<\/samp>,&nbsp;<samp>instanceof<\/samp>,&nbsp;<samp>super<\/samp>,&nbsp;<samp>this<\/samp>,&nbsp;<samp>transient<\/samp>,&nbsp;<samp>with sharing<\/samp>&nbsp;and&nbsp;<samp>without sharing<\/samp><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4f7f\u7528 final \u5173\u952e\u5b57<\/li>\n\n\n\n<li>\u4f7f\u7528 instanceof \u5173\u952e\u5b57<\/li>\n\n\n\n<li>\u4f7f\u7528 super \u5173\u952e\u5b57<\/li>\n\n\n\n<li>\u4f7f\u7528 this \u5173\u952e\u5b57<\/li>\n\n\n\n<li>\u4f7f\u7528 transient \u5173\u952e\u5b57<\/li>\n\n\n\n<li>\u4f7f\u7528 with sharing\u3001without sharing \u548c inherited sharing&nbsp;\u5173\u952e\u5b57 \u5728\u7c7b\u4e0a\u4f7f\u7528 or \u5173\u952e\u5b57<br>\u6307\u5b9a\u662f\u5426\u5fc5\u987b\u5f3a\u5236\u6267\u884c\u5171\u4eab\u89c4\u5219\u3002\u5728\u7c7b\u4e0a\u4f7f\u7528\u5173\u952e\u5b57\uff0c\u4ee5\u5728\u8c03\u7528\u8be5\u7c7b\u7684\u7c7b\u7684\u5171\u4eab\u6a21\u5f0f\u4e0b\u8fd0\u884c\u8be5\u7c7b\u3002<samp>with sharing without sharing inherited sharing<\/samp><\/li>\n<\/ol>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528&nbsp;final&nbsp;\u5173\u952e\u5b57<\/h1>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u5173\u952e\u5b57 \u4fee\u6539\u53d8\u91cf\u3002<\/p>\n\n\n\n<p><samp>final<\/samp><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6700\u7ec8\u53d8\u91cf\u53ea\u80fd\u8d4b\u503c\u4e00\u6b21\uff0c\u65e0\u8bba\u662f\u5728\u58f0\u660e\u53d8\u91cf\u65f6\u8fd8\u662f\u5728 \u6784\u9020\u51fd\u6570\u3002\u60a8\u5fc5\u987b\u5728\u4ee5\u4e0b\u4e24\u4e2a\u4f4d\u7f6e\u4e4b\u4e00\u4e3a\u5176\u8d4b\u503c\u3002<\/li>\n\n\n\n<li>\u9759\u6001\u6700\u7ec8\u53d8\u91cf\u53ef\u4ee5\u5728\u9759\u6001\u521d\u59cb\u5316\u4e2d\u66f4\u6539 \u4ee3\u7801\u6216\u5b9a\u4e49\u7684\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>\u6210\u5458\u6700\u7ec8\u53d8\u91cf\u53ef\u4ee5\u5728\u521d\u59cb\u5316\u4ee3\u7801\u5757\u4e2d\u66f4\u6539\uff0c \u6784\u9020\u51fd\u6570\uff0c\u6216\u4f7f\u7528\u5176\u4ed6\u53d8\u91cf\u58f0\u660e\u3002<\/li>\n\n\n\n<li>\u8981\u5b9a\u4e49\u5e38\u91cf\uff0c\u8bf7\u5c06\u53d8\u91cf\u6807\u8bb0\u4e3a \u548c \u3002<samp>static<\/samp><samp>final<\/samp><\/li>\n\n\n\n<li>\u975e\u6700\u7ec8\u9759\u6001\u53d8\u91cf\u7528\u4e8e\u5728 \u7c7b\u7ea7\u522b\uff08\u4f8b\u5982\u89e6\u53d1\u5668\u4e4b\u95f4\u7684\u72b6\u6001\uff09\u3002\u7136\u800c\uff0c\u4e8b\u5b9e\u5e76\u975e\u5982\u6b64 \u5728\u8bf7\u6c42\u4e4b\u95f4\u5171\u4eab\u3002<\/li>\n\n\n\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u65b9\u6cd5\u548c\u7c7b\u662f\u6700\u7ec8\u7684\u3002\u4e0d\u80fd\u5728\u58f0\u660e\u4e2d\u4f7f\u7528\u5173\u952e\u5b57 \u7684\u7c7b\u6216\u65b9\u6cd5\u3002\u8fd9\u610f\u5473\u7740\u5b83\u4eec\u4e0d\u80fd\u88ab\u8986\u76d6\u3002\u5982\u679c\u9700\u8981\u8986\u76d6\uff0c\u8bf7\u4f7f\u7528\u5173\u952e\u5b57 \u65b9\u6cd5\u6216\u7c7b\u3002<samp>final<\/samp><samp>virtua<\/samp><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528&nbsp;instanceof&nbsp;\u5173\u952e\u5b57<\/h1>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u5728\u8fd0\u884c\u65f6\u9a8c\u8bc1\u5bf9\u8c61\u662f\u5426\u5b9e\u9645\u4e0a\u662f \u7279\u5b9a\u7c7b\uff0c\u8bf7\u4f7f\u7528\u5173\u952e\u5b57\u3002 \u5173\u952e\u5b57\u53ea\u80fd\u7528\u4e8e \u9a8c\u8bc1\u5173\u952e\u5b57\u53f3\u4fa7\u8868\u8fbe\u5f0f\u4e2d\u7684\u76ee\u6807\u7c7b\u578b\u662f\u5426\u53ef\u884c \u5de6\u4fa7\u8868\u8fbe\u5f0f\u7684\u58f0\u660e\u7c7b\u578b\u7684\u66ff\u4ee3\u9879\u3002<samp>instanceofinstanceof<\/samp>\u60a8\u53ef\u4ee5\u5c06\u4ee5\u4e0b\u68c0\u67e5\u6dfb\u52a0\u5230\u7c7b\u4e2d\u7684\u7c7b\u4e2d\uff0c\u7136\u540e \u5c06\u9879\u76ee\u6295\u5c04\u56de\u5bf9\u8c61\u4e4b\u524d\u7684\u6295\u5c04\u793a\u4f8b\u3002<\/p>\n\n\n\n<p><samp>Report<\/samp><samp>CustomReport<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>If (Reports.get(0) instanceof CustomReport) {\n    \/\/ Can safely cast it back to a custom report object\n   CustomReport c = (CustomReport) Reports.get(0);\n   } Else {\n   \/\/ Do something with the non-custom-report.\n}<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<p><a><\/a>\u5728\u4f7f\u7528 API \u7248\u672c 32.0 \u53ca\u66f4\u9ad8\u7248\u672c\u4fdd\u5b58\u7684 Apex \u4e2d\uff0c\u5982\u679c\u5de6\u64cd\u4f5c\u6570\u4e3a null \u5bf9\u8c61\uff0c\u5219\u8fd4\u56de\u3002\u4e3a \u793a\u4f8b\uff0c\u4ee5\u4e0b\u793a\u4f8b\u8fd4\u56de \u3002<samp>instanceof<\/samp><samp>false<\/samp><samp>false<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Object o = null;\nBoolean result = o instanceof Account;\nSystem.assertEquals(false, result);<\/code><\/pre>\n\n\n\n<p><a><\/a>\u5728 API \u7248\u672c 31.0 \u53ca\u66f4\u65e9\u7248\u672c\u4e2d\uff0c\u5728\u672c\u4f8b\u4e2d\u8fd4\u56de\u3002<samp>instanceof<\/samp><samp>true<\/samp><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528&nbsp;super&nbsp;\u5173\u952e\u5b57<\/h1>\n\n\n\n<p>\u5173\u952e\u5b57\u53ef\u4ee5 \u7531\u4ece\u865a\u62df\u7c7b\u6216\u62bd\u8c61\u7c7b\u6269\u5c55\u800c\u6765\u7684\u7c7b\u4f7f\u7528\u3002 \u901a\u8fc7\u4f7f\u7528 \uff0c\u53ef\u4ee5\u8986\u76d6 \u7236\u7c7b\u4e2d\u7684\u6784\u9020\u51fd\u6570\u548c\u65b9\u6cd5\u3002<samp>super<\/samp><samp>super<\/samp>\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u6709\u4ee5\u4e0b\u865a\u62df\u7c7b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public virtual class SuperClass {\n    public String mySalutation;\n    public String myFirstName;\n    public String myLastName;\n\n    public SuperClass() {\n\n        mySalutation = 'Mr.';\n        myFirstName = 'Carl';\n        myLastName = 'Vonderburg';\n    }\n\n    public SuperClass(String salutation, String firstName, String lastName) {\n\n        mySalutation = salutation;\n        myFirstName = firstName;\n        myLastName = lastName;\n    }\n\n    public virtual void printName() {\n\n        System.debug('My name is ' + mySalutation + myLastName);\n    }\n\n   public virtual String getFirstName() {\n       return myFirstName;\n   }\n}<\/code><\/pre>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u521b\u5efa\u4ee5\u4e0b\u7c7b\u6765\u6269\u5c55\u548c\u91cd\u5199\u5176\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<p><samp>Superclass<\/samp><samp>printName<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class Subclass extends Superclass {\n  public override void printName() {\n        super.printName();\n        System.debug('But you can call me ' + super.getFirstName());\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u8c03\u7528\u65f6\u7684\u9884\u671f\u8f93\u51fa\u4e3a<samp>Subclass.printName<\/samp><samp>My name is Mr. Vonderburg. But you can call me Carl.<\/samp>\u8fd8\u53ef\u4ee5\u7528\u4e8e\u8c03\u7528\u6784\u9020\u51fd\u6570\u3002\u5c06\u4ee5\u4e0b\u6784\u9020\u51fd\u6570\u6dfb\u52a0\u5230\uff1a<\/p>\n\n\n\n<p><samp>super<\/samp><samp>SubClass<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public Subclass() {\n    super('Madam', 'Brenda', 'Clapentrap');\n}<\/code><\/pre>\n\n\n\n<p>\u73b0\u5728\uff0c\u9884\u671f\u7684\u8f93\u51fa\u662f<samp>Subclass.printName<\/samp><samp>My name is Madam Clapentrap. But you can call me Brenda.<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u7528&nbsp;super&nbsp;\u5173\u952e\u5b57\u7684\u6700\u4f73\u505a\u6cd5<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53ea\u6709\u6269\u5c55\u81ea \u6216 \u7c7b\u7684\u7c7b\u624d\u80fd\u4f7f\u7528 .<samp>virtual<\/samp><samp>abstract<\/samp><samp>super<\/samp><\/li>\n\n\n\n<li>\u53ea\u80fd\u5728\u7528\u5173\u952e\u5b57\u6307\u5b9a\u7684\u65b9\u6cd5\u4e2d\u4f7f\u7528\u3002<samp>super<\/samp><samp>override<\/samp><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528&nbsp;this&nbsp;\u5173\u952e\u5b57<\/h1>\n\n\n\n<p>\u6709\u4e24\u79cd\u4e0d\u540c\u7684\u4f7f\u7528\u5173\u952e\u5b57\u7684\u65b9\u6cd5\u3002<samp>this<\/samp><\/p>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u5173\u952e\u5b57 \u4ee5\u70b9\u8868\u793a\u6cd5\uff0c\u4e0d\u5e26\u62ec\u53f7\uff0c\u8868\u793a\u5f53\u524d\u5b9e\u4f8b \u5b83\u51fa\u73b0\u5728\u54ea\u4e2a\u7c7b\u4e2d\u3002\u4f7f\u7528\u8fd9\u79cd\u5f62\u5f0f\u7684\u5173\u952e\u5b57\u6765\u8bbf\u95ee\u5b9e\u4f8b\u53d8\u91cf \u548c\u65b9\u6cd5\u3002\u4f8b\u5982\uff1a<samp>this<\/samp><samp>this<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class myTestThis {\n\nstring s;\n  {\n      this.s = 'TestString';\n  }\n}<\/code><\/pre>\n\n\n\n<p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u8be5\u7c7b\u58f0\u660e\u4e86\u4e00\u4e2a\u5b9e\u4f8b\u53d8\u91cf\u3002\u521d\u59cb\u5316\u4ee3\u7801\u586b\u5145 \u4f7f\u7528 \u5173\u952e\u5b57\u7684\u53d8\u91cf\u3002<samp>myTestThis<\/samp><samp>s<\/samp><samp>this<\/samp><\/p>\n\n\n\n<p>\u6216\u8005\u4f60\u53ef\u4ee5\u4f7f\u7528\u5173\u952e\u5b57\u6765\u505a\u6784\u9020\u51fd\u6570\u94fe\u63a5\uff0c\u5373\u5728\u4e00\u4e2a\u6784\u9020\u51fd\u6570\u4e2d\uff0c \u8c03\u7528\u53e6\u4e00\u4e2a\u6784\u9020\u51fd\u6570\u3002\u5728\u6b64\u683c\u5f0f\u4e2d\uff0c\u4f7f\u7528\u5e26\u62ec\u53f7\u7684\u5173\u952e\u5b57\u3002\u4e3a \u4f8b\uff1a<samp>this<\/samp><samp>this<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class testThis {\n\n\/\/ First constructor for the class. It requires a string parameter.\n   public testThis(string s2) {\n   }\n\n\/\/ Second constructor for the class. It does not require a parameter.\n\/\/ This constructor calls the first constructor using the this keyword.\n   public testThis() {\n       this('None');\n   }\n}<\/code><\/pre>\n\n\n\n<p>\u5f53\u60a8\u4f7f\u7528\u5173\u952e\u5b57\u65f6 \u5728\u6784\u9020\u51fd\u6570\u4e2d\uff0c\u8981\u6267\u884c\u6784\u9020\u51fd\u6570\u94fe\u63a5\uff0c\u5b83\u5fc5\u987b\u662f\u7b2c\u4e00\u4e2a \u8bed\u53e5\u3002<samp>this<\/samp><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f7f\u7528&nbsp;transient&nbsp;\u5173\u952e\u5b57<\/h1>\n\n\n\n<p>\u4f7f\u7528\u5173\u952e\u5b57\u58f0\u660e\u5b9e\u4f8b \u65e0\u6cd5\u4fdd\u5b58\u4e14\u4e0d\u5e94\u4f5c\u4e3a\u89c6\u56fe\u72b6\u6001\u7684\u4e00\u90e8\u5206\u4f20\u8f93\u7684\u53d8\u91cf \u7528\u4e8e Visualforce \u9875\u9762\u3002\u4e3a \u4f8b\uff1a<\/p>\n\n\n\n<p><samp>transient<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Transient Integer currentTotal;<\/code><\/pre>\n\n\n\n<p>\u60a8\u8fd8\u53ef\u4ee5\u5728 Apex \u4e2d\u4f7f\u7528\u5173\u952e\u5b57 \u53ef\u5e8f\u5217\u5316\u7684\u7c7b\uff0c\u5373\u5728\u63a7\u5236\u5668\u3001\u63a7\u5236\u5668\u6269\u5c55\u6216\u7c7b\u4e2d \u5b9e\u73b0 or \u63a5\u53e3\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u5728\u5b9a\u4e49\u7c7b\u578b\u7684\u7c7b\u4e2d\u4f7f\u7528 \u5728\u53ef\u5e8f\u5217\u5316\u7c7b\u4e2d\u58f0\u660e\u7684\u5b57\u6bb5\u3002<samp>transient<\/samp><samp>Batchable<\/samp><samp>Schedulable<\/samp><samp>transient<\/samp><\/p>\n\n\n\n<p>\u5c06\u53d8\u91cf\u58f0\u660e\u4e3a\u7f29\u51cf\u89c6\u56fe \u72b6\u6001\u5927\u5c0f\u3002\u5173\u952e\u5b57\u7684\u4e00\u4e2a\u5e38\u89c1\u7528\u4f8b\u662f Visualforce \u9875\u9762\u4e0a\u7684\u5b57\u6bb5\uff0c\u8be5\u5b57\u6bb5\u4ec5\u5728\u9875\u9762\u6301\u7eed\u65f6\u95f4\u5185\u9700\u8981 \u8bf7\u6c42\uff0c\u4f46\u4e0d\u5e94\u662f\u9875\u9762\u89c6\u56fe\u72b6\u6001\u7684\u4e00\u90e8\u5206\uff0c\u5e76\u4e14\u4f1a\u4f7f\u7528\u8fc7\u591a\u7684\u7cfb\u7edf \u5728\u8bf7\u6c42\u671f\u95f4\u8981\u591a\u6b21\u91cd\u65b0\u8ba1\u7b97\u7684\u8d44\u6e90\u3002<samp>transient<\/samp><samp>transient<\/samp><\/p>\n\n\n\n<p>\u67d0\u4e9b Apex \u5bf9\u8c61\u4f1a\u81ea\u52a8\u88ab\u89c6\u4e3a\u77ac\u6001\u5bf9\u8c61\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5b83\u4eec\u7684\u503c\u4e0d\u4f1a \u4fdd\u5b58\u4e3a\u9875\u9762\u89c6\u56fe\u72b6\u6001\u7684\u4e00\u90e8\u5206\u3002\u8fd9\u4e9b\u5bf9\u8c61\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9875\u9762\u5f15\u7528<\/li>\n\n\n\n<li>XmlStream \u7c7b<\/li>\n\n\n\n<li>\u96c6\u5408\u81ea\u52a8\u6807\u8bb0\u4e3a\u6682\u65f6\u6027\uff0c\u4ec5\u5f53\u5b83\u4eec\u7684\u5bf9\u8c61\u7c7b\u578b \u4fdd\u7559\u4f1a\u81ea\u52a8\u6807\u8bb0\u4e3a\u6682\u65f6\u6027\u4fdd\u7559\uff0c\u4f8b\u5982\u4fdd\u5b58\u70b9\u7684\u96c6\u5408<\/li>\n\n\n\n<li>\u5927\u591a\u6570\u5bf9\u8c61\u7531\u7cfb\u7edf\u65b9\u6cd5\u751f\u6210\uff0c\u4f8b\u5982 .<samp>Schema.getGlobalDescribe<\/samp><\/li>\n\n\n\n<li><samp>JSONParser<\/samp>\u7c7b\u5b9e\u4f8b\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u9759\u6001\u53d8\u91cf\u4e5f\u4e0d\u4f1a\u5f97\u5230 \u901a\u8fc7\u89c6\u56fe\u72b6\u6001\u4f20\u8f93\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u793a\u4f8b\u5305\u542b\u4e00\u4e2a Visualforce \u9875\u9762\u548c\u4e00\u4e2a\u81ea\u5b9a\u4e49\u63a7\u5236\u5668\u3002\u70b9\u51fb \u9875\u9762\u4e0a\u7684\u201c<strong>\u5237\u65b0<\/strong>\u201d\u6309\u94ae\u4f7f\u77ac\u6001\u65e5\u671f\u4e3a \u5df2\u66f4\u65b0\uff0c\u56e0\u4e3a\u6bcf\u6b21\u5237\u65b0\u9875\u9762\u65f6\u90fd\u4f1a\u91cd\u65b0\u521b\u5efa\u5b83\u3002\u975e\u77ac\u6001 date \u7ee7\u7eed\u5177\u6709\u5176\u539f\u59cb\u503c\uff0c\u8be5\u503c\u5df2\u4ece\u89c6\u56fe\u4e2d\u53cd\u5e8f\u5217\u5316 \u72b6\u6001\uff0c\u6240\u4ee5\u5b83\u4fdd\u6301\u4e0d\u53d8\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"ExampleController\"&gt;\n  T1: {!t1} &lt;br\/&gt;\n  T2: {!t2} &lt;br\/&gt;\n  &lt;apex:form&gt;\n    &lt;apex:commandLink value=\"refresh\"\/&gt;\n  &lt;\/apex:form&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>public class ExampleController {\n\n    DateTime t1;\n    transient DateTime t2;\n\n    public String getT1() {\n        if (t1 == null) t1 = System.now();\n        return '' + t1;\n    }\n\n    public String getT2() {\n        if (t2 == null) t2 = System.now();\n        return '' + t2;\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u7528\u6709\u5171\u4eab\u3001\u65e0\u5171\u4eab\u548c\u7ee7\u627f\u5171\u4eab\u5173\u952e\u5b57<\/h2>\n\n\n\n<p>\u5728\u7c7b\u4e0a\u4f7f\u7528 or \u5173\u952e\u5b57\u6765\u6307\u5b9a\u662f\u5426 \u5fc5\u987b\u5f3a\u5236\u6267\u884c\u5171\u4eab\u89c4\u5219\u3002\u5728\u7c7b\u4e0a\u4f7f\u7528\u5173\u952e\u5b57\u4ee5\u5728\u7c7b\u7684\u5171\u4eab\u6a21\u5f0f\u4e0b\u8fd0\u884c\u8be5\u7c7b \u79f0\u5176\u4e3a\u3002<\/p>\n\n\n\n<p><samp>with sharing<\/samp><samp>without sharing<\/samp><samp>inherited sharing<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0e\u5171\u4eab<\/h2>\n\n\n\n<p>\u5728\u58f0\u660e \u7c7b\u6765\u5f3a\u5236\u6267\u884c\u5f53\u524d\u7528\u6237\u7684\u5171\u4eab\u89c4\u5219\u3002\u663e\u5f0f\u8bbe\u7f6e\u6b64\u5173\u952e\u5b57\u53ef\u786e\u4fdd Apex \u4ee3\u7801\u5728\u5f53\u524d\u7528\u6237\u4e0a\u4e0b\u6587\u4e2d\u8fd0\u884c\u3002\u901a\u8fc7\u8c03\u7528\u6267\u884c\u7684 Apex \u4ee3\u7801\u548c Apex \u4e2d\u7684 Connect \u59cb\u7ec8\u6267\u884c \u4f7f\u7528\u5f53\u524d\u7528\u6237\u7684\u5171\u4eab\u89c4\u5219\u3002\u6709\u5173 \u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u533f\u540d\u5757\u3002<samp>with sharingexecuteAnonymousexecuteAnonymous<\/samp><\/p>\n\n\n\n<p>\u5728\u58f0\u660e \u7c7b\u6765\u5f3a\u5236\u6267\u884c\u9002\u7528\u4e8e\u5f53\u524d\u7528\u6237\u7684\u5171\u4eab\u89c4\u5219\u3002\u4f8b\u5982\uff1a<samp>with sharing<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class sharingClass {\n\n   \/\/ Code here\n\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u65e0\u5171\u4eab<\/h2>\n\n\n\n<p>\u5728\u58f0\u660e \u7c7b\u6765\u786e\u4fdd\u4e0d\u5f3a\u5236\u6267\u884c\u5f53\u524d\u7528\u6237\u7684\u5171\u4eab\u89c4\u5219\u3002\u4f8b\u5982 \u5f53\u4e00\u4e2a\u7c7b\u4ece\u53e6\u4e00\u4e2a\u7c7b\u8c03\u7528\u65f6\uff0c\u60a8\u53ef\u4ee5\u663e\u5f0f\u5173\u95ed\u5171\u4eab\u89c4\u5219\u5f3a\u5236\u6267\u884c \u4f7f\u7528 \u58f0\u660e\u7684\u7c7b\u3002<samp>without sharing<\/samp><samp>with sharing<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public without sharing class noSharing {\n\n   \/\/ Code here\n\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u7ee7\u627f\u5171\u4eab<\/h2>\n\n\n\n<p>\u5728\u58f0\u660e \u7c7b\u6765\u5f3a\u5236\u6267\u884c\u8c03\u7528\u5b83\u7684\u7c7b\u7684\u5171\u4eab\u89c4\u5219\u3002\u4f7f\u7528\u662f\u4e00\u79cd\u5148\u8fdb\u7684\u6280\u672f\u6765\u786e\u5b9a \u8fd0\u884c\u65f6\u7684\u5171\u4eab\u6a21\u5f0f\uff0c\u5e76\u8bbe\u8ba1\u53ef\u4ee5\u5728\u4efb\u4e00\u6a21\u5f0f\u4e0b\u8fd0\u884c\u7684 Apex \u7c7b\u3002<samp>inherited sharing<\/samp><samp>inherited sharing<\/samp><samp>with sharing<\/samp><samp>without sharing<\/samp><\/p>\n\n\n\n<p>\u8b66\u544a<\/p>\n\n\n\n<p>\u7531\u4e8e\u5171\u4eab\u6a21\u5f0f\u662f\u5728\u8fd0\u884c\u65f6\u786e\u5b9a\u7684\uff0c\u56e0\u6b64\u5fc5\u987b\u91c7\u53d6\u6781\u7aef\u63aa\u65bd \u6ce8\u610f\u786e\u4fdd\u60a8\u7684 Apex \u4ee3\u7801\u53ef\u4ee5\u5b89\u5168\u5730\u5728\u4e24\u79cd\u6a21\u5f0f\u4e0b\u8fd0\u884c\u3002<samp>with sharing<\/samp><samp>without sharing<\/samp>\u5c06 \u4e00\u8d77\u4f7f\u7528 \u548c\u5176\u4ed6 \u9002\u5f53\u7684\u5b89\u5168\u68c0\u67e5\uff0c\u6709\u52a9\u4e8e\u901a\u8fc7 AppExchange \u5b89\u5168\u5ba1\u67e5\u5e76\u786e\u4fdd \u60a8\u7684\u7279\u6743 Apex \u4ee3\u7801\u4e0d\u4f1a\u4ee5\u610f\u5916\u6216\u4e0d\u5b89\u5168\u7684\u65b9\u5f0f\u4f7f\u7528\u3002\u4e00\u4e2a Apex \u7c7b\uff0c\u5176\u8fd0\u884c\u65b9\u5f0f\u4e3a\uff1a<\/p>\n\n\n\n<p><samp>inherited sharing<\/samp><samp>inherited sharing<\/samp><samp>with sharing<\/samp><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Aura \u7ec4\u4ef6\u63a7\u5236\u5668<\/li>\n\n\n\n<li>Visualforce \u63a7\u5236\u5668<\/li>\n\n\n\n<li>Apex REST \u670d\u52a1<\/li>\n\n\n\n<li>Apex \u4e8b\u52a1\u7684\u4efb\u4f55\u5176\u4ed6\u5165\u53e3\u70b9<\/li>\n<\/ul>\n\n\n\n<p>\u6807\u6709 Apex \u7c7b\u548c\u7701\u7565\u5171\u4eab\u7684\u7c7b\u4e4b\u95f4\u6709\u660e\u663e\u7684\u533a\u522b \u58f0\u660e\u3002\u5982\u679c\u8be5\u7c7b\u7528\u4f5c Apex \u4e8b\u52a1\u7684\u5165\u53e3\u70b9\uff0c\u5219\u7701\u7565 \u5171\u4eab\u58f0\u660e\u4ee5 . \u4f46\u662f\uff0c\u786e\u4fdd\u9ed8\u8ba4 \u662f\u4ee5 .\u58f0\u660e\u4e3a \u7684\u7c7b\u4ec5\u5728\u4ece \u5df2\u7ecf\u5efa\u7acb\u7684\u4e0a\u4e0b\u6587\u3002<samp>inherited sharing<\/samp><samp>without sharing<\/samp><samp>inherited sharing<\/samp><samp>with sharing<\/samp><samp>inherited sharing<\/samp><samp>without sharing<\/samp><samp>without sharing<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f8b<\/h2>\n\n\n\n<p>\u6b64\u793a\u4f8b\u58f0\u660e\u4e00\u4e2a Apex \u7c7b\uff0c\u5176\u4e2d\u5305\u542b\u8be5 Apex \u4ee3\u7801\u7684 Visualforce \u8c03\u7528\u3002\u7531\u4e8e\u58f0\u660e\uff0c\u53ea\u6709\u8054\u7cfb\u4eba \u663e\u793a\u6b63\u5728\u8fd0\u884c\u7684\u7528\u6237\u5177\u6709\u5171\u4eab\u8bbf\u95ee\u6743\u9650\u3002\u5982\u679c\u7701\u7565\u58f0\u660e\uff0c\u8bf7\u8054\u7cfb \u7531\u4e8e\u4e0d\u5b89\u5168\u7684\u9ed8\u8ba4\u503c\uff0c\u7528\u6237\u6ca1\u6709\u67e5\u770b\u6743\u9650 \u884c\u4e3a\u3002<\/p>\n\n\n\n<p><samp>inherited sharing<\/samp><samp>inherited sharing<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public inherited sharing class InheritedSharingClass {\n    public List&lt;Contact&gt; getAllTheSecrets() {\n        return &#91;SELECT Name FROM Contact];\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"InheritedSharingClass\"&gt;\n    &lt;apex:repeat value=\"{!allTheSecrets}\" var=\"record\"&gt;\n        {!record.Name}\n    &lt;\/apex:repeat&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9e\u65bd\u7ec6\u8282<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e94\u7528\u5b9a\u4e49\u65b9\u6cd5\u7684\u7c7b\u7684\u5171\u4eab\u8bbe\u7f6e\uff0c\u800c\u4e0d\u662f \u4ece\u4e2d\u8c03\u7528\u65b9\u6cd5\u7684\u7c7b\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5728\u7c7b\u4e2d\u5b9a\u4e49\u4e86\u65b9\u6cd5 \u58f0\u660e\u4e3a\u7531\u7c7b\u8c03\u7528 \u58f0\u660e\u4e3a \uff0c\u65b9\u6cd5 \u5728\u5f3a\u5236\u6267\u884c\u5171\u4eab\u89c4\u5219\u7684\u60c5\u51b5\u4e0b\u6267\u884c\u3002<samp>with sharing<\/samp><samp>without sharing<\/samp><\/li>\n\n\n\n<li>\u5982\u679c\u7c7b\u672a\u663e\u5f0f\u58f0\u660e\u4e3a either \u6216 \uff0c \u5f53\u524d\u5171\u4eab\u89c4\u5219\u4ecd\u7136\u6709\u6548\u3002\u56e0\u6b64\uff0c\u8be5\u7c7b\u4e0d\u5f3a\u5236\u6267\u884c\u5171\u4eab \u89c4\u5219\uff0c\u9664\u975e\u5b83\u4ece\u53e6\u4e00\u4e2a\u7c7b\u83b7\u53d6\u5171\u4eab\u89c4\u5219\u3002\u4f8b\u5982\uff0c\u5982\u679c \u7c7b\u7531\u53e6\u4e00\u4e2a\u5f3a\u5236\u6267\u884c\u5171\u4eab\u7684\u7c7b\u8c03\u7528\uff0c\u7136\u540e\u5f3a\u5236\u6267\u884c\u5171\u4eab \u88ab\u8c03\u7528\u7684\u7c7b\u3002<samp>with sharing<\/samp><samp>without sharing<\/samp><\/li>\n\n\n\n<li>\u5185\u90e8\u7c7b\u548c\u5916\u90e8\u7c7b\u90fd\u53ef\u4ee5\u58f0\u660e\u4e3a \u3002\u5185\u90e8\u7c7b\u4e0d\u7ee7\u627f \u5171\u4eab\u5bb9\u5668\u7c7b\u4e2d\u7684\u8bbe\u7f6e\u3002\u5426\u5219\uff0c\u5171\u4eab\u8bbe\u7f6e\u5c06\u5e94\u7528\u4e8e \u7c7b\u4e2d\u5305\u542b\u7684\u6240\u6709\u4ee3\u7801\uff0c\u5305\u62ec\u521d\u59cb\u5316\u4ee3\u7801\u3001\u6784\u9020\u51fd\u6570\u548c \u65b9\u6cd5\u3002<samp>with sharing<\/samp><\/li>\n\n\n\n<li>\u5f53\u4e00\u4e2a\u7c7b\u6269\u5c55\u6216 \u5b9e\u73b0\u53e6\u4e00\u4e2a\u3002<\/li>\n\n\n\n<li>Apex \u89e6\u53d1\u5668\u4e0d\u80fd\u5177\u6709\u663e\u5f0f\u5171\u4eab\u58f0\u660e\uff0c\u4e0d\u80fd\u4ee5 .<samp>without sharing<\/samp><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u4f73\u5b9e\u8df5<\/h2>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6ca1\u6709\u663e\u5f0f\u5171\u4eab\u58f0\u660e\u7684 Apex \u662f\u4e0d\u5b89\u5168\u7684\u3002\u6211\u4eec\u5f3a\u70c8\u5efa\u8bae \u60a8\u59cb\u7ec8\u4e3a\u7c7b\u6307\u5b9a\u5171\u4eab\u58f0\u660e\u3002<\/p>\n\n\n\n<p>\u65e0\u8bba\u91c7\u7528\u4f55\u79cd\u5171\u4eab\u6a21\u5f0f\uff0c\u5bf9\u8c61\u7ea7\u8bbf\u95ee\u548c\u5b57\u6bb5\u7ea7\u5b89\u5168\u6027\u90fd\u4e0d\u662f \u7531 Apex \u5f3a\u5236\u6267\u884c\u3002\u60a8\u5fc5\u987b\u5728 \u60a8\u7684 SOQL \u67e5\u8be2\u6216\u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u673a\u5236\u4e0d\u5f3a\u5236\u7528\u6237\u8bbf\u95ee\u67e5\u770b\u62a5\u8868\u548c \u4eea\u8868 \u677f\u3002\u60a8\u5fc5\u987b\u663e\u5f0f\u5f3a\u5236\u6267\u884c\u6b63\u5728\u8fd0\u884c\u7684\u7528\u6237\u7684 CRUD\uff08\u521b\u5efa\u3001\u8bfb\u53d6\u3001\u66f4\u65b0\u3001 Delete\uff09 \u548c\u4ee3\u7801\u4e2d\u7684\u5b57\u6bb5\u7ea7\u5b89\u5168\u6027\u3002\u8bf7\u53c2\u9605\u5f3a\u5236\u6267\u884c\u5bf9\u8c61\u548c\u5b57\u6bb5\u6743\u9650\u3002<samp>with sharing<\/samp><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5171\u4eab\u6a21\u5f0f<\/th><th>\u4f55\u65f6\u4f7f\u7528<\/th><\/tr><\/thead><tbody><tr><td><samp>with sharing<\/samp><\/td><td>\u4f7f\u7528\u6b64\u6a21\u5f0f\u4f5c\u4e3a\u9ed8\u8ba4\u6a21\u5f0f\uff0c\u9664\u975e\u60a8\u7684\u7528\u4f8b\u53e6\u6709\u8981\u6c42\u3002<\/td><\/tr><tr><td><samp>without sharing<\/samp><\/td><td>\u8bf7\u8c28\u614e\u4f7f\u7528\u6b64\u6a21\u5f0f\u3002\u786e\u4fdd\u60a8\u4e0d\u4f1a\u65e0\u610f\u4e2d\u66b4\u9732\u654f\u611f\u5185\u5bb9 \u901a\u5e38\u7531\u5171\u4eab\u6a21\u578b\u9690\u85cf\u7684\u6570\u636e\u3002\u8fd9\u79cd\u5171\u4eab\u673a\u5236\u662f \u6700\u9002\u5408\u7528\u4e8e\u5411\u5f53\u524d\u6388\u4e88\u6709\u9488\u5bf9\u6027\u5730\u63d0\u5347\u5171\u4eab\u6743\u9650 \u7528\u6237\u3002\u4f8b\u5982\uff0c\u4f7f\u7528 \u5141\u8bb8\u793e\u533a\u7528\u6237\u8bfb\u53d6\u4ed6\u4eec\u539f\u672c\u4e0d\u4f1a\u62e5\u6709\u7684\u8bb0\u5f55 \u8bbf\u95ee\u3002<samp>without sharing<\/samp><\/td><\/tr><tr><td><samp>inherited sharing<\/samp><\/td><td>\u5bf9\u4e8e\u5fc5\u987b\u7075\u6d3b\u4e14\u652f\u6301\u4f7f\u7528\u7684\u670d\u52a1\u7c7b\uff0c\u8bf7\u4f7f\u7528\u6b64\u6a21\u5f0f \u5177\u6709\u4e0d\u540c\u5171\u4eab\u6a21\u5f0f\u7684\u60c5\u51b5\uff0c\u540c\u65f6\u4e5f\u9ed8\u8ba4\u4e3a\u66f4\u5b89\u5168\u7684\u6a21\u5f0f\u3002<samp>with sharing<\/samp><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Apex final,\u00a0instanceof,\u00a0super,\u00a0this,\u00a0transient,\u00a0with sharing\u00a0and\u00a0without sharing<\/p>\n","protected":false},"author":1,"featured_media":3630,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[199],"tags":[],"class_list":["post-3634","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apex-"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apex\u5173\u952e\u5b57 - \u767d\u767d\u968f\u7b14<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.ponybai.com\/?p=3634\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apex\u5173\u952e\u5b57 - \u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"og:description\" content=\"Apex final,\u00a0instanceof,\u00a0super,\u00a0this,\u00a0transient,\u00a0with sharing\u00a0and\u00a0without sharing\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.ponybai.com\/?p=3634\" \/>\n<meta property=\"og:site_name\" content=\"\u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-21T06:02:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-21T06:04:19+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/Apex-Interface.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1351\" \/>\n\t<meta property=\"og:image:height\" content=\"235\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"ponybai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"ponybai\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3634#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3634\"},\"author\":{\"name\":\"ponybai\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"headline\":\"Apex\u5173\u952e\u5b57\",\"datePublished\":\"2023-11-21T06:02:14+00:00\",\"dateModified\":\"2023-11-21T06:04:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3634\"},\"wordCount\":238,\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"articleSection\":[\"Apex \u5f00\u53d1\u4eba\u5458\u6307\u5357\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3634\",\"url\":\"http:\/\/www.ponybai.com\/?p=3634\",\"name\":\"Apex\u5173\u952e\u5b57 - \u767d\u767d\u968f\u7b14\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/#website\"},\"datePublished\":\"2023-11-21T06:02:14+00:00\",\"dateModified\":\"2023-11-21T06:04:19+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3634#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.ponybai.com\/?p=3634\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3634#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/www.ponybai.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apex\u5173\u952e\u5b57\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ponybai.com\/#website\",\"url\":\"http:\/\/www.ponybai.com\/\",\"name\":\"\u767d\u767d\u968f\u7b14\",\"description\":\"Salesforce\u5b98\u65b9\u8bb2\u5e08\",\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ponybai.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\",\"name\":\"ponybai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"contentUrl\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"width\":248,\"height\":248,\"caption\":\"ponybai\"},\"logo\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/121.37.188.161\"],\"url\":\"http:\/\/www.ponybai.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apex\u5173\u952e\u5b57 - \u767d\u767d\u968f\u7b14","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.ponybai.com\/?p=3634","og_locale":"zh_CN","og_type":"article","og_title":"Apex\u5173\u952e\u5b57 - \u767d\u767d\u968f\u7b14","og_description":"Apex final,\u00a0instanceof,\u00a0super,\u00a0this,\u00a0transient,\u00a0with sharing\u00a0and\u00a0without sharing","og_url":"http:\/\/www.ponybai.com\/?p=3634","og_site_name":"\u767d\u767d\u968f\u7b14","article_published_time":"2023-11-21T06:02:14+00:00","article_modified_time":"2023-11-21T06:04:19+00:00","og_image":[{"width":1351,"height":235,"url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/Apex-Interface.png","type":"image\/png"}],"author":"ponybai","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"ponybai","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.ponybai.com\/?p=3634#article","isPartOf":{"@id":"http:\/\/www.ponybai.com\/?p=3634"},"author":{"name":"ponybai","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"headline":"Apex\u5173\u952e\u5b57","datePublished":"2023-11-21T06:02:14+00:00","dateModified":"2023-11-21T06:04:19+00:00","mainEntityOfPage":{"@id":"http:\/\/www.ponybai.com\/?p=3634"},"wordCount":238,"publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"articleSection":["Apex \u5f00\u53d1\u4eba\u5458\u6307\u5357"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/www.ponybai.com\/?p=3634","url":"http:\/\/www.ponybai.com\/?p=3634","name":"Apex\u5173\u952e\u5b57 - \u767d\u767d\u968f\u7b14","isPartOf":{"@id":"http:\/\/www.ponybai.com\/#website"},"datePublished":"2023-11-21T06:02:14+00:00","dateModified":"2023-11-21T06:04:19+00:00","breadcrumb":{"@id":"http:\/\/www.ponybai.com\/?p=3634#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.ponybai.com\/?p=3634"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.ponybai.com\/?p=3634#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.ponybai.com\/"},{"@type":"ListItem","position":2,"name":"Apex\u5173\u952e\u5b57"}]},{"@type":"WebSite","@id":"http:\/\/www.ponybai.com\/#website","url":"http:\/\/www.ponybai.com\/","name":"\u767d\u767d\u968f\u7b14","description":"Salesforce\u5b98\u65b9\u8bb2\u5e08","publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ponybai.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883","name":"ponybai","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/","url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","contentUrl":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","width":248,"height":248,"caption":"ponybai"},"logo":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/121.37.188.161"],"url":"http:\/\/www.ponybai.com\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3634"}],"version-history":[{"count":2,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3634\/revisions"}],"predecessor-version":[{"id":3637,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3634\/revisions\/3637"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/media\/3630"}],"wp:attachment":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3634"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}