mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-08 16:25:58 +08:00
The @author Apex Doc tag is officially supported, but is generally unnecessary in the presence of source drive development. There is no @date or @created tag.
This commit is contained in:
parent
b3fa087d52
commit
2d88ee4c8c
@ -1,8 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Test class for {{ClassName}}
|
* Test class for {{ClassName}}
|
||||||
* Tests core functionality with positive, negative, and bulk scenarios.
|
* Tests core functionality with positive, negative, and bulk scenarios.
|
||||||
* @author {{Author}}
|
|
||||||
* @created {{Date}}
|
|
||||||
* @coverage Target: 90%+
|
* @coverage Target: 90%+
|
||||||
*/
|
*/
|
||||||
@IsTest
|
@IsTest
|
||||||
|
|||||||
@ -2,8 +2,6 @@
|
|||||||
* Bulk testing template for trigger and service validation
|
* Bulk testing template for trigger and service validation
|
||||||
* Tests with 251+ records to ensure bulkification compliance.
|
* Tests with 251+ records to ensure bulkification compliance.
|
||||||
* 251 records crosses the 200-record trigger batch boundary.
|
* 251 records crosses the 200-record trigger batch boundary.
|
||||||
* @author {{Author}}
|
|
||||||
* @created {{Date}}
|
|
||||||
*/
|
*/
|
||||||
@IsTest
|
@IsTest
|
||||||
private class {{ClassName}}BulkTest {
|
private class {{ClassName}}BulkTest {
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Test class for external API callouts using mock framework
|
* Test class for external API callouts using mock framework
|
||||||
* Demonstrates HttpCalloutMock and WebServiceMock patterns.
|
* Demonstrates HttpCalloutMock and WebServiceMock patterns.
|
||||||
* @author {{Author}}
|
|
||||||
* @created {{Date}}
|
|
||||||
*/
|
*/
|
||||||
@IsTest
|
@IsTest
|
||||||
private class {{ClassName}}CalloutTest {
|
private class {{ClassName}}CalloutTest {
|
||||||
|
|||||||
@ -8,9 +8,6 @@
|
|||||||
*
|
*
|
||||||
* // Or with auto-insert:
|
* // Or with auto-insert:
|
||||||
* List<Account> accounts = TestDataFactory.createAndInsertAccounts(5);
|
* List<Account> accounts = TestDataFactory.createAndInsertAccounts(5);
|
||||||
*
|
|
||||||
* @author {{Author}}
|
|
||||||
* @created {{Date}}
|
|
||||||
*/
|
*/
|
||||||
@IsTest
|
@IsTest
|
||||||
public class TestDataFactory {
|
public class TestDataFactory {
|
||||||
|
|||||||
@ -3,8 +3,7 @@
|
|||||||
* Compares Accounts by Name and BillingPostalCode to find potential duplicates.
|
* Compares Accounts by Name and BillingPostalCode to find potential duplicates.
|
||||||
* Flags duplicates by setting the Is_Potential_Duplicate__c checkbox.
|
* Flags duplicates by setting the Is_Potential_Duplicate__c checkbox.
|
||||||
* Implements Database.Stateful to track results across batch chunks.
|
* Implements Database.Stateful to track results across batch chunks.
|
||||||
* @author Generated by Apex Class Writer Skill
|
*
|
||||||
*
|
|
||||||
* @example
|
* @example
|
||||||
* // Run with default batch size (200)
|
* // Run with default batch size (200)
|
||||||
* Id jobId = AccountDeduplicationBatch.run();
|
* Id jobId = AccountDeduplicationBatch.run();
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Selector class for Account queries.
|
* Selector class for Account queries.
|
||||||
* Encapsulates all SOQL for Account records.
|
* Encapsulates all SOQL for Account records.
|
||||||
* All methods return bulkified results (Lists or Maps).
|
* All methods return bulkified results (Lists or Maps).
|
||||||
* @author Generated by Apex Class Writer Skill
|
|
||||||
*/
|
*/
|
||||||
public inherited sharing class AccountSelector {
|
public inherited sharing class AccountSelector {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Service class for Account business logic.
|
* Service class for Account business logic.
|
||||||
* Provides account deduplication, enrichment, and territory assignment.
|
* Provides account deduplication, enrichment, and territory assignment.
|
||||||
* Delegates queries to AccountSelector and SObject manipulation to AccountDomain.
|
* Delegates queries to AccountSelector and SObject manipulation to AccountDomain.
|
||||||
* @author Generated by Apex Class Writer Skill
|
|
||||||
*/
|
*/
|
||||||
public with sharing class AccountService {
|
public with sharing class AccountService {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Abstract base class for {describe the family of classes this serves}.
|
* Abstract base class for {describe the family of classes this serves}.
|
||||||
* Provides common behavior and defines extension points for subclasses.
|
* Provides common behavior and defines extension points for subclasses.
|
||||||
* Subclasses must implement the abstract methods to provide specific behavior.
|
* Subclasses must implement the abstract methods to provide specific behavior.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* // Extending this abstract class:
|
* // Extending this abstract class:
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Controller for {ComponentName} Lightning Web Component.
|
* Controller for {ComponentName} Lightning Web Component.
|
||||||
* Exposes server-side operations to LWC via @AuraEnabled methods.
|
* Exposes server-side operations to LWC via @AuraEnabled methods.
|
||||||
* All queries use WITH USER_MODE for CRUD/FLS enforcement.
|
* All queries use WITH USER_MODE for CRUD/FLS enforcement.
|
||||||
* @author {Author}
|
|
||||||
*/
|
*/
|
||||||
public with sharing class {ClassName}Controller {
|
public with sharing class {ClassName}Controller {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Batch Apex class for {describe the batch operation}.
|
* Batch Apex class for {describe the batch operation}.
|
||||||
* Processes {SObject} records in configurable batch sizes.
|
* Processes {SObject} records in configurable batch sizes.
|
||||||
* Implements Database.Stateful to track cumulative results across chunks.
|
* Implements Database.Stateful to track cumulative results across chunks.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* // Execute with default batch size
|
* // Execute with default batch size
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Domain class for {SObject}.
|
* Domain class for {SObject}.
|
||||||
* Encapsulates field-level defaults, derivations, and validations.
|
* Encapsulates field-level defaults, derivations, and validations.
|
||||||
* Operates only on in-memory SObject data — no SOQL or DML.
|
* Operates only on in-memory SObject data — no SOQL or DML.
|
||||||
* @author {Author}
|
|
||||||
*/
|
*/
|
||||||
public with sharing class {SObject}Domain {
|
public with sharing class {SObject}Domain {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Data Transfer Object for {describe the data this DTO represents}.
|
* Data Transfer Object for {describe the data this DTO represents}.
|
||||||
* Used to pass structured data between layers without exposing SObjects.
|
* Used to pass structured data between layers without exposing SObjects.
|
||||||
* Serialization-friendly for use with JSON.serialize/deserialize and API responses.
|
* Serialization-friendly for use with JSON.serialize/deserialize and API responses.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* // Create from constructor
|
* // Create from constructor
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Custom exception for {describe when this exception is thrown}.
|
* Custom exception for {describe when this exception is thrown}.
|
||||||
* Use this exception to signal domain-specific errors that callers
|
* Use this exception to signal domain-specific errors that callers
|
||||||
* can catch and handle distinctly from system exceptions.
|
* can catch and handle distinctly from system exceptions.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* throw new {ClassName}('Account merge failed: duplicate detected.');
|
* throw new {ClassName}('Account merge failed: duplicate detected.');
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Interface for {describe the capability or contract this interface defines}.
|
* Interface for {describe the capability or contract this interface defines}.
|
||||||
* Implement this interface to provide {describe what implementations do}.
|
* Implement this interface to provide {describe what implementations do}.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* public class EmailNotificationService implements {InterfaceName} {
|
* public class EmailNotificationService implements {InterfaceName} {
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Invocable Apex for Flow/Process Builder integration
|
* Invocable Apex for Flow/Process Builder integration
|
||||||
* Exposes business logic as a Flow Action
|
* Exposes business logic as a Flow Action
|
||||||
* @author {{Author}}
|
|
||||||
* @date {{Date}}
|
|
||||||
*
|
*
|
||||||
* FLOW USAGE:
|
* FLOW USAGE:
|
||||||
* 1. Add Action element in Flow Builder
|
* 1. Add Action element in Flow Builder
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Queueable Apex class for {describe the async operation}.
|
* Queueable Apex class for {describe the async operation}.
|
||||||
* Accepts data through the constructor for stateful processing.
|
* Accepts data through the constructor for stateful processing.
|
||||||
* Optionally implements Database.AllowsCallouts for external integrations.
|
* Optionally implements Database.AllowsCallouts for external integrations.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* // Enqueue the job
|
* // Enqueue the job
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Schedulable Apex class for {describe the scheduled operation}.
|
* Schedulable Apex class for {describe the scheduled operation}.
|
||||||
* Delegates heavy processing to a Batch or Queueable job.
|
* Delegates heavy processing to a Batch or Queueable job.
|
||||||
* Keep execute() lightweight — it should only launch other jobs.
|
* Keep execute() lightweight — it should only launch other jobs.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* // Schedule to run daily at 2 AM
|
* // Schedule to run daily at 2 AM
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Selector class for {SObject} queries.
|
* Selector class for {SObject} queries.
|
||||||
* Encapsulates all SOQL for {SObject} records.
|
* Encapsulates all SOQL for {SObject} records.
|
||||||
* All methods return bulkified results (Lists or Maps).
|
* All methods return bulkified results (Lists or Maps).
|
||||||
* @author {Author}
|
|
||||||
*/
|
*/
|
||||||
public inherited sharing class {SObject}Selector {
|
public inherited sharing class {SObject}Selector {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Service class for {SObject} business logic.
|
* Service class for {SObject} business logic.
|
||||||
* Follows separation of concerns: delegates queries to {SObject}Selector
|
* Follows separation of concerns: delegates queries to {SObject}Selector
|
||||||
* and SObject manipulation to {SObject}Domain where applicable.
|
* and SObject manipulation to {SObject}Domain where applicable.
|
||||||
* @author {Author}
|
|
||||||
*/
|
*/
|
||||||
public with sharing class {SObject}Service {
|
public with sharing class {SObject}Service {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Trigger Action for {SObject}: {ActionDescription}.
|
* Trigger Action for {SObject}: {ActionDescription}.
|
||||||
* Implements TriggerAction.{Context} from the Trigger Actions Framework.
|
* Implements TriggerAction.{Context} from the Trigger Actions Framework.
|
||||||
* Register via Trigger_Action__mdt custom metadata to activate.
|
* Register via Trigger_Action__mdt custom metadata to activate.
|
||||||
* @author {Author}
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* Trigger_Action__mdt record:
|
* Trigger_Action__mdt record:
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Trigger for {SObject}.
|
* Trigger for {SObject}.
|
||||||
* Delegates all logic to the Trigger Actions Framework (MetadataTriggerHandler).
|
* Delegates all logic to the Trigger Actions Framework (MetadataTriggerHandler).
|
||||||
* If TAF is not installed, delegate to a single handler class instead.
|
* If TAF is not installed, delegate to a single handler class instead.
|
||||||
* @author {Author}
|
|
||||||
*/
|
*/
|
||||||
trigger {SObject}Trigger on {SObject} (
|
trigger {SObject}Trigger on {SObject} (
|
||||||
before insert, after insert,
|
before insert, after insert,
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Utility class for {describe the category of utilities: String, Date, Collection, etc.}.
|
* Utility class for {describe the category of utilities: String, Date, Collection, etc.}.
|
||||||
* All methods are static and side-effect-free (no SOQL, no DML).
|
* All methods are static and side-effect-free (no SOQL, no DML).
|
||||||
* Private constructor prevents instantiation.
|
* Private constructor prevents instantiation.
|
||||||
* @author {Author}
|
|
||||||
*/
|
*/
|
||||||
public class {ClassName} {
|
public class {ClassName} {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user