Skip to main content
Version: Next

fflib

This index lists fflib (Apex Common) classes and interfaces for discoverability and code suggestion enhancement.


fflib_IDomain

Path: force-app/main/fflib/classes/fflib_IDomain.cls

  • getType(): Returns the type of the domain.
  • getObjects(): Returns the list of objects in the domain.

fflib_IDomainConstructor

Path: force-app/main/fflib/classes/fflib_IDomainConstructor.cls

  • construct(List<Object> objects): Constructs a domain instance from a list of objects.

fflib_IDomainFactory

Path: force-app/main/fflib/classes/fflib_IDomainFactory.cls

  • newInstance(Set<Id> recordIds): Creates a new domain instance from a set of record IDs.
  • newInstance(List<SObject> records): Creates a new domain instance from a list of SObjects.
  • newInstance(List<Object> objects, Object objectType): Creates a new domain instance from a list of objects and an object type.
  • newInstance(List<SObject> records, SObjectType domainSObjectType): Creates a new domain instance from a list of SObjects and a domain SObject type.

fflib_IObjects

Path: force-app/main/fflib/classes/fflib_IObjects.cls

  • getObjects(): Returns the list of objects.

fflib_ISelectorFactory

Path: force-app/main/fflib/classes/fflib_ISelectorFactory.cls

  • newInstance(SObjectType sObjectType): Creates a new selector instance for the given SObjectType.
  • selectById(Set<Id> recordIds): Selects records by their IDs.
  • selectByRelationship(List<SObject> relatedRecords, SObjectField relationshipField): Selects records by relationship.

fflib_IUnitOfWorkFactory

Path: force-app/main/fflib/classes/fflib_IUnitOfWorkFactory.cls

  • newInstance(): Creates a new unit of work instance.
  • newInstance(fflib_SObjectUnitOfWork.IDML dml): Creates a new unit of work instance with a specific DML handler.
  • newInstance(List<SObjectType> objectTypes): Creates a new unit of work instance for the given object types.
  • newInstance(List<SObjectType> objectTypes, fflib_SObjectUnitOfWork.IDML dml): Creates a new unit of work instance for the given object types and DML handler.

fflib_IDGenerator

Path: force-app/main/fflib/classes/fflib_IDGenerator.cls

  • generate(Schema.SObjectType sobjectType): Generates a fake Salesforce Id for the given SObjectType.

fflib_Match

Path: force-app/main/fflib/classes/fflib_Match.cls

  • listContains(Object toMatch): Registers a matcher for listContains.
  • listIsEmpty(): Registers a matcher for listIsEmpty.
  • anyFieldSet(): Registers a matcher for any field set argument.
  • anyId(): Registers a matcher for any Id argument.

fflib_MatcherDefinitions

Path: force-app/main/fflib/classes/fflib_MatcherDefinitions.cls

  • toString(): Returns a string representation of the matcher.

fflib_SecurityUtils

Path: force-app/main/fflib/classes/fflib_SecurityUtils.cls

  • BYPASS_INTERNAL_FLS_AND_CRUD: Static flag to bypass internal FLS and CRUD checks.

fflib_Objects

Path: force-app/main/fflib/classes/fflib_Objects.cls

  • getType(): Returns the type of the object.
  • getObjects(): Returns the list of objects.
  • contains(Object value): Returns true if the value is contained in the objects list.