Querying RTC SCM data with wildcard characters and regular expressions
Didn't find any direct API to find components using wildcard character and regular expressions
eg:- [ *_comp ] , *_comp* etc.
Always a code should fetch “n” number of components using methods inside WorkspaceManager and then apply additional logic to filter the searched result.
Is there any other mechanism or data source available using which we can query RTC SCM data to fetch the desired result directly ?.
Accepted answer
One other answer
Comments
We are using Verison 6.0.1.ifix003
Yes "Starting with" works for all versions of rtc sdk
Details of API used:
criteria.setPartialNameIgnoreCase("");
WorkspaceManager.findComponents(criteria, Integer.MAX_VALUE, null);
Results obtained is always random and not as expected, only starts with name pattern works as expected.
From a list of following components in a repo
ABC
A.B.C
B.A
A.B
A
TestPA Default Component
if criteria.setPartialNameIgnoreCase
("") - All components were fetched
("%") - Empty result
("A") - All components were fetched
("%A") - Empty result
("A?C") - ABC
("AC") - ABC , A.B.C
("A%C") - Empty result
("A_C") - Empty result
("A*") - ABC , A.B.C , A.B , A
any suggestions ?