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