Guidewire Query API Best Practices, Exams of Business Economics

Guidance on best practices for using the guidewire query api, including recommendations for creating property references, improving the performance of queries using contains(), addressing dot notation performance issues, and choosing the appropriate query type (entity query, row query, etc.) based on the specific requirements of the application. Key concepts such as the use of the groot, qroot, vbroot, and aroot query types, as well as the importance of checking for the existence of entities and avoiding certain query methods like hasmatch(), countwhere(), and select().count. The information presented in this document can be valuable for developers working with the guidewire platform, as it provides practical guidance on optimizing the performance and efficiency of their database queries.

Typology: Exams

2023/2024

Available from 09/26/2024

BESTOFLUCK
BESTOFLUCK 🇺🇸

3.9

(10)

4.5K documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Guidewire Query API Test 2023-2024
Property Reference - ANSWER When writing queries create a property reference only to
persistent fields in the database
For example: EntityType#Property
Best practice for using contains() - ANSWER add an initial predicate that uses an index
Benefits: This enables the database to filter out most of the rows and then execute the
contains on a sub-set
Which entity column attribute must typically be set to true when compareIgnoreCase() is
used? - ANSWER supportsLinguisticSearch
What can you do to improve the performance of a query that uses contains()? - ANSWER
Add an initial predicate that uses an index
Addressing dot notation performance issues - ANSWER use ArrayLodaer class
for example
myArrayParent.arrays("MyArrayChildReference")
Checking for existence of an entity - ANSWER Just check for the existence of an entity if the
number of results are not important , verify the results of a targeted query are not empty
What methods for queries should be avoided for checking entities? - ANSWER 1. Avoid
hasMatch()
2. Avoid countWhere()
3. Avoid select().Count
instead use targeted query and then checking if the results are empty
gRoot - ANSWER used for normal entity queries issued by the Guidewire Query API
qRoot - ANSWER used for row query
Key load query - ANSWER is a query that retrieves the IDs for potential bean loads
vbRoot - ANSWER view bean query type that populate a list view
pf2

Partial preview of the text

Download Guidewire Query API Best Practices and more Exams Business Economics in PDF only on Docsity!

Guidewire Query API Test 2023-

Property Reference - ANSWER When writing queries create a property reference only to persistent fields in the database For example: EntityType#Property Best practice for using contains() - ANSWER add an initial predicate that uses an index Benefits: This enables the database to filter out most of the rows and then execute the contains on a sub-set Which entity column attribute must typically be set to true when compareIgnoreCase() is used? - ANSWER supportsLinguisticSearch What can you do to improve the performance of a query that uses contains()? - ANSWER Add an initial predicate that uses an index Addressing dot notation performance issues - ANSWER use ArrayLodaer class for example myArrayParent.arrays("MyArrayChildReference") Checking for existence of an entity - ANSWER Just check for the existence of an entity if the number of results are not important , verify the results of a targeted query are not empty What methods for queries should be avoided for checking entities? - ANSWER 1. Avoid hasMatch()

  1. Avoid countWhere()
  2. Avoid select().Count instead use targeted query and then checking if the results are empty gRoot - ANSWER used for normal entity queries issued by the Guidewire Query API qRoot - ANSWER used for row query Key load query - ANSWER is a query that retrieves the IDs for potential bean loads vbRoot - ANSWER view bean query type that populate a list view

aRoot - ANSWER array load query that retrieves IDs of array members

Row query - ANSWER use a single database query on the main entity and the related entities to provide to provide subset of properties you need

Choosing which query type to use - ANSWER use and entity query unless performance is not adequate

use row queries when you want to apply a database aggregate function to a column

What table alias name is used for a row query in the context info? - ANSWER qRoot

When would you use a row query instead of an entity query? - ANSWER 1. When the performance of an entity query is inadequate

  1. when you want to reduce the number of implicitly executed queries
  2. When you want to use aggregate functions

Where does clicking the "Show Queries" button take you? - ANSWER The aggregated queries view