ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 115 - Certified Sharing and Visibility Architect discussion

Report
Export

Universal Containers has implemented a strict software architecture for their custom Apex code. One of the requirements is that all SOQL queries are contained within reusable classes. Depending on the context of the Apex transaction, the queries should be able to run either 'With Sharing' or 'Without Sharing'. Which two ways allow the Architect to meet these requirements?

Choose 2 answers.

A.
Create a reusable SOQLQueries class; do not specify 'With' or 'Without Sharing' on the SOQLQueries class.
Answers
A.
Create a reusable SOQLQueries class; do not specify 'With' or 'Without Sharing' on the SOQLQueries class.
B.
Create a reusable SOQLQueries class; do not specify 'With' or 'Without Sharing' on the SOQLQueries class and use the runAs() method to dynamically set the context.
Answers
B.
Create a reusable SOQLQueries class; do not specify 'With' or 'Without Sharing' on the SOQLQueries class and use the runAs() method to dynamically set the context.
C.
Create a reusable SOQLQueries class; specify 'With Sharing' on the methods that require user context and 'Without Sharing' on the methods requiring system context.
Answers
C.
Create a reusable SOQLQueries class; specify 'With Sharing' on the methods that require user context and 'Without Sharing' on the methods requiring system context.
D.
Create a SystemSOQLQueries class and a UserSOQLQueries class; set the 'With Sharing' keyword on the User SOQLQueries class and 'Without Sharing' on the SystemSOQLQueries class.
Answers
D.
Create a SystemSOQLQueries class and a UserSOQLQueries class; set the 'With Sharing' keyword on the User SOQLQueries class and 'Without Sharing' on the SystemSOQLQueries class.
Suggested answer: C, D
asked 23/09/2024
Youssef El Akhal
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first