When querying data, finders can be a useful tool. However, finders are pre-built tools created by developers, and while they offer excellent user-friendliness, they can have limitations. Oracle ADF BC framework offers an alternative called query 'q' parameter. The 'q' parameter can be used standalone or by combining with a finder to deliver maximum value.
Oracle ADF BC released capability
Starting on ADF BC Version 2 release, Oracle has expanded the the query 'q' parameter filtering options to include operator syntaxes: and , or , like , not like , between along with other combined parameters.
Let's consider the "pyemployee" endpoint. This endpoint provides access to finders that query data based "auditDate", "compCode," "EmpTermDate," "EmpType," "EmpNo," "EmpPrn," and "EmpStatus." However, there other queryable fields you can use to search for data beyond those available in the finders.
For example, the HR Manager may want to search for employees in FLSA non-exempt who are single. The existing finders do not offer queriable fields like marital status nor the FLSA type. However, EmpMaritalStatus and EmpFlsaType are two queryable fields in the employee endpoint. In this case, the below 'q' parameter can be utilized. This query will return active hourly employees with marital status single who are in the weekly payroll and exempt from overtime.
https://{add CMiC domain URL}/{add CMiC server}/hcm-rest-api/rest/1/pyemployee?finder=PyEmployeeFinder;EmpPrnVar=WK,EmpStatusVar=A,EmpTermDate=,EmpTypeVar=H&q=EmpMaritalStatus='S' and EmpFlsaType='N'
https://{add CMiC domain URL}/{add CMiC server}/hcm-rest-api/rest/1/pyemployee?q=EmpFirstName like 'Andrew%
Version 2
Version 2 of the 'q' parameter expands on the filtering options under Version 1, with optional operators syntaxes: and , or , like , not like , between, along with other combined parameters.
Version 2 is accessible by adding "REST-Framework-Version" header to the API request.
CMiC will support defaulting the Version 2 header on Patch 20. Version 1 will continue to be supported by hard coding the REST-Framework-Version header request value to 1.